CVE-2026-33167 Rails has a possible XSS vulnerability in its Action Pack debug exceptions
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.
| Package | Affected | Fixed in |
|---|---|---|
actionpack RubyGems | From 8.1.0 | 8.1.2.1 |
actionpack RubyGems | From 8.1.0 | 8.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.
Other vulnerabilities in Rubyonrails Rails
- CVE-2013-0277 Active Record contains deserialization of arbitrary YAML
- CVE-2017-17916 SQL injection in n/a
- CVE-2017-17917 SQL injection in n/a
- CVE-2026-33195 Rails Active Storage has possible Path Traversal in DiskService
- CVE-2024-26142 Rails possible ReDoS vulnerability in Accept header parsing in Action Dispatch
Sources
Also known as GHSA-pgm4-439c-5jp6, UBUNTU-CVE-2026-33167.