CVE-2026-128069: rails-html-sanitizer Cross-Site Scripting Vulnerability
MODERATECVE-2026-128069 is a MODERATE (CVSS 4.7) cross-site scripting vulnerability (CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')) affecting rails-html-sanitizer libraries in the RubyGems ecosystem. The issue involves possible xss via shared scrubber state in concurrent calls. Remediation is available by upgrading affected packages to version 1.7.2.
CVE-2026-128069 at a Glance
Security Impact
CVSS: 4.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2026-128069
To remediate this vulnerability, upgrade all affected rails-html-sanitizer 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 rails-html-sanitizer to 1.7.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for rails-html-sanitizer
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-128069, inspect your project dependencies for rails-html-sanitizer:
inspect dependencies for rails-html-sanitizer
Analyze the terminal output to locate any version of rails-html-sanitizer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.7.2), 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-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition'), where the product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently. In rails-html-sanitizer, 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-128069 Affected rails-html-sanitizer Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rails-html-sanitizer
|
RubyGems |
< 1.7.2
|
1.7.2
|
References
Frequently Asked Questions
What is CVE-2026-128069?
Which rails-html-sanitizer versions are affected?
What version fixes CVE-2026-128069?
Is rails-html-sanitizer affected?
What is the CVSS score of CVE-2026-128069?
What CWE is associated with CVE-2026-128069?
How can I check RubyGems dependencies for CVE-2026-128069?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h7wh-q2qr-458c",
"modified" : "2026-11-13T18:09:16Z",
"published" : "2026-11-13T18:09:16Z",
"aliases" : [ "CVE-2026-128069" ],
"summary" : "rails-html-sanitizer: Possible XSS via shared scrubber state in concurrent calls",
"details" : "## Summary\n\n`Rails::HTML::SafeListSanitizer` (both the HTML4 and HTML5 variants) shares one `Rails::HTML::PermitScrubber` across every `sanitize` call on the same instance, assigning its `tags` and `attributes` on each call without synchronization. Two concurrent `sanitize` calls with different `tags:` or `attributes:` options can interleave, so one call is scrubbed with the other call's allowlist.\n\n- Versions affected: `< 1.7.2`\n- Not affected: none\n- Fixed versions: `1.7.2`\n\n## Impact\n\nAction View memoizes a single `SafeListSanitizer` per helper module and uses it for every `sanitize` call in the process, so in a multi-threaded server (for example Puma) all requests share the same `PermitScrubber`. If any code path calls `sanitize` with a more permissive allowlist, an attacker who can trigger that path concurrently with another request can cause the other request to be sanitized with the permissive allowlist. If the permissive allowlist admits `script` or an event-handler attribute, the strict call emits it unchanged, which is a cross-site scripting vector when the strict output is stored or rendered to other users.\n\nApplications are affected only if they run more than one thread per process and some `sanitize` call passes `tags:` or `attributes:` options that differ from another call's, including a call that passes no options and so uses the defaults. Applications that use a single configuration everywhere, pass their own `scrubber:`, or run single-threaded are not affected.\n\n## Workarounds\n\nUse the same allowlist for every `sanitize` call, or pass a `scrubber:` built per call (`Rails::HTML::PermitScrubber.new` with `tags=` and `attributes=` set) instead of `tags:` and `attributes:` options.\n\n## Credit\n\nReported by hiumee via HackerOne.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rails-html-sanitizer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.7.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-h7wh-q2qr-458c"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails-html-sanitizer/issues/228"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails-html-sanitizer/commit/15f764c3563d5dd9b97ad32eaa7454577ccec4b9"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rails/rails-html-sanitizer"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails-html-sanitizer/releases/tag/v1.7.2"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/GHSA-h7wh-q2qr-458c.yml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-362", "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-11-13T18:09:16Z",
"nvd_published_at" : null
}
}