CVE-2020-8167
Description
A CSRF vulnerability exists in rails <= 6.0.3 rails-ujs module that could allow attackers to send CSRF tokens to wrong domains.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A CSRF vulnerability in rails-ujs allows attackers to send CSRF tokens to unintended cross-origin domains via attacker-controlled href or action attributes.
Vulnerability
CVE-2020-8167 is a Cross-Site Request Forgery (CSRF) vulnerability in the rails-ujs module of Ruby on Rails versions 6.0.3 and earlier. The vulnerability is a regression of CVE-2015-1840 [3]. When an attacker can control the href attribute of an anchor tag or the action attribute of a form tag that triggers a POST action, they can set the attribute to a cross-origin URL and the CSRF token will be sent to that domain [1][3].
Exploitation
Exploitation requires the attacker to be able to inject or control the href of a link or the action of a form that results in a POST request. Applications that use rails-ujs are affected; those that do not use rails-ujs are not vulnerable [3]. No authentication is needed on the attacker's part beyond the ability to place the crafted link or form on a page served by the Rails application.
Impact
An attacker can leverage this to perform cross-origin state-changing operations on behalf of an authenticated user, potentially leading to account compromise or data modification, as the Rails CSRF token is sent to the attacker-controlled domain [1][3].
Mitigation
The fixed versions are Rails 5.2.4.3 and 6.0.3.1, which correct the improper sending of CSRF tokens to cross-origin destinations [1][3]. As a workaround, developers should filter user-controlled parameters used in link_to or form tags to prevent injection of untrusted href or action values [3].
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
actionviewRubyGems | >= 5.0.0, < 5.2.4.3 | 5.2.4.3 |
actionviewRubyGems | >= 6.0.0, < 6.0.3.1 | 6.0.3.1 |
Affected products
19- rails/rails-ujs moduledescription
- ghsa-coords18 versionspkg:gem/actionviewpkg:rpm/opensuse/rmt-server&distro=openSUSE%20Leap%2015.1pkg:rpm/opensuse/rmt-server&distro=openSUSE%20Leap%2015.2pkg:rpm/opensuse/rmt-server&distro=openSUSE%20Tumbleweedpkg:rpm/opensuse/rubygem-actionview-5_1&distro=openSUSE%20Leap%2015.4pkg:rpm/opensuse/rubygem-actionview-6.0&distro=openSUSE%20Tumbleweedpkg:rpm/suse/rmt-server&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-ESPOSpkg:rpm/suse/rmt-server&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-LTSSpkg:rpm/suse/rmt-server&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Public%20Cloud%2015%20SP1pkg:rpm/suse/rmt-server&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Public%20Cloud%2015%20SP2pkg:rpm/suse/rmt-server&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Server%20Applications%2015%20SP1pkg:rpm/suse/rmt-server&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Server%20Applications%2015%20SP2pkg:rpm/suse/rmt-server&distro=SUSE%20Linux%20Enterprise%20Server%2015-LTSSpkg:rpm/suse/rmt-server&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015pkg:rpm/suse/rubygem-actionview-5_1&distro=SUSE%20Linux%20Enterprise%20High%20Availability%20Extension%2015%20SP1pkg:rpm/suse/rubygem-actionview-5_1&distro=SUSE%20Linux%20Enterprise%20High%20Availability%20Extension%2015%20SP2pkg:rpm/suse/rubygem-actionview-5_1&distro=SUSE%20Linux%20Enterprise%20High%20Availability%20Extension%2015%20SP3pkg:rpm/suse/rubygem-actionview-5_1&distro=SUSE%20Linux%20Enterprise%20High%20Availability%20Extension%2015%20SP4
>= 5.0.0, < 5.2.4.3+ 17 more
- (no CPE)range: >= 5.0.0, < 5.2.4.3
- (no CPE)range: < 2.6.5-lp151.2.18.2
- (no CPE)range: < 2.6.5-lp152.2.3.1
- (no CPE)range: < 2.6.13-1.1
- (no CPE)range: < 5.1.4-150000.3.6.1
- (no CPE)range: < 6.0.4.4-1.1
- (no CPE)range: < 2.6.5-3.34.1
- (no CPE)range: < 2.6.5-3.34.1
- (no CPE)range: < 2.6.5-3.18.1
- (no CPE)range: < 2.6.5-3.3.1
- (no CPE)range: < 2.6.5-3.18.1
- (no CPE)range: < 2.6.5-3.3.1
- (no CPE)range: < 2.6.5-3.34.1
- (no CPE)range: < 2.6.5-3.34.1
- (no CPE)range: < 5.1.4-150000.3.6.1
- (no CPE)range: < 5.1.4-150000.3.6.1
- (no CPE)range: < 5.1.4-150000.3.6.1
- (no CPE)range: < 5.1.4-150000.3.6.1
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
7- github.com/advisories/GHSA-xq5j-gw7f-jgj8ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2020-8167ghsaADVISORY
- www.debian.org/security/2020/dsa-4766ghsavendor-advisoryx_refsource_DEBIANWEB
- github.com/rubysec/ruby-advisory-db/blob/master/gems/actionview/CVE-2020-8167.ymlghsaWEB
- groups.google.com/forum/ghsaWEB
- groups.google.com/g/rubyonrails-security/c/x9DixQDG9a0ghsax_refsource_MISCWEB
- hackerone.com/reports/189878ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.