Register for the AI for Security Summit: Join Figma, Perplexity & Wiz

CVE-2020-8167
Ruby vulnerability analysis and mitigation

Overview

A Cross-Site Request Forgery (CSRF) vulnerability was discovered in the rails-ujs module of Ruby on Rails versions 6.0.3 and earlier. The vulnerability, identified as CVE-2020-8167, was disclosed on May 18, 2020, and allows attackers to send CSRF tokens to incorrect domains. This is a regression of a previous vulnerability (CVE-2015-1840) (Ruby Rails Security).

Technical details

The vulnerability exists in scenarios where an attacker can control the href attribute of an anchor tag or the action attribute of a form tag that triggers a POST action. In such cases, the attacker can set the href or action to a cross-origin URL, causing the CSRF token to be sent to unintended domains. The issue affects applications using the rails-ujs module in Rails versions 6.0.3 and earlier (Ruby Rails Security).

Impact

When exploited, this vulnerability could allow attackers to perform cross-site request forgery attacks by manipulating CSRF token destinations, potentially leading to unauthorized actions being performed on behalf of authenticated users (Ruby Rails Security).

Exploitability

The vulnerability can be exploited in applications where users have control over href attributes of anchor tags or action attributes of form tags that trigger POST actions. Applications that don't use rails-ujs are not affected by this vulnerability (Ruby Rails Security).

Mitigation and workarounds

The vulnerability has been fixed in Rails versions 5.2.4.3 and 6.0.3.1. For users unable to upgrade immediately, a workaround is available by implementing parameter filtering for user-controlled href and action attributes. This can be achieved by changing code that allows users to control these attributes to filter user parameters through a trusted parameter filtering function (Ruby Rails Security, Debian Security).

Additional resources


SourceThis report was generated using AI

Related Ruby vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-50276HIGH7.5
  • Ruby logoRuby
  • datadog
NoYesSep 14, 2026
CVE-2026-70658HIGH7.4
  • Ruby logoRuby
  • pay
NoNoSep 14, 2026
CVE-2026-44163MEDIUM5.3
  • Ruby logoRuby
  • fluent-plugin-opentelemetry
NoYesSep 15, 2026
CVE-2026-44282MEDIUM4.8
  • Ruby logoRuby
  • decidim-elections
NoYesSep 15, 2026
CVE-2026-44162LOW2.7
  • Ruby logoRuby
  • kube-logging-operator
NoYesSep 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management