# CVE-2021-22903

- Priority: **Routine**
- Reason: Not severe (CVSS 6.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2021-06-11 · Modified: 2024-08-03
- Aliases: UBUNTU-CVE-2021-22903, GHSA-5hq2-xf89-9jxq
- Record: https://cvemate.com/vulnerability/CVE-2021-22903 · JSON: https://cvemate.com/vulnerability/CVE-2021-22903/json

## Description

```text
The actionpack ruby gem before 6.1.3.2 suffers from a possible 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. This is similar to CVE-2021-22881. Strings in config.hosts that do not have a leading dot are converted to regular expressions without proper escaping. This causes, for example, `config.hosts << "sub.example.com"` to permit a request with a Host header value of `sub-example.com`.
```

## Signals

- CVSS: 6.1 medium (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- EPSS: 1.23%, percentile 69.918%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- ubuntu rails (Ubuntu): All versions (No fix recorded)
- RubyGems actionpack (RubyGems): ≥ 6.1.0.rc2, \< 6.1.3.2
- rubyonrails rails: ≥ 6.1.1, \< 6.1.3.2 \| 6.1.0:rc2

## References

- <https://hackerone.com/reports/1148025>
- <https://discuss.rubyonrails.org/t/cve-2021-22903-possible-open-redirect-vulnerability-in-action-pack/77867>
- <https://ubuntu.com/security/CVE-2021-22903>
- <https://www.cve.org/CVERecord?id=CVE-2021-22903>
- <https://nvd.nist.gov/vuln/detail/CVE-2021-22903>
- <https://github.com/rails/rails/releases/tag/v6.1.3.2>
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2021-22903.yml>
- <https://groups.google.com/g/rubyonrails-security/c/8TxqXEtgSF0>

---

Data as of 2026-12-05T14:01:49.575Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
