Skip to content

Commit 237481f

Browse files
committed
Translate CVE-2020-10663 post (zh_tw)
1 parent e4145cb commit 237481f

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
layout: news_post
3+
title: "CVE-2020-10663: JSON 存在任意建立物件安全性風險 (額外修正)"
4+
author: "mame"
5+
translator: "Juanito Fatas"
6+
date: 2020-03-19 13:00:00 +0000
7+
lang: zh_tw
8+
---
9+
10+
Ruby 內建的 json gem 存在任意建立物件的安全性風險,此風險的 CVE 識別號為 [CVE-2020-10663](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10663)。我們強烈建議您升級 json gem。
11+
12+
## 風險細節
13+
14+
json gem(包含 Ruby 內建的版本)在解析 JSON 文件時,系統可以被置入任意的物件。
15+
16+
此風險與 [CVE-2013-0269](https://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/) 類似。之前的補丁不完整,只考慮到 `JSON.parse(user_input)`,沒考慮到其他解析的方法像是:`JSON(user_input)``JSON.parse(user_input, nil)`
17+
18+
了解更多細節參見 [CVE-2013-0269](https://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/)。 注意本風險本可用來建立大量無法被 GC 回收的 Symbol 物件,但像是這種類型的攻擊已經不再有效,因為 Ruby 的 Symbol 物件可以被 GC 回收了。但根據應用程序的不同,建立任何物件仍可能存在嚴重的安全性風險。
19+
20+
請用 `gem update json` 指令更新 json gem 至 2.3.0 以上版本。用 bundler 請加入 `gem "json", ">= 2.3.0"` 這行到 `Gemfile`
21+
22+
## 受影響版本
23+
24+
* JSON gem 2.2.0 及先前版本
25+
26+
## Credits
27+
28+
感謝 Jeremy Evans 回報此問題
29+
30+
## 歷史
31+
32+
* 最初發佈於 2020-03-19 13:00:00 (UTC)

0 commit comments

Comments
 (0)