Limited header injection when using dynamic overrides with user input in RubyGems secure_headers
CVE-2020-5216GHSA-w978-rmpf-qmwg
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (secure_headers 6.3.0, 5.2.0, 3.9.0), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
RubyGems secure_headers
- Affected
- >= 6.0.0, < 6.3.0>= 5.0.0, < 5.2.0< 3.9.0
- Fixed in
- 3.9.0, 6.3.0, 5.2.0
Sources
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-w978-rmpf-qmwg lists affected ranges: RubyGems secure_headers >=6.0.0 =5.0.0 =0 <3.9.0
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS
- 4.4 · CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
- EPSS
- CVE-2020-5216: 1.21% estimated exploitation activity in the next 30 days; percentile 68.43 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description
As published by the source; long descriptions are shortened.
Impact If user-supplied input was passed into append/overridecontentsecuritypolicydirectives, 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. e.g. would result in CSP supports multiple headers and all policies must be satisfied for execution to occur, but a malicious value that reports the current page is fairly trivial: Patches This has been fixed in 6.3.0, 5.2.0, and 3.9.0 Workarounds References https://github.com/twitter/secureheaders/security/advisories/GHSA-xq52-rv6w-397c The effect of multiple policies For more information If you have any questions or comments about this advisory: Open an issue in this repo DM us at @ndm on twitter
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 1 · created ·
Published from ghsa record GHSA-w978-rmpf-qmwg
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: CVE-2020-5216 Advisory: Limited header injection when using dynamic overrides with user input in RubyGems secure_headers IDs: CVE-2020-5216, GHSA-w978-rmpf-qmwg Record: https://patchnext.com/advisories/cve-2020-5216 (revision 1, source checked 26 Oct 2026, 15:47 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: Medium (CVSS 4.4) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: secure_headers 6.3.0, 5.2.0, 3.9.0. A vendor fix does not mean a deployment is fixed. ## Affected components - RubyGems secure_headers: affected >= 6.0.0, < 6.3.0; >= 5.0.0, < 5.2.0; < 3.9.0; fixed in 3.9.0, 6.3.0, 5.2.0 ## Suggested inspection (read-only) - RubyGems secure_headers: check the installed version with your package manager. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on secure_headers. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://github.com/advisories/GHSA-w978-rmpf-qmwg (GitHub-reviewed advisory GHSA-w978-rmpf-qmwg lists affected ranges: RubyGems secure_headers >=6.0.0 =5.0.0 =0 <3.9.0) Commands are suggestions: review each one before running it.
Loading voting…