Cross-site scripting in ActionView - CVE-2026-126078
Published: December 3, 2026
Vulnerability details
The vulnerability allows a remote attacker to execute scripts in a victim's browser in the affected site's origin.
The vulnerability exists due to improper escaping in ActionView::Helpers::TextHelper#highlight when the helper inserts a match into a quoted HTML attribute in a custom highlighter and marks the result as HTML-safe. A remote attacker can control the highlighted text or search phrase to inject HTML attributes and potentially execute scripts when a victim views the rendered page.