Skip to content
OpenAdvisories
Medium · 6.1 CVE-2021-22903 EUVD-2021-0957GHSA-5hq2-xf89-9jxq

Possible Open Redirect Vulnerability in Action Pack

Published Jun 11, 2021 · Updated Aug 3, 2024 · Assigned by hackerone

Description

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`.

Affected products

VendorProductAffectedFixed
— https://github.com/rails/rails Fixed in 6.1.3.2 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu 26.10 rails No fix yet —
Ubuntu 26.04 LTS rails No fix yet —
Ubuntu 25.10 rails No fix yet —
Ubuntu 24.04 LTS rails No fix yet —
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 22.04 LTS rails No fix yet —
Ubuntu Pro 20.04 LTS rails No fix yet —
Ubuntu Pro 18.04 LTS rails No fix yet —
Ubuntu Pro 16.04 LTS rails No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
RubyGems actionpack >= 6.1.0.rc2, < 6.1.3.2 6.1.3.2 GHSA-5hq2-xf89-9jxq

Advisories 1

References