CVE-2024-54133: Actionpack Possible Content Security Policy Bypass Vulnerability

LOW
Advisory Identifier: GHSA-vfm5-rmrh-j26v
CWE-79
Published
Advisory Summary

CVE-2024-54133 is a LOW possible content security policy bypass vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Actionpack libraries in the RubyGems ecosystem. The issue involves possible content security policy bypass in action dispatch. Remediation is available by upgrading affected packages to version 7.0.8.7, 7.1.5.1, 7.2.2.1, 8.0.0.1.

CVE-2024-54133 at a Glance

CVE Identifier CVE-2024-54133
GHSA Identifier GHSA-vfm5-rmrh-j26v
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Actionpack
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2024-54133

To remediate this vulnerability, upgrade all affected Actionpack dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

actionpack fixed: 7.0.8.7
Upgrade actionpack to 7.0.8.7
actionpack fixed: 7.1.5.1
Upgrade actionpack to 7.1.5.1
actionpack fixed: 7.2.2.1
Upgrade actionpack to 7.2.2.1
actionpack fixed: 8.0.0.1
Upgrade actionpack to 8.0.0.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for actionpack

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-54133, inspect your project dependencies for Actionpack:

inspect dependencies for actionpack

Analyze the terminal output to locate any version of Actionpack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.0.8.7), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Actionpack, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

There is a possible Cross Site Scripting (XSS) vulnerability in the `content_security_policy` helper in Action Pack. Impact ------ Applications which set Content-Security-Policy (CSP) headers dynamically from untrusted user input may be vulnerable to carefully crafted inputs being able to inject new directives into the CSP. This could lead to a bypass of the CSP and its protection against XSS and other attacks. Releases -------- The fixed releases are available at the normal locations. Workarounds ----------- Applications can avoid setting CSP headers dynamically from untrusted input, or can validate/sanitize that input. Credits ------- Thanks to [ryotak](https://hackerone.com/ryotak) for the report!

CVE-2024-54133 Affected Actionpack Versions

4 component(s)
Fixed Versions:
7.0.8.77.1.5.17.2.2.18.0.0.1
Product / Package Ecosystem Affected Versions Fixed Version
actionpack
RubyGems
≥ 5.2.0
< 7.0.8.7
7.0.8.7
actionpack
RubyGems
≥ 7.1.0
< 7.1.5.1
7.1.5.1
actionpack
RubyGems
≥ 7.2.0
< 7.2.2.1
7.2.2.1
actionpack
RubyGems
≥ 8.0.0
< 8.0.0.1
8.0.0.1

References

Frequently Asked Questions

What is CVE-2024-54133?
CVE-2024-54133 is a security vulnerability in Actionpack involving Possible Content Security Policy bypass in Action Dispatch under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Actionpack versions are affected?
Affected versions include releases prior to 7.0.8.7, 7.1.5.1, 7.2.2.1, 8.0.0.1 across affected packages: actionpack.
What version fixes CVE-2024-54133?
Upgrading to 7.0.8.7, 7.1.5.1, 7.2.2.1, 8.0.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is actionpack affected?
Yes, actionpack is affected in releases prior to 7.0.8.7, 7.1.5.1, 7.2.2.1, 8.0.0.1. Upgrade your dependency to 7.0.8.7, 7.1.5.1, 7.2.2.1, 8.0.0.1 or later.
What CWE is associated with CVE-2024-54133?
CVE-2024-54133 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check RubyGems dependencies for CVE-2024-54133?
Run the dependency tree command: 'inspect dependencies for actionpack'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vfm5-rmrh-j26v",
  "modified" : "2025-03-07T03:31:32Z",
  "published" : "2024-12-10T22:42:27Z",
  "aliases" : [ "CVE-2024-54133" ],
  "summary" : "Possible Content Security Policy bypass in Action Dispatch",
  "details" : "There is a possible Cross Site Scripting (XSS) vulnerability  in the `content_security_policy` helper in Action Pack.\n\nImpact\n------\nApplications which set Content-Security-Policy (CSP) headers dynamically from untrusted user input may be vulnerable to carefully crafted inputs being able to inject new directives into the CSP. This could lead to a bypass of the CSP and its protection against XSS and other attacks.\n\nReleases\n--------\nThe fixed releases are available at the normal locations.\n\nWorkarounds\n-----------\nApplications can avoid setting CSP headers dynamically from untrusted input, or can validate/sanitize that input.\n\nCredits\n-------\nThanks to [ryotak](https://hackerone.com/ryotak) for the report!",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "actionpack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.2.0"
      }, {
        "fixed" : "7.0.8.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "actionpack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.1.0"
      }, {
        "fixed" : "7.1.5.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "actionpack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.2.0"
      }, {
        "fixed" : "7.2.2.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "actionpack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0"
      }, {
        "fixed" : "8.0.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/rails/rails/security/advisories/GHSA-vfm5-rmrh-j26v"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-54133"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rails/rails/commit/2e3f41e4538b9ca1044357f6644f037bbb7c6c49"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rails/rails/commit/3da2479cfe1e00177114b17e496213c40d286b3a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rails/rails/commit/5558e72f22fc69c1c407b31ac5fb3b4ce087b542"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rails/rails/commit/cb16a3bb515b5d769f73926d9757270ace691f1d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rails/rails"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2024-54133.yml"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20250306-0010"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-12-10T22:42:27Z",
    "nvd_published_at" : "2024-12-10T23:15:06Z"
  }
}