{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2020-5216","id":"CVE-2020-5216","title":"Limited header injection when using dynamic overrides with user input in RubyGems secure_headers","description":"In Secure Headers (RubyGem secure_headers), a directive injection vulnerability is present in versions before 3.9.0, 5.2.0, and 6.3.0. If user-supplied input was passed into append/override_content_security_policy_directives, a newline could be injected leading to limited header injection. Upon seeing a newline in the header, rails will silently create a new Content-Security-Policy header with the","descriptionLong":"In Secure Headers (RubyGem secure_headers), a directive injection vulnerability is present in versions before 3.9.0, 5.2.0, and 6.3.0. If user-supplied input was passed into append/override_content_security_policy_directives, a newline could be injected leading to limited header injection. Upon seeing a newline in the header, rails will silently create a new Content-Security-Policy header with the remaining value of the original string. It will continue to create new headers for each newline. This has been fixed in 6.3.0, 5.2.0, and 3.9.0.","published":"2020-01-23T02:30:15.000Z","updated":"2026-10-20T10:54:22.386177140Z","reserved":"2020-01-02T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":4.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":4.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":4.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":4.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:P/A:N","rating":"medium","source":"NVD"}],"rating":"medium","products":["Twitter secure_headers"],"affectedProducts":[{"vendor":"Twitter","product":"secure_headers","defaultStatus":null,"versions":[{"status":"affected","version":"< 3.9.0"},{"status":"affected","version":">= 5.0.0, < 5.2.0"},{"status":"affected","version":">= 6.0.0, < 6.3.0"}],"platforms":[]}],"packages":[{"ecosystem":"RubyGems","name":"secure_headers","purl":"pkg:gem/secure_headers","ranges":[">=6.0.0 <6.3.0",">=5.0.0 <5.2.0","<3.9.0"],"fixed":["6.3.0","5.2.0","3.9.0"],"advisory":"GHSA-w978-rmpf-qmwg"}],"cwes":["CWE-113","CWE-74"],"aliases":["GHSA-w978-rmpf-qmwg"],"references":[{"url":"https://github.com/twitter/secure_headers/security/advisories/GHSA-w978-rmpf-qmwg","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Mitigation","Third Party Advisory","evidence","web"]},{"url":"https://github.com/twitter/secure_headers/commit/301695706f6a70517c2a90c6ef9b32178440a2d0","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-5216","tags":["advisory"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/secure_headers/CVE-2020-5216.yml","tags":["web"]},{"url":"https://github.com/twitter/secure_headers","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.01209,"epssPercentile":0.69003,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2020-5216","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-5216","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2020-5216","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-w978-rmpf-qmwg","ok":true,"note":"GHSA-w978-rmpf-qmwg"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2020-5216","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}