Skip to content

Commit dfea886

Browse files
authored
Merge pull request from GHSA-vgj7-8xwh-w5jv
Announce a security issue of JSON gem (<= 2.2.0)
2 parents 9b92b6f + 08e69ef commit dfea886

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
layout: news_post
3+
title: "CVE-2020-10663: Unsafe Object Creation Vulnerability in JSON (Additional fix)"
4+
author: "mame"
5+
date: 2020-03-19 22:00:00 +0900
6+
lang: en
7+
---
8+
9+
There is an unsafe object creation vulnerability in the json gem bundled with Ruby. This vulnerability has been assigned the CVE identifier [CVE-2020-10663](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10663). We strongly recommend upgrading the json gem.
10+
11+
## Details
12+
13+
When parsing certain JSON documents, the json gem (including the one bundled with Ruby) can be coerced into creating arbitrary objects in the target system.
14+
15+
This is the same issue as [CVE-2013-0269](https://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/). The previous fix was incomplete, which addressed `JSON.parse(user_input)`, but didn't address some other styles of JSON parsing including `JSON(user_input)` and `JSON.parse(user_input, nil)`.
16+
17+
See [CVE-2013-0269](https://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/) in detail. Note that the issue was exploitable to cause a Denial of Service by creating many garbage-uncollectable Symbol objects, but this kind of attack is no longer valid because Symbol objects are now garbage-collectable. However, creating arbitrary objects may cause severe security consequences depending upon the application code.
18+
19+
Please update the json gem to version 2.3.0 or later. You can use `gem update json` to update it. If you are using bundler, please add `gem "json", ">= 2.3.0"` to your `Gemfile`.
20+
21+
## Affected versions
22+
23+
* JSON gem 2.2.0 or prior
24+
25+
## Credits
26+
27+
Thanks to Jeremy Evans for discovering this issue.
28+
29+
## History
30+
31+
* Originally published at 2020-03-19 13:00:00 (UTC)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
layout: news_post
3+
title: "CVE-2020-10663: JSON における安全でないオブジェクトの生成の脆弱性について(追加の修正)"
4+
author: "mame"
5+
date: 2020-03-19 22:00:00 +0900
6+
lang: en
7+
---
8+
9+
RubyにバンドルされているJSON gemに、安全でないオブジェクトの生成を可能とする脆弱性が報告されました。
10+
この脆弱性は [CVE-2020-10663](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10663) として登録されています。
11+
ユーザのみなさんにはJSON gemを更新することを強くおすすめします。
12+
13+
## 詳細
14+
15+
対象のシステムにJSONドキュメントをパースさせる際に、JSON gem(Rubyにバンドルされているものを含む)に対して任意のオブジェクトを生成させることができます。
16+
17+
これは [CVE-2013-0269](https://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/) と同じ問題です。
18+
当時の修正は不完全で、`JSON.parse(user_input)`は対処していましたが、`JSON(user_input)``JSON.parse(user_input, nil)`などといった他のスタイルのJSONパースが対処されていませんでした。
19+
20+
攻撃について詳しくは [CVE-2013-0269](https://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/) のアナウンスをご参照ください。
21+
なお、当時はこの問題によってガベージコレクトできないSymbolオブジェクトを大量に生成することでサービス不能攻撃(Denial of Service)を引き起こすことができましたが、今はSymbolオブジェクトはガベージコレクト可能なのでこのタイプの攻撃は成立しません。
22+
しかしながら、任意オブジェクトを生成することはアプリケーションコード次第で致命的な結果を引き起こす可能性があります。
23+
24+
json gemを2.3.0かそれ以降にしてください。`gem update json`でアップデートできます。もしbundlerを使っている場合は、Gemfileに`gem "json", ">= 2.3.0"`を追加してください。
25+
26+
## 影響を受けるバージョン
27+
28+
* JSON gem 2.2.0 およびそれ以前のバージョン
29+
30+
## Credits
31+
32+
この問題を発見したJeremy Evansに感謝します。
33+
34+
## History
35+
36+
* 2020-03-19 22:00:00 (JST) 初版

0 commit comments

Comments
 (0)