CVE-2026-33170: rails activesupport · Cross-site Scripting
Affects rails activesupportSource CVE Database V5
Not known to be exploited · CVSS 5.3 Medium · fixed in 8.1.2.1 : update rails activesupport when convenient.
Data as of 30 Oct 2026, 11:52 UTC
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 27% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 8.1.2.1, 8.0.4.1, 7.2.3.1
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 23 Mar 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.
What to do
Upgrade rails activesupport to 8.1.2.1, 8.0.4.1 or 7.2.3.1.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| railsactivesupport | Affected
| Fixed in
|
| railsactivesupport | Affected
| Fixed in
|
| railsactivesupport | Affected
| Fixed in
|
RubyGemsactivesupportpkg:gem/activesupportOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Organizations should immediately upgrade to the patched versions of Rails ActiveSupport: 8.1.2.1 or later, 8.0.4.1 or later, or 7.2.3.1 or later, depending on their current version. If upgrading is not immediately feasible, review and audit any usage of SafeBuffer and string formatting in the application code to identify unsafe patterns, especially where destructive mutations and formatting with untrusted input occur. Implement additional input validation and sanitization on user-supplied data before it reaches formatting functions. Employ Content Security Policy (CSP) headers to mitigate the impact of potential XSS by restricting script execution sources. Conduct thorough testing of web applications to detect any XSS vulnerabilities, including automated scanning and manual penetration testing focused on input handling and output encoding. Monitor security advisories for any emerging exploit reports and apply patches promptly. Avoid relying solely on framework auto-escaping and consider defense-in-depth strategies for output encoding.
Description
Active Support is a toolkit of support libraries and Ruby core extensions extracted from the Rails framework. Prior to versions 8.1.2.1, 8.0.4.1, and 7.2.3.1, `SafeBuffer#%` does not propagate the `@html_unsafe` flag to the newly created buffer. If a `SafeBuffer` is mutated in place (e.g.via `gsub!`) and then formatted with `%` using untrusted arguments, the result incorrectly reports `html_safe? == true`, bypassing ERB auto-escaping and possibly leading to XSS. Versions 8.1.2.1, 8.0.4.1, and 7.2.3.1 contain a patch.
References
- github.com/rails/rails/security/advisories/GHSA-89vf-4333-qx8v (opens in a new tab)
- github.com/rails/rails/commit/50d732af3b7c8aaf63cbcca0becbc00279b215b7 (opens in a new tab)
- github.com/rails/rails/commit/6e8a81108001d58043de9e54a06fca58962fc2db (opens in a new tab)
- github.com/rails/rails/commit/c1ad0e8e1972032f3395853a5e99cea035035beb (opens in a new tab)
- github.com/rails/rails/releases/tag/v7.2.3.1 (opens in a new tab)
- github.com/rails/rails/releases/tag/v8.0.4.1 (opens in a new tab)
- github.com/rails/rails/releases/tag/v8.1.2.1 (opens in a new tab)