5.8

CVE-2020-5216: Limited header injection when using dynamic overrides with user input in RubyGems secure_headers

Modified
AliasesUBUNTU-CVE-2020-5216DEBIAN-CVE-2020-5216GHSA-w978-rmpf-qmwg
Published 23-01-2020Last modified 04-08-2024

Vulnerability summary

CVE-2020-5216 is a medium (CVSS 5.8) vulnerability in twitter secure_headers. EPSS estimates a 1.21% chance of exploitation in the next 30 days, higher than 68.4% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Routine

Not severe (CVSS 4.4, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
5.8/10
010
Medium · v3.1 (NVD)
EPSS score
1.21%
0%100%
Low · +0.13 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1github

Advisory lineage

Upstream 0 · Downstream 1

Timeline

  1. 23-01-2020
    PublishedVulnerability first disclosed.
  2. 04-08-2024
    Last modifiedVulnerability information updated.

Description

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.

CVSS metrics

6 scores · 5 sources · 2 versions

EPSS trend

Probability

1.21%

Chance of exploitation in the next 30 days

Percentile

68%

Versus all other CVEs

30-day change

Increase +0.13 pp

From 1.08% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • githubUnverified

    Secure Headers

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, low-privilege account, user interaction (CVSS vector). Other conditions: not stated in public data.

Debian1 product
  • ruby-secure-headers< 6.3.1-1
RubyGems1 product
  • secure_headers≥ 6.0.0, < 6.3.0 | ≥ 5.0.0, < 5.2.0 | < 3.9.0
Twitter1 product
Ubuntu1 product
  • ruby-secure-headersAll versions (No fix recorded)

4 vendors · 4 products

References

8 links