Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2020-5217— Directive injection when using dynamic overrides with user input in RubyGems secure_headers

Quick assessment

Affected
Twitter secure_headers
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

RubyGems是RubyGems(Rubygems)组织的一款Ruby程序包管理器。该产品主要用于发布和管理Ruby程序包。 RubyGem secure_headers 3.8.0版本、5.1.0版本和6.2.0之前版本中存在注入漏洞。该漏洞源于用户输入构造命令、数据结构或记录的操作过程中,网络系统或产品缺乏对用户输入数据的正确验证,未过滤或未正确过滤掉其中的特殊元素,导致系统或产品产生解析或解释方式错误。

CVSS 4.4 · Medium EPSS 1.83% · P78

Possible ATT&CK Techniques 1 AI

T1190 · Exploit Public-Facing Application
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2020-5217

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Directive injection when using dynamic overrides with user input in RubyGems secure_headers
Source: CVE Program / CVE List V5
Vulnerability Description
In Secure Headers (RubyGem secure_headers), a directive injection vulnerability is present in versions before 3.8.0, 5.1.0, and 6.2.0. If user-supplied input was passed into append/override_content_security_policy_directives, a semicolon could be injected leading to directive injection. This could be used to e.g. override a script-src directive. Duplicate directives are ignored and the first one wins. The directives in secure_headers are sorted alphabetically so they pretty much all come before script-src. A previously undefined directive would receive a value even if SecureHeaders::OPT_OUT was supplied. The fixed versions will silently convert the semicolons to spaces and emit a deprecation warning when this happens. This will result in innocuous browser console messages if being exploited/accidentally used. In future releases, we will raise application errors resulting in 500s. Depending on what major version you are using, the fixed versions are 6.2.0, 5.1.0, 3.8.0.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
动态执行代码中指令转义处理不恰当(Eval注入)
Source: CVE Program / CVE List V5
Vulnerability Title
RubyGems 注入漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
RubyGems是RubyGems(Rubygems)组织的一款Ruby程序包管理器。该产品主要用于发布和管理Ruby程序包。 RubyGem secure_headers 3.8.0版本、5.1.0版本和6.2.0之前版本中存在注入漏洞。该漏洞源于用户输入构造命令、数据结构或记录的操作过程中,网络系统或产品缺乏对用户输入数据的正确验证,未过滤或未正确过滤掉其中的特殊元素,导致系统或产品产生解析或解释方式错误。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Twitter secure_headers < 3.8.0 -

II. Public POCs for CVE-2020-5217

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2020-5217

请登录查看更多情报信息。

Patches & Fixes for CVE-2020-5217 (2)

Vendor Advisories for CVE-2020-5217 (1)

Other References for CVE-2020-5217 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2020-5217

No comments yet


Leave a comment