Live threats

All CVEs / Rubyonrails

CVE-2021-22881Rubyonrails Rails

Medium 6.1 No auth neededHigh EPSS

Priority
60
CVSS 3.1
6.1
EPSS
87.3%
probability of exploitation in 30 days · percentile 100
Auth required
No
Published
Feb 11, 2021
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-601
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

What happens

The Host Authorization middleware in Action Pack before 6.1.2.1, 6.0.3.5 suffers from an open redirect vulnerability. Specially crafted `Host` headers in combination with certain "allowed host" formats can cause the Host Authorization middleware in Action Pack to redirect users to a malicious website. Impacted applications will have allowed hosts with a leading dot. When an allowed host contains a leading dot, a specially crafted `Host` header can be used to redirect to a malicious website.

Original NVD text.

What to do

  1. Apply the vendor's security update for Rails.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
RubyGems actionpack ≥ 6.0.0 < 6.0.3.5 6.0.3.5 gem "actionpack", ">= 6.0.3.5"
RubyGems actionpack ≥ 6.1.0 < 6.1.2.1 6.1.2.1 gem "actionpack", ">= 6.1.2.1"

Per OSV / GitHub Advisories (GHSA-8877-prq4-9xfw). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
rubyonrailsrails≥ 6.0.0 < 6.0.3.5
rubyonrailsrails≥ 6.1.0 < 6.1.2.1
fedoraprojectfedora33

Official sources

References

Links published by the sources. Open them with care.