{"id":"CVE-2020-15169","aliases":["CVE-2020-15169","GHSA-cfjv-5498-mph5"],"related":[],"kind":"vulnerability","state":"published","title":"XSS in Action View","summary":"In Action View before versions 5.2.4.4 and 6.0.3.3 there is a potential Cross-Site Scripting (XSS) vulnerability in Action View's translation helpers. Views that allow the user to control the default (not found) value of the `t` and `translate` helpers could be susceptible to XSS attacks. When an HTML-unsafe string is passed as the default for a missing translation key named html or ending in _html, the default string is incorrectly marked as HTML-safe and not escaped. This is patched in versions 6.0.3.3 and 5.2.4.4. A workaround without upgrading is proposed in the source advisory.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In Action View before versions 5.2.4.4 and 6.0.3.3 there is a potential Cross-Site Scripting (XSS) vulnerability in Action View's translation helpers. Views that allow the user to control the default (not found) value of the `t` and `translate` helpers could be susceptible to XSS attacks. When an HTML-unsafe string is passed as the default for a missing translation key named html or ending in _html, the default string is incorrectly marked as HTML-safe and not escaped. This is patched in versions 6.0.3.3 and 5.2.4.4. A workaround without upgrading is proposed in the source advisory.","source":"cvelist"},{"lang":"en","text":"There is a potential Cross-Site Scripting (XSS) vulnerability in Action View's translation helpers. Views that allow the user to control the default (not found) value of the `t` and `translate` helpers could be susceptible to XSS attacks.\n\n### Impact\n\nWhen an HTML-unsafe string is passed as the default for a missing translation key [named `html` or ending in `_html`](https://guides.rubyonrails.org/i18n.html#using-safe-html-translations), the default string is incorrectly marked as HTML-safe and not escaped. Vulnerable code may look like the following examples:\n\n```erb\n<%# The welcome_html translation is not defined for the current locale: %>\n<%= t(\"welcome_html\", default: untrusted_user_controlled_string) %>\n\n<%# Neither the title.html translation nor the missing.html translation is defined for the current locale: %>\n<%= t(\"title.html\", default: [:\"missing.html\", untrusted_user_controlled_string]) %>\n```\n\n### Patches\n\nPatched Rails versions, 6.0.3.3 and 5.2.4.4, are available from the normal locations.\n\nThe patches have also been applied to the `master`, `6-0-stable`, and `5-2-stable` branches on GitHub. If you track any of these branches, you should update to the latest.\n\nTo aid users who aren’t able to upgrade immediately, we’ve provided patches for the two supported release series. They are in git-am format and consist of a single changeset.\n\n* [5-2-translate-helper-xss.patch](https://gist.github.com/georgeclaghorn/a466e103922ee81f24c32c9034089442#file-5-2-translate-helper-xss-patch) — patch for the 5.2 release series\n* [6-0-translate-helper-xss.patch](https://gist.github.com/georgeclaghorn/a466e103922ee81f24c32c9034089442#file-6-0-translate-helper-xss-patch) — patch for the 6.0 release series\n\nPlease note that only the 5.2 and 6.0 release series are currently supported. Users of earlier, unsupported releases are advised to update as soon as possible, as we cannot provide security fixes for unsupported releases.\n\n### Workarounds\n\nImpacted users who can’t upgrade to a patched Rails version can avoid this issue by manually escaping default translations with the `html_escape` helper (aliased as `h`):\n\n```erb\n<%= t(\"welcome_html\", default: h(untrusted_user_controlled_string)) %>\n```","format":"markdown","source":"ghsa"},{"lang":"es","text":"En Action View versiones anteriores a 5.2.4.4 y 6.0.3.3, se presenta una potencial vulnerabilidad de tipo Cross-Site Scripting (XSS) en los asistentes de traducción de Action View.&#xa0;Las vistas que permiten al usuario controlar el valor predeterminado (no encontrado) de los asistentes \"t\" y \"translate\" podrían ser susceptibles a ataques de tipo XSS.&#xa0;Cuando es pasada una cadena no segura hacia HTML como predeterminada para una clave de traducción faltante llamada html o terminando en _html, la cadena predeterminada es marcada incorrectamente como segura para HTML y no escapaba.&#xa0;Esto está parcheado en las versiones 6.0.3.3 y 5.2.4.4.&#xa0;Se propone una solución alternativa sin actualizar en el aviso de fuente","source":"nvd"}],"published":"2020-09-11T15:19:57.000Z","modified":"2026-09-10T03:49:13.488Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"NVD","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":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 5.2.4.4","status":"affected"},{"version":">= 6.0.0.0, < 6.0.3.3","status":"affected"}],"vendor":"rails","product":"actionview","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.2.4.4"}],"ecosystem":"RubyGems","package":"actionview","purl":"pkg:gem/actionview","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.0.0.0","status":"affected","fixed":"6.0.3.3"}],"ecosystem":"RubyGems","package":"actionview","purl":"pkg:gem/actionview","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.2.4.4"},{"status":"affected","introduced":"6.0.0.0","fixed":"6.0.3.3"}],"vendor":"action_view_project","product":"action_view","cpe":"cpe:2.3:a:action_view_project:action_view:*:*:*:*:*:ruby:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"33"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/rails/rails/security/advisories/GHSA-cfjv-5498-mph5","tags":["patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.debian.org/security/2020/dsa-4766","tags":["third-party-advisory","vendor-advisory","web","x-refsource-debian","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XJ7NUWXAEVRQCROIIBV4C6WXO6IR3KSB/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2020/10/msg00015.html","tags":["mailing-list","third-party-advisory","web","x-refsource-mlist","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-15169","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/rails/rails/commit/e663f084460ea56c55c3dc76f78c7caeddeeb02e","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/rails/rails","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionview/CVE-2020-15169.yml","tags":["web"],"sources":["ghsa"]},{"url":"https://groups.google.com/g/rubyonrails-security/c/b-C9kSGXYrc","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XJ7NUWXAEVRQCROIIBV4C6WXO6IR3KSB","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-15169","url":"https://www.cve.org/CVERecord?id=CVE-2020-15169","licence":"CVE Terms of Use","modified":"2024-08-04T13:08:22.436Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cfjv-5498-mph5","url":"https://github.com/advisories/GHSA-cfjv-5498-mph5","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:13.488Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-15169","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-15169","licence":"Public domain","modified":"2026-06-17T02:56:11.280Z"}],"updatedAt":"2026-11-25T22:57:54.612Z","epss":{"score":0.02361,"percentile":0.84236,"date":"2026-12-01T12:00:22.000Z"}}