{"id":"CVE-2020-5217","details":"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.","aliases":["GHSA-xq52-rv6w-397c"],"modified":"2026-04-10T04:27:35.881840Z","published":"2020-01-23T03:15:10.793Z","related":["GHSA-xq52-rv6w-397c"],"references":[{"type":"ADVISORY","url":"https://github.com/twitter/secure_headers/pull/421"},{"type":"ADVISORY","url":"https://github.com/twitter/secure_headers/security/advisories/GHSA-xq52-rv6w-397c"},{"type":"FIX","url":"https://github.com/twitter/secure_headers/commit/936a160e3e9659737a9f9eafce13eea36b5c9fa3"},{"type":"EVIDENCE","url":"https://github.com/twitter/secure_headers/issues/418"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/github/secure_headers","events":[{"introduced":"0"},{"fixed":"0c8f0968f292ef699ac997b2085fe8ca6e87e621"},{"introduced":"0"},{"fixed":"40e45a1a69362f8839d34e0fe16a5750330f4c5f"},{"introduced":"eb9af0be9ec9447ddfffd89f4d2ca8ccd350bbd3"},{"fixed":"1298905068931621a2c1988b175a1da186bcd641"},{"fixed":"936a160e3e9659737a9f9eafce13eea36b5c9fa3"}],"database_specific":{"versions":[{"introduced":"0"},{"fixed":"3.8.0"},{"introduced":"5.0.0"},{"fixed":"5.1.0"},{"introduced":"6.0.0"},{"fixed":"6.2.0"}]}}],"versions":["2.0.0","2.2.0","2.2.1","2.2.2","2.2.3","2.2.4","2.3.0","2.4.0","2.4.1","2.4.2","2.4.3","2.4.4","v.2.0.0.pre2","v0.4.2","v0.4.3","v1.1.1","v1.3.2","v1.3.3","v1.3.4","v2.0.0.pre","v2.0.1","v2.0.2","v2.1.0","v3.0.0","v3.0.0.rc1","v3.0.1","v3.0.2","v3.0.3","v3.1.0","v3.1.1","v3.1.2","v3.2.0","v3.3.0","v3.3.1","v3.3.2","v3.4.0","v3.4.1","v3.5.0","v3.5.0.pre","v3.5.1","v3.6.0","v3.6.1","v3.6.3","v3.6.4","v3.6.5","v3.6.7","v3.7.0","v3.7.1","v3.7.2","v3.7.3","v3.7.4","v4.0.0","v4.0.0.alpha01","v4.0.0.alpha02","v4.0.0.alpha03","v4.0.0.alpha04","v4.0.1","v5.0.0.alpha01","v5.0.1","v5.0.2","v5.0.3","v5.0.4","v5.0.5","v6.0.0.alpha01","v6.0.0.alpha02","v6.0.0.alpha03","v6.1.0","v6.1.1","v6.1.2"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2020-5217.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N"}]}