CVE-2020-5216 json
Limited header injection when using dynamic overrides with user input in RubyGems secure_headers
published 6y ago modified 4mo ago also GHSA-w978-rmpf-qmwg , EUVD-2020-0281
- cvss
- 4.4
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.2%
- EPSS 1.2% chance of exploitation in 30 days, percentile 68%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- rubygems secure_headers 3.9.0, 5.2.0, 6.3.0
- twitter secure_headers 3.9.0, 5.2.0, 6.3.0
- tfm satellite capsule 6.8, satellite 6.8 6.1-1.el7sat
- kobo satellite capsule 6.8, satellite 6.8 0.5.1-1.el7sat
- pulp satellite capsule 6.8, satellite 6.8 2.21.3-1.el7sat
- gofer satellite capsule 6.8, satellite 6.8 2.12.5-7.el7sat
- future satellite capsule 6.8, satellite 6.8 0.16.0-11.el7sat
- ostree satellite capsule 6.8, satellite 6.8 2017.1-2.atomic.el7
- foreman satellite capsule 6.8, satellite 6.8 2.1.2.19-1.el7sat
- katello satellite capsule 6.8, satellite 6.8 3.16.0-1.el7sat
red hat advisories RHSA-2020:4366
Is CVE-2020-5216 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2020-5216 updated cvss 5.8
rubygem-secure_headers: limited header injection when using dynamic overrides with user input
-
Red Hat CloudForms Management Engine 5 cfme-gemsetaffected: no fix planned “Will not fix”
-
Red Hat Satellite 6.8 tfm 6.1-1.el7sat, kobo 0.5.1-1.el7sat, pulp 2.21.3-1.el7sat, gofer 2.12.5-7.el7sat, receptor 0.6.3-1.el7ar, future 0.16.0-11.el7sat, +492 more Red Hat Satellite Capsule 6.8 tfm 6.1-1.el7sat, kobo 0.5.1-1.el7sat, pulp 2.21.3-1.el7sat, gofer 2.12.5-7.el7sat, future 0.16.0-11.el7sat, katello 3.16.0-1.el7sat, +246 morefixed: vendor fix RHSA-2020:4366
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.21% chance of exploitation in the next 30 days, higher than 68% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- github.com https://github.com/twitter/secure_headers/security/advisories/GHSA-w978-rmpf-qmwg referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 4.4 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N |
| NVD | 3.1 | 5.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
| GitHub | 3.1 | 4.4 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | secure_headers | >=6.0.0, <6.3.0 >=5.0.0, <5.2.0 <3.9.0 |
6.3.0 5.2.0 3.9.0 |
Affected products
- Twitter secure_headers
Classification
References
-
github.com
/twitter/secure_headers/commit/301695706f6a70517c2a90c6ef9b32178440a2d0
web, patch
-
github.com
/twitter/secure_headers/security/advisories/GHSA-w978-rmpf-qmwg
web, exploit, mitigation, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2020-5216
advisory
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/secure_headers/CVE-2020-5216.yml
web
-
github.com
/twitter/secure_headers
package
Sources
- CVE List CVE-2020-5216
- GitHub Advisory GHSA-w978-rmpf-qmwg
- NVD CVE-2020-5216
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.