Live threats

All CVEs / Rubyonrails

CVE-2021-22903Rubyonrails Rails

Medium 6.1 No auth needed

Priority
52
CVSS 3.1
6.1
EPSS
1.2%
probability of exploitation in 30 days · percentile 69
Auth required
No
Published
Jun 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 actionpack ruby gem before 6.1.3.2 suffers from a possible 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. This is similar to CVE-2021-22881. Strings in config.hosts that do not have a leading dot are converted to regular expressions without proper escaping. This causes, for example, `config.hosts << "sub.example.com"` to permit a request with a Host header value of `sub-example.com`.

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.1.0.rc2 < 6.1.3.2 6.1.3.2 gem "actionpack", ">= 6.1.3.2"

Per OSV / GitHub Advisories (GHSA-5hq2-xf89-9jxq). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
rubyonrailsrails≥ 6.1.1 < 6.1.3.2
rubyonrailsrails6.1.0

Official sources

References

Links published by the sources. Open them with care.