AI Science Tracker

Rails Action View highlight can turn attacker-controlled text into HTML attributes

Ruby on Rails Action View · AI involvement attributed to Anthropic OSS Scanner (model unspecified)

Finding and attribution

ActionView::Helpers::TextHelper#highlight inserts a matched phrase into a caller-provided :highlighter string without escaping it, then marks the result HTML-safe. If an application places a placeholder inside a quoted HTML attribute and highlights attacker-controlled text, the match can escape the attribute and add attributes, potentially causing XSS. The default <mark></mark> highlighter and block form are not affected.

Product: Ruby on Rails Action View. AI system: Anthropic OSS Scanner (model unspecified). Team / organization: Anthropic and Rails maintainers.

CVE identifiers: CVE-2026-126078.

AI and human contribution (source account): The Rails advisory explicitly says the issue was found by the Anthropic OSS Scanner, identifier ANT-2026-THHUJQVO. Anthropic’s primary OSS Scanner announcement says its reports are fully model-generated and generated by its strongest models, including Claude Mythos; the individual advisory does not identify the model or scanner workflow version.

Human involvement is only described where the source account establishes it; unknown involvement does not mean none. Vendor confirmation of a flaw does not confirm every claim about AI contribution.

Discovery context: The maintainer published GHSA-v6rj-xm57-3p59 on 2026-11-04 and lists CVE-2026-126078. The advisory conditions impact on a custom highlighter and user-controlled text; no exploitation claim is made.

Remediation status: fix documented. The advisory lists Action View 8.0.5.2 and 8.1.4.1 as patched and provides patches. A workaround is to use a highlighter that places matched text only in element content, such as the default highlighter.

A source-documented fix does not establish installed patches or current safety. Source checking does not independently reproduce the finding or establish observed exploitation.

Disclosed 4 Nov 2026. AI attribution dated 4 Nov 2026. Sources checked 14 Nov 2026; these are separate dates, not a live installation check.

Recorded CVSS: Medium · highest recorded score 6.1. Documented technical effects: code execution.

Severity, consequences and exploitation evidence

Case grouping uses the highest recorded CVSS score, with its version-specific severity band. It is descriptive, not a combined or editorial risk index. All recorded assessments remain below; scores from different versions and sources may disagree. CVSS specifications define version-specific scoring and severity bands.

CVE-2026-126078: code execution.
Prerequisites / affected scope: Because sanitizing leaves quote characters in text unescaped, a match substituted into a quoted attribute value of the highlighter, such as the <a href="search?q=\1"> form shown in the method's documentation, could end the attribute value and add attributes to the element, possibly leading to XSS. Applications are affected when they pass a :highlighter that places a placeholder inside an attribute value and highlight text or phrases that a user controls. The default <mark>\1</mark> highlighter and the block form are not affected..
Exploitation evidence: The cited source does not state whether this issue was exploited in the wild.. Impact source · checked 16 Nov 2026.

Documented fix: The advisory lists Action View 8.0.5.2 and 8.1.4.1 as patched and provides patches. A workaround is to use a highlighter that places matched text only in element content, such as the default highlighter.

Original evidence

Download this source record (JSON)

Open this case in the interactive tracker · Browse all static security cases