Skip to content
Heist/ feed
Back to feed
MediumFix available

ruby-secure-headers — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2020-5216

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.

Products
ruby-secure-headers
Affected versions
Not specified
Fixed versions
6.3.1-1
CVEs
CVE-2020-5216
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 14:03 UTC · Revision 1

Source evidence

DEBIAN-CVE-2020-5216

core-osv · Original source

Published 23 Jan 2020, 03:15 UTC

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.

osv:DEBIAN-CVE-2020-5216

ruby-secure-headers

Fixed versions: 6.3.1-1

ruby-secure-headers

Fixed versions: 6.3.1-1

ruby-secure-headers

Fixed versions: 6.3.1-1

Complete source record
{
  "id": "07d53595d43b5fb02242803ff5b8bb24c4df35abc42bebfee347e7c86e709de2",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2020-5216",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2020-5216",
    "summary": "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.",
    "evidence": "osv:DEBIAN-CVE-2020-5216",
    "products": [
      {
        "name": {
          "value": "ruby-secure-headers",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.3.1-1",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "ruby-secure-headers",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.3.1-1",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "ruby-secure-headers",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.3.1-1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "DEBIAN-CVE-2020-5216",
      "aliases": [
        "DEBIAN-CVE-2020-5216"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "6.3.1-1"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-secure-headers",
            "purl": "pkg:deb/debian/ruby-secure-headers?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2020-5216.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "6.3.1-1"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-secure-headers",
            "purl": "pkg:deb/debian/ruby-secure-headers?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2020-5216.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "6.3.1-1"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-secure-headers",
            "purl": "pkg:deb/debian/ruby-secure-headers?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2020-5216.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-26T12:02:49.709708545Z",
      "provider": "osv",
      "upstream": [
        "CVE-2020-5216"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2020-5216"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2020-5216",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 453096,
  "published_at": "2020-01-23T03:15:10.683+00:00"
}