CVE-2021-22881
CVE-2021-22881
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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.
CVSS 6.1 · Medium · EPSS 87.3% · Public exploit · Fix available
- Published
- Updated
Stack: system
Affected products and versions
https://github.com/rails/rails
- Versions
- Fixed in 6.1.2.1, 6.0.3.5: Affected
No fix published
rails Debian:12
- Affected ranges
- ECOSYSTEM: < 2:6.0.3.5+dfsg-1
Update to 2:6.0.3.5+dfsg-1
rails Debian:13
- Affected ranges
- ECOSYSTEM: < 2:6.0.3.5+dfsg-1
Update to 2:6.0.3.5+dfsg-1
rails Debian:14
- Affected ranges
- ECOSYSTEM: < 2:6.0.3.5+dfsg-1
Update to 2:6.0.3.5+dfsg-1
rails Ubuntu:Pro:16.04:LTS
- Versions
- 2:4.1.10-1
- 2:4.2.5-1
- 2:4.2.5.1-1
- 2:4.2.5.2-2
- 2:4.2.6-1
- 2:4.2.6-1ubuntu0.1~esm1
- 2:4.2.6-1ubuntu0.1~esm2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
rails Ubuntu:Pro:18.04:LTS
- Versions
- 2:4.2.9-2
- 2:4.2.9-4
- 2:4.2.10-0ubuntu4
- 2:4.2.10-0ubuntu4+esm1
- 2:4.2.10-0ubuntu4+esm2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
rails Ubuntu:Pro:20.04:LTS
- Versions
- 2:5.2.2.1+dfsg-1ubuntu1
- 2:5.2.3+dfsg-3
- 2:5.2.3+dfsg-3ubuntu0.1~esm1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
rails Ubuntu:Pro:22.04:LTS
- Versions
- 2:6.0.3.7+dfsg-2
- 2:6.1.4.1+dfsg-8ubuntu2
- 2:6.1.4.1+dfsg-8ubuntu2+esm1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
rails Ubuntu:24.04:LTS
- Versions
- 2:6.1.7.3+dfsg-2build1
- 2:6.1.7.3+dfsg-3
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
rails Ubuntu:25.10
- Versions
- 2:6.1.7.3+dfsg-7
- 2:7.2.2.1+dfsg-7
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
rails Ubuntu:26.10
- Versions
- 2:7.2.3+dfsg-2
- 2:7.2.3.2+dfsg-2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
rails Ubuntu:26.04:LTS
- Versions
- 2:7.2.2.1+dfsg-7
- 2:7.2.2.2+dfsg-2
- 2:7.2.3+dfsg-2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
Original sources
- https://hackerone.com/reports/1047447
- https://discuss.rubyonrails.org/t/cve-2021-22881-possible-open-redirect-in-host-authorization-middleware/77130
- https://benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3/
- http://www.openwall.com/lists/oss-security/2021/05/05/2
- http://www.openwall.com/lists/oss-security/2021/08/20/1
- http://www.openwall.com/lists/oss-security/2021/12/14/5
- https://nvd.nist.gov/vuln/detail/CVE-2021-22881