actionpack Open Redirect in Host Authorization MiddlewareGHSA-qphc-hf5q-v8fc
MEDIUMFix: rails/rails@0fccfb9GHSA-qphc-hf5q-v8fc is a medium-severity (CVSS 6.1) Open Redirect vulnerability in actionpack. A fix is available for actionpack — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-qphc-hf5q-v8fc by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
actionpack💎actionpackReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.
Description
Specially crafted "X-Forwarded-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. For example, configuration files that look like this:
config.hosts << '.EXAMPLE.com'
When an allowed host contains a leading dot, a specially crafted Host header can be used to redirect to a malicious website.
This vulnerability is similar to CVE-2021-22881 and CVE-2021-22942.
Releases
The fixed releases are available at the normal locations.
Patches
To aid users who aren't able to upgrade immediately we have provided patches for the two supported release series. They are in git-am format and consist of a single changeset.
- 6-0-host-authorzation-open-redirect.patch - Patch for 6.0 series
- 6-1-host-authorzation-open-redirect.patch - Patch for 6.1 series
- 7-0-host-authorzation-open-redirect.patch - Patch for 7.0 series
Please note that only the 6.1.Z, 6.0.Z, and 5.2.Z series are supported at present. Users of earlier unsupported releases are advised to upgrade as soon as possible as we cannot guarantee the continued availability of security fixes for unsupported releases.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | actionpack | ≥ 6.0.0&&< 6.0.4.2 | 6.0.4.2bundle update actionpack --conservative |
| 💎RubyGems | actionpack | ≥ 6.1.0&&< 6.1.4.2 | 6.1.4.2bundle update actionpack --conservative |
Affected Products
railsrubyonrailsDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for actionpack, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update actionpack to 6.0.4.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-qphc-hf5q-v8fc is resolved across your whole dependency graph.
Workarounds
Stop reflecting attacker-controlled destinations: resolve every redirect target against an allowlist of paths or hosts you own, prefer a server-side key over a full URL in the request, and reject absolute URLs entirely where the flow only ever needs a relative one.
How to detect GHSA-qphc-hf5q-v8fc
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id ghsa-qphc-hf5q-v8fc -u https://target- Template
- Open Redirect in Host Authorization Middleware
- Severity
- medium
- Impact
- This vulnerability can lead to phishing attacks, where users are tricked into visiting malicious websites and disclosing sensitive information.
- Remediation
- Apply the latest security patches or updates provided by the vendor to fix the Open Redirect vulnerability in the Host Authorization Middleware.
Template by ProjectDiscovery nuclei-templates (geeknik, jakxx), MIT licensed. View the full template. Scan only systems you are authorised to test.
Frequently Asked Questions
Is GHSA-qphc-hf5q-v8fc in your dependencies?
Find it across RubyGems, including transitive dependencies.