CVE-2020-5267

lowpriority · track · 30EPSS 0.015 · 75 %ileexploit · PoCEURUUS
grimoire priorityP1 · Urgent
Exploitable?
Public exploit
1 exploit · PoC
Likely / severe?
1.52% (75th) EPSS
CVSS 3.5 · low
Is it mine?
18 products
Check your exposure
Who says so?
5 sources
cnnvd · enisa_euvd · fstec_bdu · nvd

EPSS · scored 2026-10-28

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.

01

cvss

Technical severity, 0–10. One row per scoring source.

4.8
010

base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · low–medium · 3.5–4.8

v2.03.5lowAV:N/AC:M/Au:S/C:N/I:P/A:Nprimary · NVD / NIST USexploitability 6.8 · impact 2.9
v3.14.8mediumCVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:Nprimary · NVD / NIST USexploitability 1.7 · impact 2.7
v3.14.8mediumAV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:Nsecondary · FSTEC (BDU) RU
v3.14mediumCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:L/I:L/A:Nsecondary · ENISA EU
v3.14mediumCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:L/I:L/A:Nsecondary · security-advisories@github.comexploitability 1 · impact 2.7
v3.14.8mediumCVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:Nsecondary · OSV
v3.14.6mediumCVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N/E:Psecondary · CVSS-BT (t0sche)
02

weaknesses

The CWE weakness classes this flaw belongs to.

03

exploits (1)

Public proof-of-concept and weaponised exploit code.

04

affected products (18)

Products and version ranges known to be affected.

05

advisories (1)

Vendor and ecosystem advisories describing this.

  • GHSA-65cv-r6x7-79hvCross site scripting vulnerability in ActionView2020-03-19ghsa · osvUS

    There is a possible cross site scripting (XSS) vulnerability in ActionView's JavaScript literal escape helpers. Views that use the `j` or `escape_javascript` methods may be susceptible to XSS attacks. ### Impact There is a possible XSS vulnerability in the `j` and `escape_javascript` methods in ActionView. These methods are used for escaping JavaScript string literals. Impacted code will look something like this: ```erb <script>let a = `<%= j unknown_input %>`</script> ``` or ```erb <script>let a = `<%= escape_javascript unknown_input %>`</script> ``` ### Releases The 6.0.2.2 and 5.2.4.2 releases are available at the normal locations. ### Workarounds For those that can't upgrade, the following monkey patch may be used: ```ruby ActionView::Helpers::JavaScriptHelper::JS_ESCAPE_MAP.merge!( { "`" => "\\`", "$" => "\\$" } ) module ActionView::Helpers::JavaScriptHelper alias :old_ej :escape_javascript alias :old_j :j def escape_javascript(javascript) javascript = javascript.to_s if javascript.empty? result = "" else result = javascript.gsub(/(\\|<\/|\r\n|\342\200\250|\342\200\251|[\n\r"']|[`]|[$])/u, JS_ESCAPE_MAP) end javascript.html_safe? ? result.html_safe : result end alias :j :escape_javascript end ``` ### Patches To aid users who aren't able to upgrade immediately we have provided patches for the two supported release series. They are in git-am format and consist of a single changeset. * [5-2-js-helper-xss.patch](https://gist.github.com/tenderlove/c042ff49f0347c37e99183a6502accc6#file-5-2-js-helper-xss-patch) - Patch for 5.2 series * [6-0-js-helper-xss.patch](https://gist.github.com/tenderlove/c042ff49f0347c37e99183a6502accc6#file-6-0-js-helper-xss-patch) - Patch for 6.0 series Please note that only the 5.2 and 6.0 series are supported at present. Users of earlier unsupported releases are advised to upgrade as soon as possible as we cannot guarantee the continued availability of security fixes for unsupported releases. ### Credits Thanks to Jesse Campos from Chef Secure

06

also known as (4)

Other names and identifiers for this entity.

07

sources

Which sources assert this record, and when.

published 2020-03-19modified 2026-06-17
09

references (29)

External citations — patches, advisories, analysis.

scry

Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.

Free scan