CVE-2020-8167: Actionview CSRF Vulnerability Vulnerability
MODERATECVE-2020-8167 is a MODERATE (CVSS 6.5) csrf vulnerability vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Actionview libraries in the RubyGems ecosystem. The issue involves csrf vulnerability in rails-ujs. Remediation is available by upgrading affected packages to version 5.2.4.3, 6.0.3.1.
CVE-2020-8167 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N).
How to Fix CVE-2020-8167
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.3
Upgrade actionview to 6.0.3.1
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-8167, 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.3), 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-352: Cross-Site Request Forgery (CSRF), where the web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. 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-8167 Affected Actionview Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
actionview
|
RubyGems |
≥ 5.0.0
< 5.2.4.3
|
5.2.4.3
|
|
actionview
|
RubyGems |
≥ 6.0.0
< 6.0.3.1
|
6.0.3.1
|
References
Frequently Asked Questions
What is CVE-2020-8167?
Which Actionview versions are affected?
What version fixes CVE-2020-8167?
Is actionview affected?
What is the CVSS score of CVE-2020-8167?
What CWE is associated with CVE-2020-8167?
How can I check RubyGems dependencies for CVE-2020-8167?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xq5j-gw7f-jgj8",
"modified" : "2023-08-08T15:14:47Z",
"published" : "2020-07-07T16:34:10Z",
"aliases" : [ "CVE-2020-8167" ],
"summary" : "CSRF Vulnerability in rails-ujs",
"details" : "There is a vulnerability in rails-ujs that allows attackers to send CSRF tokens to wrong domains.\n\nVersions Affected: rails <= 6.0.3\nNot affected: Applications which don't use rails-ujs.\nFixed Versions: rails >= 5.2.4.3, rails >= 6.0.3.1\n\nImpact\n------\n\nThis is a regression of CVE-2015-1840.\n\nIn the scenario where an attacker might be able to control the href attribute of an anchor tag or the action attribute of a form tag that will trigger a POST action, the attacker can set the href or action to a cross-origin URL, and the CSRF token will be sent.\n\nWorkarounds\n-----------\n\nTo work around this problem, change code that allows users to control the href attribute of an anchor tag or the action attribute of a form tag to filter the user parameters.\n\nFor example, code like this:\n\n link_to params\n\nto code like this:\n\n link_to filtered_params\n\n def filtered_params\n # Filter just the parameters that you trust\n end",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "actionview"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.2.4.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.2.4.2"
}
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "actionview"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0"
}, {
"fixed" : "6.0.3.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 6.0.3"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-8167"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/189878"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionview/CVE-2020-8167.yml"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/forum/#!topic/rubyonrails-security/x9DixQDG9a0"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/g/rubyonrails-security/c/x9DixQDG9a0"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2020/dsa-4766"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-352" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-07-07T15:51:37Z",
"nvd_published_at" : "2020-06-19T18:15:00Z"
}
}