Loading...
Skip to main content

CVE-2020-8167 — CSRF Vulnerability in actionview — CVE Details

MEDIUM

CSRF Vulnerability in rails-ujs

Published July 7, 2020Updated February 16, 2024Source: osv

Summary

There is a vulnerability in rails-ujs that allows attackers to send CSRF tokens to wrong domains. Versions Affected: rails <= 6.0.3 Not affected: Applications which don't use rails-ujs. Fixed Versions: rails >= 5.2.4.3, rails >= 6.0.3.1 Impact ------ This is a regression of CVE-2015-1840. In 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. Workarounds ----------- To 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. For example, code like this: link_to params to code like this: link_to filtered_params def filtered_params # Filter just the parameters that you trust end

Advisory Timeline

  • First published July 7, 2020 (2288 days ago).
  • Last revised February 16, 2024 — 1319 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update actionview to 6.0.3.1 or later
gem install actionview -v 6.0.3.1
Bundler
Update actionview to 5.2.4.3 or later
gem install actionview -v 5.2.4.3

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
actionview
rubygems
6.0.0, 6.0.1, 6.0.1.rc1, 6.0.2 (+6 more)6.0.3.1
actionview
rubygems
5.0.0, 5.0.0.1, 5.0.1, 5.0.1.rc1 (+51 more)5.2.4.3

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-352
    Cross-Site Request Forgery (CSRF)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 6.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Frequently Asked Questions

What is CVE-2020-8167?
CSRF Vulnerability in rails-ujs This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.5/10).
How do I check if my project is affected by CVE-2020-8167?
CVE-2020-8167 affects actionview. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2020-8167 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
6.5

Exploitation requires specific conditions or has limited impact. Remediate within weeks.

Also Known As

GHSA-xq5j-gw7f-jgj8

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies