CVE-2021-22881Rubyonrails Rails
Medium 6.1 No auth neededHigh EPSS
Follow: this CVE · Rubyonrails · Rubyonrails Rails We alert you by email or Slack (account required).
- 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.
What to do
- Apply the vendor's security update for Rails.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How 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)
| Vendor | Product | Versions |
|---|---|---|
| rubyonrails | rails | ≥ 6.0.0 < 6.0.3.5 |
| rubyonrails | rails | ≥ 6.1.0 < 6.1.2.1 |
| fedoraproject | fedora | 33 |
Official sources
References
Links published by the sources. Open them with care.
- www.openwall.com Mailing List Mitigation Third Party Advisory
- www.openwall.com Mailing List Mitigation Third Party Advisory
- www.openwall.com Exploit Mailing List Patch
- benjamin-bouchet.com Patch Third Party Advisory
- discuss.rubyonrails.org Mitigation Patch Vendor Advisory
- hackerone.com Exploit Patch Third Party Advisory
- lists.fedoraproject.org