CVE-2026-33167 Rails has a possible XSS vulnerability in its Action Pack debug exceptions

Low 1.3 Published Updated

Attackers can inject arbitrary HTML and JavaScript via crafted exception messages in Rails debug pages, affecting developers using default development settings.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-33167?

CVE-2026-33167 is a low-severity cross-site scripting vulnerability in Rubyonrails Rails, published on 23 Mar 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Action Pack is a Rubygem for building web applications on the Rails framework. In versions on the 8.1 branch prior to 8.1.2.1, the debug exceptions page does not properly escape exception messages. A carefully crafted exception message could inject arbitrary HTML and JavaScript into the page, leading to XSS. This affects applications with detailed exception pages enabled (`config.consider_all_requests_local = true`), which is the default in development. Version 8.1.2.1 contains a patch.

Weakness: CWE-79

Which versions are affected by CVE-2026-33167?

2 open source packages ship an affected version, including actionpack. It affects 1 product.

PackageAffectedFixed in
actionpack RubyGemsFrom 8.1.08.1.2.1
actionpack RubyGemsFrom 8.1.08.1.2.1

Products include Rubyonrails Rails.

How do I fix CVE-2026-33167?

Upgrade actionpack to 8.1.2.1 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-33167 being exploited?

There is no known exploitation of CVE-2026-33167 in the wild and no public exploit code.

All Rubyonrails Rails vulnerabilities

Sources

Also known as GHSA-pgm4-439c-5jp6, UBUNTU-CVE-2026-33167.

Is CVE-2026-33167 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free