CVE-2026-33170: Activesupport Cross-Site Scripting Vulnerability
MODERATECVE-2026-33170 is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Activesupport libraries in the RubyGems ecosystem. The issue involves rails active support has a possible xss vulnerability in safebuffer#%. Remediation is available by upgrading affected packages to version 8.1.2.1, 8.0.4.1, 7.2.3.1.
CVE-2026-33170 at a Glance
How to Fix CVE-2026-33170
To remediate this vulnerability, upgrade all affected Activesupport dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade activesupport to 8.1.2.1
Upgrade activesupport to 8.0.4.1
Upgrade activesupport to 7.2.3.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for activesupport
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-33170, inspect your project dependencies for Activesupport:
inspect dependencies for activesupport
Analyze the terminal output to locate any version of Activesupport in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.1.2.1), 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 Activesupport, 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
CVE-2026-33170 Affected Activesupport Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
activesupport
|
RubyGems |
≥ 8.1.0.beta1
< 8.1.2.1
|
8.1.2.1
|
|
activesupport
|
RubyGems |
≥ 8.0.0.beta1
< 8.0.4.1
|
8.0.4.1
|
|
activesupport
|
RubyGems |
< 7.2.3.1
|
7.2.3.1
|
References
Frequently Asked Questions
What is CVE-2026-33170?
Which Activesupport versions are affected?
What version fixes CVE-2026-33170?
Is activesupport affected?
What CWE is associated with CVE-2026-33170?
How can I check RubyGems dependencies for CVE-2026-33170?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-89vf-4333-qx8v",
"modified" : "2026-05-13T16:15:43Z",
"published" : "2026-03-23T20:53:28Z",
"aliases" : [ "CVE-2026-33170" ],
"summary" : "Rails Active Support has a possible XSS vulnerability in SafeBuffer#%",
"details" : "### Impact\n`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.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\n### Credit\nThis issue was responsibly reported by @ch4n3-yoon",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "activesupport"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.1.0.beta1"
}, {
"fixed" : "8.1.2.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "activesupport"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0.beta1"
}, {
"fixed" : "8.0.4.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "activesupport"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.2.3.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rails/rails/security/advisories/GHSA-89vf-4333-qx8v"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33170"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails/commit/50d732af3b7c8aaf63cbcca0becbc00279b215b7"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails/commit/6e8a81108001d58043de9e54a06fca58962fc2db"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails/commit/c1ad0e8e1972032f3395853a5e99cea035035beb"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rails/rails"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails/releases/tag/v7.2.3.1"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails/releases/tag/v8.0.4.1"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails/releases/tag/v8.1.2.1"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activesupport/CVE-2026-33170.yml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-23T20:53:28Z",
"nvd_published_at" : "2026-03-24T00:16:28Z"
}
}