Skip to main content

CVE-2024-54133 — Possible Content Security Policy bypass in actionpack

LOW

Possible Content Security Policy bypass in Action Dispatch

Published December 10, 2024Updated March 7, 2025Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (1.65%). Schedule for your next planned update.

Does your project use an affected actionpack version?

Paste your Gemfile.lock to check it for CVE-2024-54133 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my Gemfile.lock

Summary

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 for the report!

Advisory Timeline

  • First published December 10, 2024 (716 days ago).
  • Last revised March 7, 2025 — 86 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update actionpack to 8.0.0.1 or later
gem install actionpack -v 8.0.0.1
Bundler
Update actionpack to 7.1.5.1 or later
gem install actionpack -v 7.1.5.1
Bundler
Update actionpack to 7.2.2.1 or later
gem install actionpack -v 7.2.2.1
Bundler
Update actionpack to 7.0.8.7 or later
gem install actionpack -v 7.0.8.7

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (4)

Affects 1 ecosystem: RubyGems (1).

PackageFixed In
actionpack RubyGems · Affected: 8.0.08.0.0.1
actionpack RubyGems · Affected: 7.1.0, 7.1.1, 7.1.2, 7.1.3 (+8 more)7.1.5.1
actionpack RubyGems · Affected: 7.2.0, 7.2.1, 7.2.1.1, 7.2.1.2 (+1 more)7.2.2.1
actionpack RubyGems · Affected: 5.2.0, 5.2.1, 5.2.1.1, 5.2.1.rc1 (+120 more)7.0.8.7

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 5.7 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
P
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

Frequently Asked Questions

What is CVE-2024-54133?
Possible Content Security Policy bypass in Action Dispatch. This vulnerability has been assigned a severity rating of LOW (CVSS score: 5.7/10).
How do I check if my project is affected by CVE-2024-54133?
CVE-2024-54133 affects actionpack. It has a 1.7% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-54133 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
5.7

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
1.65%
EPSS percentile: 76.9

This places it in the top quartile of EPSS-scored vulnerabilities — 76.9% of tracked vulnerabilities score at or below it, so it is more likely to be exploited than most of the tracked corpus.

Also Known As

GHSA-vfm5-rmrh-j26v
BIT-rails-2024-54133

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Gemfile.lock