Skip to content

Commit f07b0eb

Browse files
authored
Merge pull request ruby#2645 from aycabta/CVE-2021-31799
Announce RDoc update on CVE-2021-31799
2 parents 8c241bc + e700334 commit f07b0eb

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
layout: news_post
3+
title: "A command injection vulnerability in RDoc"
4+
author: "aycabta"
5+
translator:
6+
date: 2021-05-02 09:00:00 +0000
7+
tags: security
8+
lang: en
9+
---
10+
11+
There is a vulnerability about Command Injection in RDoc which is bundled in Ruby.
12+
It is recommended that all Ruby users update RDoc to the latest version that fixes this issue.
13+
14+
## Details
15+
16+
The following vulnerability has been reported.
17+
18+
* [CVE-2021-31799](https://nvd.nist.gov/vuln/detail/CVE-2021-31799)
19+
20+
RDoc used to call `Kernel#open` to open a local file. If a Ruby project has a file whose name starts with `|` and ends with `tags`, the command following the pipe character is executed. A malicious Ruby project could exploit it to run an arbitrary command execution against a user who attempts to run `rdoc` command.
21+
22+
Ruby users whose version of RDoc is affected by this issue should update to the latest version of RDoc.
23+
24+
## Affected Versions
25+
26+
* All releases of RDoc from 3.11 to 6.3.0
27+
28+
## How to Update
29+
30+
Run the following command to update RDoc to the latest version (6.3.1 or later) to fix the vulnerability.
31+
32+
```
33+
gem install rdoc
34+
```
35+
36+
## Credits
37+
38+
Thanks to [Alexandr Savca](https://hackerone.com/chinarulezzz) for reporting the issue.
39+
40+
## History
41+
42+
* Originally published at 2021-05-02 09:00:00 UTC
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
layout: news_post
3+
title: "RDoc におけるコマンドインジェクションの脆弱性について"
4+
author: "aycabta"
5+
translator:
6+
date: 2021-05-02 09:00:00 +0000
7+
tags: security
8+
lang: ja
9+
---
10+
11+
Ruby の標準添付ツールである RDoc にコマンドインジェクションの脆弱性が発見されました。
12+
全ての Ruby ユーザーは、RDoc をこの問題が修正された最新バージョンに更新することが推奨されます。
13+
14+
## 詳細
15+
16+
以下の脆弱性が報告されています。
17+
18+
* [CVE-2021-31799](https://nvd.nist.gov/vuln/detail/CVE-2021-31799)
19+
20+
RDoc はローカルのファイルを開くために、`Kernel#open` を使用していました。しかし、もし Ruby プロジェクトに `|` で始まり `tags` で終わる名前のファイルが存在していた場合、パイプ文字以降に並べられたコマンドが実行されてしまいます。悪意のある Ruby プロジェクトは、ドキュメントを生成しようとしたユーザに任意のコマンドを実行させることができます。
21+
22+
この問題の影響を受けるバージョンの RDoc を含む Ruby のユーザーは、最新の RDoc に更新してください。
23+
24+
## 影響を受けるバージョン
25+
26+
* RDoc 3.11 から 6.3.0 までの全てのリリース
27+
28+
## 更新方法
29+
30+
以下のコマンドを実行し、RDoc を最新版 (6.3.1 以降) に更新することによって、脆弱性が修正されます。
31+
32+
```
33+
gem install rdoc
34+
```
35+
36+
## クレジット
37+
38+
この脆弱性情報は、[Alexandr Savca](https://hackerone.com/chinarulezzz) 氏によって報告されました。
39+
40+
## 更新履歴
41+
42+
* 2021-05-02 18:00:00 (JST) 初版

0 commit comments

Comments
 (0)