{"id":"CVE-2026-126070","aliases":["CVE-2026-126070","GHSA-rq8q-p985-fjq7"],"related":[],"kind":"vulnerability","state":"published","title":"Action View: Possible XSS vulnerability in Action View strip_tags","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, strip_tags in Action View returns its sanitized output marked html_safe, but the underlying sanitizer encodes only &, < and >, leaving \" and ' unencoded. Because ERB does not escape a string marked html_safe, untrusted input passed through strip_tags and rendered inside a quoted HTML attribute value could close the attribute and add new attributes, possibly leading to XSS. Applications that render strip_tags output from untrusted input inside an HTML attribute, for example in a title attribute or a <meta content> tag, are affected. Output rendered as element content is 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, strip_tags in Action View returns its sanitized output marked html_safe, but the underlying sanitizer encodes only &, < and >, leaving \" and ' unencoded. Because ERB does not escape a string marked html_safe, untrusted input passed through strip_tags and rendered inside a quoted HTML attribute value could close the attribute and add new attributes, possibly leading to XSS. Applications that render strip_tags output from untrusted input inside an HTML attribute, for example in a title attribute or a <meta content> tag, are affected. Output rendered as element content is not affected. This issue is fixed in versions 8.1.4.1 and 8.0.5.2.","source":"cvelist"},{"lang":"en","text":"### Impact\n`strip_tags` in Action View returns its sanitized output marked `html_safe`, but the underlying sanitizer encodes only `&`, `<` and `>`, leaving `\"` and `'` unencoded. Because ERB does not escape a string marked `html_safe`, untrusted input passed through `strip_tags` and rendered inside a quoted HTML attribute value could close the attribute and add new attributes, possibly leading to XSS. Applications that render `strip_tags` output from untrusted input inside an HTML attribute, for example in a `title` attribute or a `<meta content>` tag, are affected. Output rendered as element content is not affected.\n\n### Details\n`strip_tags` now encodes `\"` and `'` in its output, as well as `&`, `<` and `>`, without double-encoding existing entities. Applications that use `strip_tags` output outside HTML, such as in a text template or JSON, now see `&quot;` and `&#39;` where they saw `\"` and `'`; `CGI.unescapeHTML` decodes them. See the Action View CHANGELOG.\n\n### Workarounds\nPass `strip_tags` output to an attribute through a tag helper, which escapes attribute values, for example `tag.a(title: strip_tags(user_input))`.\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/568b19cb860322885593e308a7f27aceb779e9d7.patch\n- 8.0: https://github.com/rails/rails/commit/c3772a10f405f9644125cbb484adfd2aa7a25a59.patch\n\n### Credit\nThis issue was responsibly reported by HackerOne researcher [lucasluitjes](https://hackerone.com/lucasluitjes).","format":"markdown","source":"ghsa"}],"published":"2026-11-10T20:38:50.694Z","modified":"2026-11-12T23:45:03.332Z","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-rq8q-p985-fjq7","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rails/rails/commit/568b19cb860322885593e308a7f27aceb779e9d7","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rails/rails/commit/c3772a10f405f9644125cbb484adfd2aa7a25a59","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-126070","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-rq8q-p985-fjq7.yml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-12T16:26:28.666Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-126070","url":"https://www.cve.org/CVERecord?id=CVE-2026-126070","licence":"CVE Terms of Use","modified":"2026-11-12T18:01:37.330Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rq8q-p985-fjq7","url":"https://github.com/advisories/GHSA-rq8q-p985-fjq7","licence":"CC-BY-4.0","modified":"2026-11-12T23:45:03.332Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-126070","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-126070","licence":"Public domain","modified":"2026-11-12T22:09:39.233Z"}],"updatedAt":"2026-11-25T22:59:50.272Z","epss":{"score":0.00314,"percentile":0.26233,"date":"2026-12-01T12:00:22.000Z"}}