{"id":"CVE-2021-29479","aliases":["CVE-2021-29479","GHSA-w6rq-6h34-vh7q"],"related":[],"kind":"vulnerability","state":"published","title":"Cached redirect poisoning via X-Forwarded-Host header","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.\n\nUsers are only vulnerable if they do not configure a custom `PublicAddress` instance. A custom `PublicAddress` can be specified by using [ServerConfigBuilder::publicAddress](https://ratpack.io/manual/current/api/ratpack/server/ServerConfigBuilder.html#publicAddress-java.net.URI-). For versions prior to 1.9.0, by default, Ratpack utilizes an inferring version of `PublicAddress` which is vulnerable.\n\n### Impact\n\nThis 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.\n\n### Patches\n\nAs of Ratpack 1.9.0, two changes have been made that mitigate this vulnerability:\n\n1. The default PublicAddress implementation no longer infers the address from the request context, instead relying on the configured bind host/port\n2. Relative redirects issued by the application are no longer absolutized; they are passed through as-is\n\n### Workarounds\n\nIn production, ensure that [ServerConfigBuilder::publicAddress](https://ratpack.io/manual/current/api/ratpack/server/ServerConfigBuilder.html#publicAddress-java.net.URI-) correctly configures the server.\n\n### References\n - https://portswigger.net/web-security/web-cache-poisoning","format":"markdown","source":"ghsa"},{"lang":"es","text":"Ratpack es un kit de herramientas para crear aplicaciones web. En versiones anteriores a 1.9.0, una cabecera \"X-Forwarded-Host\" suministrada por el usuario puede ser usada para llevar a cabo el envenenamiento de la caché de un servidor Ratpack si la clave de la caché no incluye la cabecera \"X-Forwarded-Host\" como clave de la caché. Unos usuarios sólo son vulnerables si no configuran una instancia personalizada de \"PublicAddress\". Para versiones anteriores a 1.9.0, por defecto, Ratpack usa una versión inferida de \"PublicAddress\" que es vulnerable. Esto puede ser usado para llevar a cabo el envenenamiento de la caché de redireccionamiento, donde un atacante puede forzar un redireccionamiento en caché para redirigir a su sitio en lugar de la ubicación de redireccionamiento prevista. La vulnerabilidad fue parcheada en Ratpack versión 1.9.0. Como solución, asegúrese de que \"ServerConfigBuilder::publicAddress\" configura correctamente el servidor en producción","source":"nvd"}],"published":"2021-06-29T14:35:12.000Z","modified":"2026-07-08T06:29:24.395Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L","score":7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L","score":7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L","score":7,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:H/Au:N/C:P/I:P/A:N","score":4,"rating":"MEDIUM"}],"cwes":["CWE-807"],"affected":[{"ranges":[{"version":"< 1.9.0","status":"affected"}],"vendor":"ratpack","product":"ratpack","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.9.0"}],"ecosystem":"Maven","package":"io.ratpack:ratpack-core","purl":"pkg:maven/io.ratpack/ratpack-core","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.9.0"}],"vendor":"ratpack_project","product":"ratpack","cpe":"cpe:2.3:a:ratpack_project:ratpack:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://portswigger.net/web-security/web-cache-poisoning","tags":["exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ratpack/ratpack/security/advisories/GHSA-w6rq-6h34-vh7q","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29479","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ratpack/ratpack","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-29479","url":"https://www.cve.org/CVERecord?id=CVE-2021-29479","licence":"CVE Terms of Use","modified":"2024-08-03T22:11:05.264Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-w6rq-6h34-vh7q","url":"https://github.com/advisories/GHSA-w6rq-6h34-vh7q","licence":"CC-BY-4.0","modified":"2026-07-08T06:29:24.395Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-29479","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29479","licence":"Public domain","modified":"2026-06-17T03:47:43.630Z"}],"updatedAt":"2026-11-25T22:58:02.367Z","epss":{"score":0.00857,"percentile":0.59494,"date":"2026-12-01T12:00:22.000Z"}}