Open redirect in https://github.com/rails/rails
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Spoofing
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Partial Red Hat: 1 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-601.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | https://github.com/rails/rails | Fixed in 6.1.2.1, 6.0.3.5 | — | No fix listed | CNA |
| — | actionpack (RubyGems) | 6.0.0 to before 6.0.3.5 | 6.0.3.5 | Patch available | GHSA-8877-prq4-9xfw |
| — | actionpack (RubyGems) | 6.1.0 to before 6.1.2.1 | 6.1.2.1 | Patch available | GHSA-8877-prq4-9xfw |
- https://github.com/rails/rails Vendor— Affected Fixed in 6.1.2.1, 6.0.3.5 Fixed in — No fix listed CNA
- actionpack (RubyGems) Vendor— Affected 6.0.0 to before 6.0.3.5 Fixed in 6.0.3.5 Patch available GHSA-8877-prq4-9xfw
- actionpack (RubyGems) Vendor— Affected 6.1.0 to before 6.1.2.1 Fixed in 6.1.2.1 Patch available GHSA-8877-prq4-9xfw
CPE configurations NVD · 2
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:* | 6.0.0 to before 6.0.3.5; 6.1.0 to before 6.1.2.1 | Vulnerable | Rails |
| cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* | 33 | Vulnerable | Fedoraproject |
- cpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:* Versions 6.0.0 to before 6.0.3.5; 6.1.0 to before 6.1.2.1 Vulnerable ·Rails
- cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* Versions 33 Vulnerable ·Fedoraproject
Remediation
- Fix · GHSA-8877-prq4-9xfw actionpack (RubyGems) Fixed in 6.0.3.5 Advisory →
- Fix · GHSA-8877-prq4-9xfw actionpack (RubyGems) Fixed in 6.1.2.1 Advisory →
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Advisory ·
https://github.com/rails/rails — FEDORA-2021-b571fca1b8
2 records Highest priority Priority HIGH 1 HIGH, 1 MEDIUM
Other records, highest priority first
- TI-2021-05741 Uncontrolled resource consumption in https://github.com/rails/railsPriority MEDIUM 40
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| CloudForms Management Engine 5 | Affected | No fix planned: Will not fix |
Not affected: 1 product
- Red Hat Satellite 6
Timeline
- 2026-10-02 Threatist record created from CVE-2021-22881
- 2026-10-03 Alias added: GHSA-8877-prq4-9xfw
References
Exploit 2
Patch 2
Advisory 4
Other 8
- https://github.com/rails/rails/commit/b5de7b3a4787d8a55aaad39f477c16e3af65e444
- https://benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization
- https://github.com/rails/rails
- https://github.com/rails/rails/blob/v6.1.2.1/actionpack/CHANGELOG.md
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2021-22881.yml
- https://groups.google.com/g/rubyonrails-security/c/zN_3qA26l6E
- https://lists.fedoraproject.org/archives/list/[email protected]/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3
- https://rubygems.org/gems/actionpack
Sources
- CVE-2021-22881 · CVE Program
- CVE-2021-22881 · NVD
- FIRST EPSS
- GHSA-8877-prq4-9xfw · GitHub Advisory Database · CC BY 4.0
- CVE-2021-22881 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences