{"cve":"CVE-2020-5217","nvd":{"published":"2020-01-23T03:15:10.793","modified":"2026-06-17T03:21:02.700","status":"Modified","description":"In Secure Headers (RubyGem secure_headers), a directive injection vulnerability is present in versions before 3.8.0, 5.1.0, and 6.2.0. If user-supplied input was passed into append/override_content_security_policy_directives, a semicolon could be injected leading to directive injection. This could be used to e.g. override a script-src directive. Duplicate directives are ignored and the first one wins. The directives in secure_headers are sorted alphabetically so they pretty much all come before script-src. A previously undefined directive would receive a value even if SecureHeaders::OPT_OUT was supplied. The fixed versions will silently convert the semicolons to spaces and emit a deprecation warning when this happens. This will result in innocuous browser console messages if being exploited/accidentally used. In future releases, we will raise application errors resulting in 500s. Depending on what major version you are using, the fixed versions are 6.2.0, 5.1.0, 3.8.0.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N","score":5.8},"cwes":["CWE-74","CWE-95"],"references":["https://github.com/twitter/secure_headers/commit/936a160e3e9659737a9f9eafce13eea36b5c9fa3","https://github.com/twitter/secure_headers/issues/418","https://github.com/twitter/secure_headers/pull/421","https://github.com/twitter/secure_headers/security/advisories/GHSA-xq52-rv6w-397c","https://github.com/twitter/secure_headers/commit/936a160e3e9659737a9f9eafce13eea36b5c9fa3"],"products":["twitter:secure_headers"],"source":"nvd","synced_at":"2026-10-19T21:01:01.339895972+00:00"},"epss":{"cve":"CVE-2020-5217","score":0.0183,"percentile":0.78862,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-xq52-rv6w-397c","url":"https://osv.dev/vulnerability/GHSA-xq52-rv6w-397c","summary":"Directive injection when using dynamic overrides with user input","modified":"2026-09-10T03:48:42.355222123Z","packages":[{"ecosystem":"RubyGems","name":"secure_headers","purl":"pkg:gem/secure_headers","ranges":[">=6.0.0 <6.2.0"],"fixed":["6.2.0"]},{"ecosystem":"RubyGems","name":"secure_headers","purl":"pkg:gem/secure_headers","ranges":[">=5.0.0 <5.1.0"],"fixed":["5.1.0"]},{"ecosystem":"RubyGems","name":"secure_headers","purl":"pkg:gem/secure_headers","ranges":["<3.8.0"],"fixed":["3.8.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}