{"id":"CVE-2026-126078","aliases":["CVE-2026-126078","GHSA-v6rj-xm57-3p59"],"related":[],"kind":"vulnerability","state":"published","title":"Action View: Possible XSS vulnerability in Action View highlight helper","summary":"Action View is a framework for handling view template lookup and rendering and provides view helpers for building HTML. Prior to 8.1.4.1 and 8.0.5.2, ActionView::Helpers::TextHelper#highlight substitutes each matched phrase into the :highlighter string without escaping it and returns the result marked HTML-safe. 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. This issue is fixed in versions 8.1.4.1 and 8.0.5.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Action View is a framework for handling view template lookup and rendering and provides view helpers for building HTML. Prior to 8.1.4.1 and 8.0.5.2, ActionView::Helpers::TextHelper#highlight substitutes each matched phrase into the :highlighter string without escaping it and returns the result marked HTML-safe. 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. This issue is fixed in versions 8.1.4.1 and 8.0.5.2.","source":"cvelist"},{"lang":"en","text":"### Impact\n`ActionView::Helpers::TextHelper#highlight` substitutes each matched phrase into the `:highlighter` string without escaping it and returns the result marked HTML-safe. 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.\n\n### Details\nThe fixed releases HTML-escape each group substituted into the `:highlighter` string, so quotes in a match are rendered as `&quot;` and `&#39;`. Only the numbered placeholders `\\0` to `\\9` are expanded; other `String#sub` replacement escapes, such as `\\k<name>`, `\\&` and `\\\\`, are left as written. A match can no longer begin on the `>` that closes a preceding tag. Escaping makes a placeholder safe as element content or inside a quoted attribute value, but not in an unquoted attribute value, a URL, JavaScript or CSS context, or an attribute whose value is HTML. See the Action View CHANGELOG for details.\n\n### Workarounds\nUse a `:highlighter` that places the matched phrase only in element content, such as the default `<mark>\\1</mark>`.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/06938194b4fd59e1d2c8ab4a781f3c1e2b763425.patch\n- 8.0: https://github.com/rails/rails/commit/c796f6198837479ada13290eb8fa767b5219a58a.patch\n\n### Credit\nThis issue was found by the Anthropic OSS Scanner (ANT-2026-THHUJQVO).","format":"markdown","source":"ghsa"}],"published":"2026-11-10T21:00:49.416Z","modified":"2026-11-12T23:45:03.296Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 8.0.5.2","status":"affected"},{"version":">= 8.1, < 8.1.4.1","status":"affected"}],"vendor":"rails","product":"rails","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"8.1.0.beta1","status":"affected","fixed":"8.1.4.1"}],"ecosystem":"RubyGems","package":"actionview","purl":"pkg:gem/actionview","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"8.0.5.2"}],"ecosystem":"RubyGems","package":"actionview","purl":"pkg:gem/actionview","source":"ghsa"}],"references":[{"url":"https://github.com/rails/rails/security/advisories/GHSA-v6rj-xm57-3p59","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rails/rails/commit/06938194b4fd59e1d2c8ab4a781f3c1e2b763425","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rails/rails/commit/c796f6198837479ada13290eb8fa767b5219a58a","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rails/rails/releases/tag/v8.0.5.2","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rails/rails/releases/tag/v8.1.4.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-126078","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/rails/rails","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionview/GHSA-v6rj-xm57-3p59.yml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-12T16:26:33.272Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-126078","url":"https://www.cve.org/CVERecord?id=CVE-2026-126078","licence":"CVE Terms of Use","modified":"2026-11-12T18:01:20.042Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-v6rj-xm57-3p59","url":"https://github.com/advisories/GHSA-v6rj-xm57-3p59","licence":"CC-BY-4.0","modified":"2026-11-12T23:45:03.296Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-126078","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-126078","licence":"Public domain","modified":"2026-11-12T22:09:39.233Z"}],"updatedAt":"2026-11-25T22:59:50.275Z","epss":{"score":0.00362,"percentile":0.32044,"date":"2026-12-01T12:00:22.000Z"}}