High

Cached redirect poisoning via X-Forwarded-Host header

  • Disclosed: 01.07.2021
  • Updated: 11.10.2026 12:22

A user supplied X-Forwarded-Host header can be used to perform cache poisoning of a cache fronting a Ratpack server if the cache key does not include the X-Forwarded-Host header as a cache key.

Users are only vulnerable if they do not configure a custom PublicAddress instance. A custom PublicAddress can be specified by using ServerConfigBuilder::publicAddress. For versions prior to 1.9.0, by default, Ratpack utilizes an inferring version of PublicAddress which is vulnerable.

Impact

This can be used to perform redirect cache poisoning where an attacker can force a cached redirect to redirect to their site instead of the intended redirect location.

Patches

As of Ratpack 1.9.0, two changes have been made that mitigate this vulnerability:

  1. The default PublicAddress implementation no longer infers the address from the request context, instead relying on the configured bind host/port
  2. Relative redirects issued by the application are no longer absolutized; they are passed through as-is

Workarounds

In production, ensure that ServerConfigBuilder::publicAddress correctly configures the server.

References

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) io.ratpack:ratpack-core < 1.9.0 1.9.0

References

CVSS score 7/10
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L
Weakness (CWE)
CWE-807
Platform
Java / Kotlin (Maven)
Package
io.ratpack:ratpack-core
Disclosed
01.07.2021
Updated
11.10.2026 12:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-w6rq-6h34-vh7q - CC BY 4.0

Vulnerability history: io.ratpack:ratpack-core

All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
4
First → latest
10.2019 07.2021
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 2
  • Medium 1

Disclosures per year

  1. 2019: 1
  2. 2020: 1
  3. 2021: 2
  4. 2022: 0
  5. 2023: 0
  6. 2024: 0
  7. 2025: 0
  8. 2026: 0
  1. Cached redirect poisoning via X-Forwarded-Host header this entry
    High · 7.0 CVE-2021-29479 < 1.9.0 1.9.0
  2. Critical · 9.9 CVE-2021-29485 < 1.9.0 1.9.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.