CVE-2026-54163: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in github secure_headers
secure_headers versions prior to 7.3.0 contain a vulnerability where untrusted input can be injected into Content-Security-Policy (CSP) directives without proper sanitization. This improper neutralization allows attackers to insert malicious CSP directives such as script-src 'unsafe-inline', potentially enabling cross-site scripting (XSS) attacks or CSP report exfiltration. The issue is resolved in version 7.3.0.
AI Analysis
Technical Summary
The secure_headers RubyGem manages security headers with safe defaults but prior to version 7.3.0, it constructs the Content-Security-Policy header by concatenating directives separated by semicolons. Certain methods (build_sandbox_list_directive, build_media_type_list_directive, build_report_to_directive) interpolate caller-supplied strings without sanitizing characters like semicolon, carriage return, or newline. If untrusted input reaches the override_content_security_policy_directives or append APIs for :sandbox, :plugin_types, or :report_to, an attacker can inject additional CSP directives (e.g., script-src 'unsafe-inline' *) before the legitimate ones. This enables XSS reachability or CSP report exfiltration. The vulnerability is fixed in version 7.3.0.
Potential Impact
An attacker able to supply untrusted input to the affected APIs can inject malicious CSP directives, potentially enabling cross-site scripting attacks or leaking CSP reports. The CVSS 3.1 score is 4.7 (medium severity), reflecting network attack vector, high attack complexity, no privileges required, user interaction required, scope changed, and low impact on confidentiality and integrity.
Mitigation Recommendations
Upgrade secure_headers to version 7.3.0 or later, where this vulnerability is fixed. Prior versions improperly sanitize input to CSP directives, allowing injection. No other mitigations are specified or recommended by the vendor.
CVE-2026-54163: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in github secure_headers
Description
secure_headers versions prior to 7.3.0 contain a vulnerability where untrusted input can be injected into Content-Security-Policy (CSP) directives without proper sanitization. This improper neutralization allows attackers to insert malicious CSP directives such as script-src 'unsafe-inline', potentially enabling cross-site scripting (XSS) attacks or CSP report exfiltration. The issue is resolved in version 7.3.0.
CVSS v3.1
Score 4.7medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The secure_headers RubyGem manages security headers with safe defaults but prior to version 7.3.0, it constructs the Content-Security-Policy header by concatenating directives separated by semicolons. Certain methods (build_sandbox_list_directive, build_media_type_list_directive, build_report_to_directive) interpolate caller-supplied strings without sanitizing characters like semicolon, carriage return, or newline. If untrusted input reaches the override_content_security_policy_directives or append APIs for :sandbox, :plugin_types, or :report_to, an attacker can inject additional CSP directives (e.g., script-src 'unsafe-inline' *) before the legitimate ones. This enables XSS reachability or CSP report exfiltration. The vulnerability is fixed in version 7.3.0.
Potential Impact
An attacker able to supply untrusted input to the affected APIs can inject malicious CSP directives, potentially enabling cross-site scripting attacks or leaking CSP reports. The CVSS 3.1 score is 4.7 (medium severity), reflecting network attack vector, high attack complexity, no privileges required, user interaction required, scope changed, and low impact on confidentiality and integrity.
Mitigation Recommendations
Upgrade secure_headers to version 7.3.0 or later, where this vulnerability is fixed. Prior versions improperly sanitize input to CSP directives, allowing injection. No other mitigations are specified or recommended by the vendor.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-rqq5-2gf9-4w4q
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-54163"]
- Ecosystems
- ["RubyGems"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a520eb168715ace438f4ff7
Added to database: 07/11/2026, 09:36:49 UTC
Last enriched: 07/25/2026, 21:00:02 UTC
Last updated: 09/02/2026, 22:52:12 UTC
Views: 131
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.