Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. secure_headers
  4. ›
  5. CVE-2020-5216

CVE-2020-5216: Injection Vulnerability

January 23, 2020 (updated February 18, 2020)

If user-supplied input is 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.

References

  • nvd.nist.gov/vuln/detail/CVE-2020-5216

Code Behaviors & Features

Detect and mitigate CVE-2020-5216 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 3.9.0, all versions starting from 5.0.0 before 5.2.0, all versions starting from 6.0.0 before 6.3.0

Fixed versions

  • 3.9.0
  • 5.2.0
  • 6.3.0

Solution

Upgrade to versions 3.9.0, 5.2.0, 6.3.0 or above.

Impact 5.8 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

Source file

gem/secure_headers/CVE-2020-5216.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:27 +0000.