GHSA-w6rq-6h34-vh7q

    Dashboard / Vulnerabilities / GHSA-w6rq-6h34-vh7q

    GHSA-w6rq-6h34-vh7q

    Published: 1 Jul 2021Last Modified: 8 Jul 2026

    Summary: Cached redirect poisoning via X-Forwarded-Host header

    Details: 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](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. ### 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](https://ratpack.io/manual/current/api/ratpack/server/ServerConfigBuilder.html#publicAddress-java.net.URI-) correctly configures the server. ### References - https://portswigger.net/web-security/web-cache-poisoning

    Affected packages

    Package

    Name: io.ratpack:ratpack-core

    Purl: pkg:maven/io.ratpack/ratpack-core

    Affected ranges

    Type: ECOSYSTEM

    Events:

    Introduced- 0
    Fixed -1.9.0

    Affected versions

    0.9.0
    0.9.1
    0.9.10
    0.9.11
    0.9.12
    0.9.13
    0.9.14
    0.9.15
    0.9.16
    0.9.17
    0.9.18
    0.9.19
    0.9.2
    0.9.3
    0.9.4
    0.9.5
    0.9.6
    0.9.7
    0.9.8
    0.9.9

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    GHSA-w6rq-6h34-vh7q | CVE-DB