Technical impact
Action View's highlight helper substitutes each matched phrase into a supplied highlighter string without escaping any characters. When a user‑controlled string is highlighted and the highlighter places a placeholder within an attribute value, an attacker can terminate the attribute and inject arbitrary HTML or JavaScript, resulting in reflected cross‑site scripting. The vulnerability does not require elevated privileges and operates with user input that reaches the highlight method; the CVSS score of 6.1 indicates moderate severity.
Affected Systems
Ruby on Rails applications running Rails versions earlier than 8.1.4.1 or 8.0.5.2 are affected. The flaw exists in the ActionView::Helpers::TextHelper#highlight method. Any Rails project that calls this helper with a custom highlighter containing an attribute placeholder and highlights content derived from user input is susceptible.
Risk and Exploitability
The CVSS score of 6.1 reflects moderate impact. The EPSS score is below 1 %, suggesting low likelihood of exploitation in the wild. The vulnerability is not cataloged in CISA's KEV list. Attackers can achieve reflected XSS through the custom highlighter mechanism, potentially tricking users into executing malicious scripts in their browsers. The attack requires only a malformed request containing user‑controlled text and a vulnerable highlighter string.
Debian DLA
Github GHSA