{"schema":"/api/v1/schema/cve.json","api_version":"1","id":"CVE-2020-5217","published":"2020-01-23T03:15:10.793000Z","last_modified":"2026-06-17T03:21:02.700000Z","status":"Modified","cvss":{"version":"3.1","score":5.8,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N","source":"nvd@nist.gov","primary":true},"auth":false,"cwes":["CWE-95","CWE-74"],"cpes":[{"criteria":"cpe:2.3:a:twitter:secure_headers:*:*:*:*:*:ruby:*:*","part":"a","vendor":"twitter","product":"secure_headers","version_end_excluding":"3.8.0"},{"criteria":"cpe:2.3:a:twitter:secure_headers:*:*:*:*:*:ruby:*:*","part":"a","vendor":"twitter","product":"secure_headers","version_start_including":"5.0.0","version_end_excluding":"5.1.0"},{"criteria":"cpe:2.3:a:twitter:secure_headers:*:*:*:*:*:ruby:*:*","part":"a","vendor":"twitter","product":"secure_headers","version_start_including":"6.0.0","version_end_excluding":"6.2.0"}],"cpes_truncated":false,"vendors":["twitter"],"products":["twitter/secure_headers"],"epss":{"score":0.0183,"percentile":0.79417,"date":"2026-11-28","model_version":"v2026.06.15"},"cat":"app","platform":"multi","eol":false,"packages":[{"advisory":"GHSA-xq52-rv6w-397c","ecosystem":"RubyGems","name":"secure_headers","purl":"pkg:gem/secure_headers","ranges":[{"introduced":"6.0.0","fixed":"6.2.0"}],"versions":["6.0.0","6.1.0","6.1.1","6.1.2"],"versions_truncated":false},{"advisory":"GHSA-xq52-rv6w-397c","ecosystem":"RubyGems","name":"secure_headers","purl":"pkg:gem/secure_headers","ranges":[{"introduced":"5.0.0","fixed":"5.1.0"}],"versions":["5.0.1","5.0.2","5.0.3","5.0.4","5.0.5"],"versions_truncated":false},{"advisory":"GHSA-xq52-rv6w-397c","ecosystem":"RubyGems","name":"secure_headers","purl":"pkg:gem/secure_headers","ranges":[{"introduced":"0","fixed":"3.8.0"}],"versions":["0.1.0","0.1.1","0.2.0","0.2.1","0.3.0","0.4.0","0.4.1","0.4.2","0.4.3","0.5.0","1.0.0","1.1.0","1.1.1","1.2.0","1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.4.0","1.4.1","2.0.0","2.0.0.pre","2.0.0.pre2","2.0.1","2.0.2","2.1.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","2.5.0","2.5.1","2.5.2","2.5.3","3.0.0","3.0.0.pre","3.0.0.pre1","3.0.0.pre2","3.0.0.pre3","3.0.0.rc1","3.0.1","3.0.2","3.0.3","3.1.0","3.1.1","3.1.2","3.2.0","3.3.0","3.3.1","3.3.2","3.4.0","3.4.1","3.5.0","3.5.0.pre","3.5.1","3.6.0","3.6.1","3.6.2","3.6.3","3.6.4","3.6.5","3.6.6","3.6.7","3.7.0","3.7.1","3.7.2","3.7.3","3.7.4"],"versions_truncated":false}],"severity":"medium","priority_score":50,"links":{"html_es":"/es/cve/CVE-2020-5217/","html_en":"/en/cve/CVE-2020-5217/","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2020-5217","cve_org":"https://www.cve.org/CVERecord?id=CVE-2020-5217"},"untrusted":{"vendor_name":"Twitter","product_name":"Secure Headers","desc_en":"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.","affected":[{"untrusted_vendor":"Twitter","untrusted_product":"secure_headers","versions":[]}],"references":[{"url":"https://github.com/twitter/secure_headers/commit/936a160e3e9659737a9f9eafce13eea36b5c9fa3","tags":["Patch"]},{"url":"https://github.com/twitter/secure_headers/issues/418","tags":["Exploit","Third Party Advisory"]},{"url":"https://github.com/twitter/secure_headers/pull/421","tags":["Third Party Advisory"]},{"url":"https://github.com/twitter/secure_headers/security/advisories/GHSA-xq52-rv6w-397c","tags":["Mitigation","Third Party Advisory"]}]}}