Technical impact
This vulnerability allows an attacker to inject malicious code by feeding untrusted input to the strip_tags helper in Rails Action View. Because the helper labels its output as html_safe but only escapes &, <, and > without encoding double‑quote and single‑quote, input placed inside a quoted attribute can break out of the attribute and inject new attributes or scripts, leading to XSS. The flaw is a classic input validation issue (CWE-79).
Affected Systems
Ruby on Rails applications running Rails 8.0.x before version 8.0.5.2 or Rails 8.1.x before version 8.1.4.1 are affected. Any application that renders output from strip_tags directly into HTML attribute values, such as title attributes or meta content tags, is at risk; rendering the output inside element content is not impacted.
Risk and Exploitability
The CVSS score of 6.1 indicates moderate severity, and the EPSS score of less than 1% suggests a low probability of exploitation at present. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires an attacker to supply malicious input that is processed by strip_tags and rendered unescaped in a quoted attribute, a typical web application attack vector. Once executed, the attacker can inject JavaScript or other code that runs in the context of the user’s browser, potentially compromising confidentiality, integrity, or availability of the affected application.
Github GHSA