CVE-2026-126078: Action View: Possible XSS vulnerability in highlight helper
Published 2026-11-12 · Updated 2026-11-12 · Also known as GHSA-v6rj-xm57-3p59
Summary
The highlight helper in Action View contains an XSS vulnerability where user-controlled input can break out of quoted HTML attributes. Developers using custom :highlighter strings should upgrade to the patched versions immediately.
Who is affected
Applications are vulnerable if they utilize the Action View highlight helper with a custom :highlighter string that inserts the matched phrase into an HTML attribute. Attackers can provide malicious input that escapes the attribute context to execute arbitrary JavaScript. The default <mark>\1</mark> highlighter is not susceptible to this specific flaw.
Exploitability
The vulnerability carries a CVSS 3.0 score of 6.1 (Medium), indicating it requires user interaction and network access. With an EPSS score of 0.003 and no listing in CISA's Known Exploited Vulnerabilities catalog, there is currently no evidence of active exploitation.
Remediation
- Upgrade to actionview version 8.1.4.1 or 8.0.5.2.
- Apply the vendor-provided patches for version 8.1 or 8.0 if an immediate upgrade is not possible.
- Switch to using safe :highlighter strings that place the matched phrase only in element content, such as the default <mark>\1</mark>.
How to check your project
- Check Gemfile.lock for actionview versions in the ranges 8.1.0.beta1 through 8.1.4.0 or 0 through 8.0.5.1.
- Search the codebase for usages of the highlight helper that define a custom :highlighter option containing attribute values.
Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| RubyGems | actionview |
>= 8.1.0.beta1, < 8.1.4.1 | 8.1.4.1 | bundle update actionview |
| RubyGems | actionview |
>= 0, < 8.0.5.2 | 8.0.5.2 | bundle update actionview |
CVSS 3.0 vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Privileges required | None |
| User interaction | Required |
| Scope | Changed |
| Confidentiality | Low |
| Integrity | Low |
| Availability | None |
FAQ
Is the default highlighter safe?
Yes, the default <mark>\1</mark> highlighter is not affected by this vulnerability.
What specifically causes the XSS?
The flaw occurs because matched phrases were substituted into :highlighter strings without proper HTML escaping, allowing quote characters to break out of attribute values.
Does this affect all Rails applications?
No, only applications using the Action View highlight helper with custom highlighter strings that place placeholders inside HTML attributes are at risk.
Original advisory description
References
- WEB https://github.com/rails/rails/security/advisories/GHSA-v6rj-xm57-3p59
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-126078
- WEB https://github.com/rails/rails/commit/06938194b4fd59e1d2c8ab4a781f3c1e2b763425
- WEB https://github.com/rails/rails/commit/c796f6198837479ada13290eb8fa767b5219a58a
- PACKAGE https://github.com/rails/rails
- WEB https://github.com/rails/rails/releases/tag/v8.0.5.2
- WEB https://github.com/rails/rails/releases/tag/v8.1.4.1
- WEB https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionview/GHSA-v6rj-xm57-3p59.yml
Source records: GHSA-v6rj-xm57-3p59 (OSV.dev) · EPSS by FIRST, 2026-11-21.