secure_headers vulnerabilities

Add easily configured security headers to responses including content-security-policy, x-frame-options, strict-transport-security, etc.

Registry
RubyGems
Latest
7.3.0
License
MIT

3 known advisories

The latest version, 7.3.0, is not affected by any of them. Projects on older versions may be.

Update to the latest version:bundle update --conservative secure_headers # Gemfile: '>= 7.3.0'

Is your project on an affected secure_headers?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Security advisories for secure_headers

  • MediumCVE-2026-54163GHSA-rqq5-2gf9-4w4q10 Jul 2026

    Secure Headers: CSP directive injection via sandbox, plugin_types, and report_to when given untrusted input

    Affected
    <7.3.0
    Fixed in
    7.3.0
  • MediumCVE-2020-5217GHSA-xq52-rv6w-397c23 Jan 2020

    Directive injection when using dynamic overrides with user input

    Affected
    >=6.0.0 <6.2.0 · >=5.0.0 <5.1.0 · <3.8.0
    Fixed in
    3.8.0, 5.1.0, 6.2.0
  • MediumCVE-2020-5216GHSA-w978-rmpf-qmwg23 Jan 2020

    Limited header injection when using dynamic overrides with user input in RubyGems secure_headers

    Affected
    >=6.0.0 <6.3.0 · >=5.0.0 <5.2.0 · <3.9.0
    Fixed in
    3.9.0, 5.2.0, 6.3.0

Is your secure_headers version vulnerable?

Which of your client projects still run an old secure_headers?

NPMscan reads the Gemfile.lock in every GitHub repo you pick and checks each installed version against these advisories, including the packages your packages pull in. Each finding comes with the command that fixes it.

Other RubyGems packages

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily. Package details from the RubyGems registry.