CVE Catalog

CVE-2026-33170

MediumCVSS 6.1
Published: Updated: Translated: NVD NIST

Summary

In Active Support (Ruby on Rails), 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.

Risk Assessment

May allow an attacker to inject script (XSS) in Rails applications that format mutated SafeBuffer with untrusted data.

Recommendation

Update the Active Support gem to version 8.1.2.1, 8.0.4.1, or 7.2.3.1 (or later).

Other vulnerabilities in Active Support

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS