National Vulnerability Database

National Vulnerability Database

National Vulnerability
Database

CVE-2020-5217 Detail

Current 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:  MITRE
View Analysis Description

Severity



CVSS 3.x Severity and Metrics:

NIST CVSS score
NIST: NVD
Base Score: 4.3 MEDIUM
Vector:  CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N

Nist CVSS score does not match with CNA score
CNA:  security-advisories@github.com
Base Score: 4.4 MEDIUM
Vector:  CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N

References to Advisories, Solutions, and Tools

By selecting these links, you will be leaving NIST webspace. We have provided these links to other web sites because they may have information that would be of interest to you. No inferences should be drawn on account of other sites being referenced, or not, from this page. There may be other web sites that are more appropriate for your purpose. NIST does not necessarily endorse the views expressed, or concur with the facts presented on these sites. Further, NIST does not endorse any commercial products that may be mentioned on these sites. Please address comments about this page to nvd@nist.gov.

Hyperlink Resource
https://github.com/twitter/secure_headers/commit/936a160e3e9659737a9f9eafce13eea36b5c9fa3 Patch
https://github.com/twitter/secure_headers/issues/418 Exploit Third Party Advisory
https://github.com/twitter/secure_headers/pull/421 Third Party Advisory
https://github.com/twitter/secure_headers/security/advisories/GHSA-xq52-rv6w-397c Mitigation Third Party Advisory

Weakness Enumeration

CWE-ID CWE Name Source
CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') NIST  
CWE-95 Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') security-advisories@github.com  

Known Affected Software Configurations Switch to CPE 2.2

Configuration 1 ( hide )
 cpe:2.3:a:twitter:secure_headers:*:*:*:*:*:ruby:*:*
     Show Matching CPE(s)
Up to (excluding)
3.8.0
 cpe:2.3:a:twitter:secure_headers:*:*:*:*:*:ruby:*:*
     Show Matching CPE(s)
From (including)
5.0.0
Up to (excluding)
5.1.0
 cpe:2.3:a:twitter:secure_headers:*:*:*:*:*:ruby:*:*
     Show Matching CPE(s)
From (including)
6.0.0
Up to (excluding)
6.2.0


Change History

1 change record found - show changes

Quick Info

CVE Dictionary Entry:
CVE-2020-5217
NVD Published Date:
01/22/2020
NVD Last Modified:
01/30/2020