CVE-2021-22881: The Host Authorization middleware in Action Pack before 6.1.2.1, 6.0.3.5 suffers from an open redirect vulnerability.
Noroxi assessment
Priority: Plan (action score 50/100)
- A ready-made attack module is public (Nuclei); exploiting it takes no special expertise.
- Public proof-of-concept code exists (Exploit-DB / GitHub); there is no record of exploitation in the wild.
- Probability of exploitation in the next 30 days: 87.3% (FIRST EPSS); higher than 99.7% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. A user must open a link or visit a page. No special conditions are required; it is repeatable.
- Fixed version: rails (Debian:12) 2:6.0.3.5+dfsg-1; rubygem-actionpack-6.0 (openSUSE:Tumbleweed) 6.0.4.4-1.1; actionpack (RubyGems) 6.0.3.5, 6.1.2.1.
Add it to your regular patch cycle. Upgrade to rails (Debian:12) 2:6.0.3.5+dfsg-1; rubygem-actionpack-6.0 (openSUSE:Tumbleweed) 6.0.4.4-1.1; actionpack (RubyGems) 6.0.3.5, 6.1.2.1 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- Published
- Feb 11, 2021
- Updated
- Jun 16, 2026
- EPSS
- 87.3% · 99th percentile
- CWE
- CWE-601
Report tools
Action score
50
Add it to your regular patch cycle.
- CVSS
- 24 / 40 · 6.1 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 26 / 30 · 87.3%
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- Proof of concept exists, no weaponized module
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| rubyonrails | rails | cpe:2.3:a:rubyonrails:rails |
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
Versions reported by the vendor
Affected version ranges reported by the assigning authority (hackerone). Independent of NVD's CPE analysis and usually ahead of it.
n/a https://github.com/rails/rails
- Fixed in 6.1.2.1, 6.0.3.5affected
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- fedoraproject fedora33
- rubyonrails rails6.0.0 and later · before 6.0.3.5
- rubyonrails rails6.1.0 and later · before 6.1.2.1
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:12 | rails | before 2:6.0.3.5+dfsg-1 | 2:6.0.3.5+dfsg-1 |
| openSUSE:Tumbleweed | rubygem-actionpack-6.0 | before 6.0.4.4-1.1 | 6.0.4.4-1.1 |
| RubyGems | actionpack | from 6.0.0 · before 6.0.3.5 | 6.0.3.5 |
| RubyGems | actionpack | from 6.1.0 · before 6.1.2.1 | 6.1.2.1 |
Same product
rubyonrails: all recordsOther highest-scoring records for the same primary product.
- CVE-2019-5418There is a File Content Disclosure vulnerability in Action View <5.2.2.1, <5.1.6.2, <5.0.7.2, <4.2.11.1 and v3 where specially crafted…KEV90Now
- CVE-2016-0752Directory traversal vulnerability in Action View in Ruby on Rails before 3.2.22.1, 4.0.x and 4.1.x before 4.1.14.1, 4.2.x before 4.2.5.1…KEV89Now
- CVE-2019-5420A remote code execution vulnerability in development mode Rails <5.2.2.1, <6.0.0.beta3 can allow an attacker to guess the automatically…66This week
Published before and after this one in the same product
- ← EarlierCVE-2020-8264Jan 6, 2021 · In actionpack gem >= 6.0.0, a possible XSS vulnerability exists when an application is running in development mode allowing an attacker to…44Plan
- ← EarlierCVE-2021-22880Feb 11, 2021 · The PostgreSQL adapter in Active Record before 6.1.2.1, 6.0.3.5, 5.2.4.5 suffers from a regular expression denial of service (REDoS)…31Monitor
- Later →CVE-2021-22885May 27, 2021 · A possible information disclosure / unintended method execution vulnerability in Action Pack >= 2.0.0 when using the `redirect_to` or…31Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| debian:rails | 2:6.0.3.5+dfsg-1 · Debian:12 | Package registry (OSV) |
| opensuse:rubygem-actionpack-6.0 | 6.0.4.4-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| RubyGems:actionpack | 6.0.3.5 | Package registry (OSV) |
| RubyGems:actionpack | 6.1.2.1 | Package registry (OSV) |
Exploit status
Proof of concept available
A public proof of concept or detection signature exists. Exploit knowledge is out there; don't delay patching.
Evidence
- Nuclei detection template ×1
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Nuclei detection template | Nuclei template CVE-2021-22881 | — |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Bug bounty scope
The product’s vendor appears in a public program. Matched by name; verify the scope text in the program.
Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate.
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- A user must open a link or visit a page.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- low · data can be read
- Integrity
- low · data or configuration can be modified
- Availability
- none
Impact can extend beyond the vulnerable component (scope changes).
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Changed
- Confidentiality impact
- Low
- Integrity impact
- Low
- Availability impact
- None
Weakness class (CWE)
CWE-601 · URL Redirection to Untrusted Site ('Open Redirect')CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
ATT&CK techniques
—
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (4 more)Show less
- www.openwall.com/lists/oss-security/2021/08/20/1
- benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization/
- discuss.rubyonrails.org/t/cve-2021-22881-possible-open-redirect-in-host-authorization-middleware/77130
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3/
Vendor advisories and official records. Exploit/PoC links are deliberately left out.