Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. rails
  4. ›
  5. CVE-2021-22881

CVE-2021-22881: URL Redirection to Untrusted Site (Open Redirect)

February 11, 2021 (updated November 7, 2023)

The Host Authorization middleware in Action Pack 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.

References

  • discuss.rubyonrails.org/t/cve-2021-22881-possible-open-redirect-in-host-authorization-middleware/77130
  • nvd.nist.gov/vuln/detail/CVE-2021-22881

Code Behaviors & Features

Detect and mitigate CVE-2021-22881 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 6.0.0 before 6.0.3.5, all versions starting from 6.1.0 before 6.1.2.1

Fixed versions

  • 6.0.3.5
  • 6.1.2.1

Solution

Upgrade to versions 6.0.3.5, 6.1.2.1 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-601: URL Redirection to Untrusted Site ('Open Redirect')

Source file

gem/rails/CVE-2021-22881.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:40 +0000.