Vulnerability Details : CVE-2020-5216
Potential exploit
In Secure Headers (RubyGem secure_headers), a directive injection vulnerability is present in versions before 3.9.0, 5.2.0, and 6.3.0. If user-supplied input was passed into append/override_content_security_policy_directives, a newline could be injected leading to limited header injection. Upon seeing a newline in the header, rails will silently create a new Content-Security-Policy header with the remaining value of the original string. It will continue to create new headers for each newline. This has been fixed in 6.3.0, 5.2.0, and 3.9.0.
Products affected by CVE-2020-5216
- cpe:2.3:a:twitter:secure_headers:*:*:*:*:*:ruby:*:*
- cpe:2.3:a:twitter:secure_headers:*:*:*:*:*:ruby:*:*
- cpe:2.3:a:twitter:secure_headers:*:*:*:*:*:ruby:*:*
Exploit prediction scoring system (EPSS) score for CVE-2020-5216
0.24%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 44 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2020-5216
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
5.0
|
MEDIUM | AV:N/AC:L/Au:N/C:N/I:P/A:N |
10.0
|
2.9
|
NIST | |
5.8
|
MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N |
3.9
|
1.4
|
NIST | |
4.4
|
MEDIUM | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N |
1.3
|
2.7
|
GitHub, Inc. |
CWE ids for CVE-2020-5216
-
The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.Assigned by: nvd@nist.gov (Primary)
-
The product receives data from an HTTP agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes CR and LF characters before the data is included in outgoing HTTP headers.Assigned by: security-advisories@github.com (Secondary)
References for CVE-2020-5216
-
https://github.com/twitter/secure_headers/commit/301695706f6a70517c2a90c6ef9b32178440a2d0
Merge pull request from GHSA-w978-rmpf-qmwg · github/secure_headers@3016957 · GitHubPatch
-
https://github.com/twitter/secure_headers/security/advisories/GHSA-w978-rmpf-qmwg
Limited header injection when using dynamic overrides with user input · Advisory · github/secure_headers · GitHubExploit;Mitigation;Third Party Advisory
Jump to