CSP weakening via unescaped directive semicolons
Published Jan 23, 2020 · Updated Aug 4, 2024
Directive injection in Twitter secure_headers before 3.8.0, 5.0.0 through 5.0.5, and 6.0.0 through 6.1.2 allows attackers to weaken CSP. The append_content_security_policy_directives and override_content_security_policy_directives paths serialize untrusted values without neutralizing semicolons, allowing a value to start a new directive. Exploitation requires a consuming application to pass attacker-controlled input into either API; an injected directive can supersede an intended script-src policy or enable a directive marked OPT_OUT.
Summary
What happened
Directive injection in Twitter secure_headers before 3.8.0, 5.0.0 through 5.0.5, and 6.0.0 through 6.1.2 allows attackers to weaken CSP. The append_content_security_policy_directives and override_content_security_policy_directives paths serialize untrusted values without neutralizing semicolons, allowing a value to start a new directive. Exploitation requires a consuming application to pass attacker-controlled input into either API; an injected directive can supersede an intended script-src policy or enable a directive marked OPT_OUT.
The record
- CVE
- CVE-2020-5217
- Published
- Jan 23, 2020
- Updated
- Aug 4, 2024
- Vendor
- Product
- secure_headers
- Classifications
- CWE-74, CWE-95
- Attack vector
- network
- Privileges
- authenticated
Timeline
How it unfolded
- Jan 23, 2020CVE publishedPublication date reported by the CVE source.
- Aug 4, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=< 3.8.0
- Affected versionversion=>= 5.0.0, < 5.1.0
- Affected versionversion=>= 6.0.0, < 6.2.0
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- CSP directive injection demonstrationproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo