CVE-2021-22881 Actionpack Open Redirect Vulnerability
Attackers can redirect users to malicious sites via crafted Host headers if allowed hosts use leading dots in Ruby on Rails Action Pack.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-22881?
CVE-2021-22881 is a medium-severity vulnerability in Fedoraproject Fedora, published on 11 Feb 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-601
Which versions are affected by CVE-2021-22881?
4 open source packages ship an affected version, including actionpack. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
actionpack RubyGems | From 6.0.0 | 6.0.3.5 |
actionpack RubyGems | From 6.0.0 | 6.0.3.5 |
actionpack RubyGems | From 6.1.0 | 6.1.2.1 |
actionpack RubyGems | From 6.1.0 | 6.1.2.1 |
Products include Fedoraproject Fedora, Rubyonrails Rails.
How do I fix CVE-2021-22881?
Upgrade actionpack to a fixed version for your release line: 6.0.3.5 or 6.1.2.1.
Is CVE-2021-22881 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-22881 exists.
Public exploit code: 1 Nuclei template.
Other vulnerabilities in Fedoraproject Fedora
Sources
Also known as DEBIAN-CVE-2021-22881, GHSA-8877-prq4-9xfw, UBUNTU-CVE-2021-22881.