CVE-2026-54163: secure_headers: CSP directive injection via sandbox, plugin_types, and report_to when given untrusted input
Vulnerability summary
CVE-2026-54163 is a medium (CVSS 4.7) vulnerability in github secure_headers. EPSS estimates a 0.21% chance of exploitation in the next 30 days, higher than 12.4% of scored vulnerabilities.
Not severe (CVSS 4.7, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 17-07-2026PublishedVulnerability first disclosed.
- 20-07-2026Last modifiedVulnerability information updated.
Description
secure_headers manages application of security headers with many safe defaults. Prior to 7.3.0, secure_headers builds the Content-Security-Policy value by stitching directives with ; separators, and build_sandbox_list_directive, build_media_type_list_directive, and build_report_to_directive interpolate caller-supplied strings without scrubbing ;, \r, or \n. When untrusted input reaches SecureHeaders.override_content_security_policy_directives or append APIs for :sandbox, :plugin_types, or :report_to, an attacker can inject a CSP directive such as script-src 'unsafe-inline' * before the legitimate script-src, enabling XSS reachability through these sinks or CSP report exfiltration. This issue is fixed in version 7.3.0.
CVSS metrics
5 scores · 5 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated4.7MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
- OSV · DebianEcosystem advisory · calculated4.7MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
- OSV · RubygemsEcosystem advisory · calculated4.7MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
- NVDNIST4.7MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS trend
Probability
0.21%
Chance of exploitation in the next 30 days
Percentile
12%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.21% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-79Improper Neutralization of Input During Web Page GenerationThe product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
- CWE-113Improper Neutralization of CRLF Sequences in HTTP HeadersThe 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.
Affected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Debian1 product
- ruby-secure-headersAll versions (No fix recorded) | < 7.3.0-1
Github1 product
- secure_headers< 7.3.0
RubyGems1 product
- secure_headers< 7.3.0
Ubuntu1 product
- ruby-secure-headersAll versions (No fix recorded)
4 vendors · 4 products
References
9 links- github.com/github/secure_headers/security/advisories/GHSA-rqq5-2gf9-4w4qX Refsource CONFIRMREPORTWEB
- github.com/github/secure_headers/releases/tag/v7.3.0X Refsource MISC