CVE-2020-15169: Actionview Cross-Site Scripting Vulnerability
MODERATECVE-2020-15169 is a MODERATE (CVSS 5.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Actionview libraries in the RubyGems ecosystem. The issue involves xss in action view. Remediation is available by upgrading affected packages to version 5.2.4.4, 6.0.3.3.
CVE-2020-15169 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N).
How to Fix CVE-2020-15169
To remediate this vulnerability, upgrade all affected Actionview dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade actionview to 5.2.4.4
Upgrade actionview to 6.0.3.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for actionview
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-15169, inspect your project dependencies for Actionview:
inspect dependencies for actionview
Analyze the terminal output to locate any version of Actionview in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.2.4.4), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Actionview, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-15169 Affected Actionview Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
actionview
|
RubyGems |
< 5.2.4.4
|
5.2.4.4
|
|
actionview
|
RubyGems |
≥ 6.0.0.0
< 6.0.3.3
|
6.0.3.3
|
References
Frequently Asked Questions
What is CVE-2020-15169?
Which Actionview versions are affected?
What version fixes CVE-2020-15169?
Is actionview affected?
What is the CVSS score of CVE-2020-15169?
What CWE is associated with CVE-2020-15169?
How can I check RubyGems dependencies for CVE-2020-15169?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cfjv-5498-mph5",
"modified" : "2023-05-04T19:48:00Z",
"published" : "2020-09-11T15:19:57Z",
"aliases" : [ "CVE-2020-15169" ],
"summary" : "XSS in Action View",
"details" : "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```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "actionview"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.2.4.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.2.4.3"
}
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "actionview"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0.0"
}, {
"fixed" : "6.0.3.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 6.0.3.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rails/rails/security/advisories/GHSA-cfjv-5498-mph5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15169"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails/commit/e663f084460ea56c55c3dc76f78c7caeddeeb02e"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rails/rails"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionview/CVE-2020-15169.yml"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/g/rubyonrails-security/c/b-C9kSGXYrc"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2020/10/msg00015.html"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XJ7NUWXAEVRQCROIIBV4C6WXO6IR3KSB"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2020/dsa-4766"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-09-11T15:19:29Z",
"nvd_published_at" : null
}
}