CVE Professor
/
All CVEs
CVE-2026-59426

CVE-2026-59426 — Spring Cloud Gateway (5.0.4.1) — HIGH Vulnerability

HIGH CVSS 7.5 ⚡ EPSS 0.3% NVD

Spring Cloud Gateway's global LocalResponseCache filter uses a single cache shared by every route that does not configure the route-level LocalResponseCache filter. The cache key is built from the request URI, the Authorization header, the request cookies, and any request headers named in the response's Vary header. The route that handled the request is not part of the key. When routes match the same request URI but are selected by different predicates (for example RemoteAddr , Host , Header , Cookie , Query , or custom predicates) and forward to different upstreams, a response cached for one route can be returned to a caller that matches only another route. For example, a response cached for a restricted route can be served to a caller that matches only a public route, without that request reaching either upstream. An unauthenticated attacker can exploit this to read responses that were meant for a different audience. Applications are affected only if the global LocalResponseCache is enabled and at least two routes that use it match the same request URI but are separated by predicates that do not influence the cache key. Routes that configure the route-level LocalResponseCache filter use their own per-route cache and are not affected.

Spring Cloud Gateway's global LocalResponseCache filter uses a single cache shared by every route that does not configure the route-level LocalResponseCache filter. The cache key is built from the request URI, the Authorization header, the request cookies, and any request headers named in the response's Vary header. The route that handled the request is not part of the key. When routes match the same request URI but are selected by different predicates (for example RemoteAddr , Host , Header , Cookie , Query , or custom predicates) and forward to different upstreams, a response cached for one route can be returned to a caller that matches only another route. For example, a response cached for a restricted route can be served to a caller that matches only a public route, without that request reaching either upstream. An unauthenticated attacker can exploit this to read responses that were meant for a different audience. Applications are affected only if the global LocalResponseCache is enabled and at least two routes that use it match the same request URI but are separated by predicates that do not influence the cache key. Routes that configure the route-level LocalResponseCache filter use their own per-route cache and are not affected.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality High C:H
Integrity None I:N
Availability None A:N
EPSS — Exploit Prediction Scoring System
0.3%
30-day probability
In the 28. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

Vulnerability name: Spring Cloud Gateway – Global LocalResponseCache route‑confusion cache poisoning
CVE‑ID: CVE‑2026‑59426
CVSS v3.1: 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N)

Technical flaw

Spring Cloud Gateway (SCG) ships a global LocalResponseCache filter that can be enabled once for the whole gateway.
When the filter is active it creates *one in‑memory cache instance that is shared by every route that does not declare its own LocalResponseCache filter*.

The cache key is built from:

ComponentUsed in key
Request URI (request.getURI())✅
Authorization header✅
All request cookies✅
Any request header listed in the response Vary header✅
Route identifier (the route that matched)❌ (not part of the key)

Because the route that satisfied the request is omitted, two distinct routes that:

  • share the same request URI, and
  • are distinguished only by predicates that are not part of the cache key (e.g. Host, RemoteAddr, Header, Cookie, Query, custom predicates),
  • will write to and read from the same cache entry.

    Consequences:

    A response generated for a restricted route (e.g. behind an IP‑allowlist, authentication, or other predicate) can be served from cache to a request that matches a public* route with the same URI.

  • The attacker never reaches the upstream service; the gateway returns the cached response directly.

  • This is an information‑disclosure issue – the attacker can read data that was intended for a different audience.
  • The CWE most closely matching this behavior is CWE‑200: Information Exposure (the cache key does not include sufficient context to isolate confidential data). The CVSS vector reflects high confidentiality impact (C:H), no integrity or availability impact.


    ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation scenario. All command‑line examples are illustrative – the exact URI, hostnames, and predicate values depend on the victim’s configuration.

    1. Discovery & Reconnaissance

    StepActionRationale
    1.1Identify that the target runs a Spring Cloud Gateway instance.Public‑facing services often expose a /actuator/health or /actuator/info endpoint. A request to GET /actuator/health that returns JSON with gateway version reveals the SCG version.
    1.2Enumerate the SCG version.Example: curl -s http://example.com/actuator/infojq . → { "gateway": { "version": "5.0.4.1" } }. The version matches the vulnerable range.
    1.3Determine whether the global LocalResponseCache filter is enabled.The actuator endpoint GET /actuator/gateway/routes (if exposed) lists each route’s filters. Look for "name":"LocalResponseCache" without a perRoute flag. Absence of per‑route entries indicates the global filter is in use.
    1.4Map route predicates.By inspecting the route definitions (via /actuator/gateway/routes or by reviewing public documentation / open‑source repo), the attacker notes that two routes share the same path, e.g. /api/v1/report, but differ by a Host predicate (api.internal.example.com vs api.public.example.com).

    2. Exploitation

    Goal: Retrieve a cached response that was originally generated for the internal route (restricted) by issuing a request that matches the public route.

    2.1 Prime the cache (restricted route)

    # Step 2.1 – authenticated request that hits the internal route
    # Assume the internal route requires a JWT token (Authorization: Bearer <token>)
    curl -s -k -H "Host: api.internal.example.com" \
         -H "Authorization: Bearer <valid‑internal‑jwt>" \
         "https://gateway.example.com/api/v1/report?type=financial" \
         -o /tmp/privileged_response.bin

    Result: SCG forwards the request upstream, receives a JSON report, stores it in the global cache keyed only by the URI (/api/v1/report?type=financial) plus the Authorization header (which is present). The response is now cached.

    2.2 Retrieve the cached response via the public route (no auth)

    # Step 2.2 – unauthenticated request that matches the public route
    curl -s -k -H "Host: api.public.example.com" \
         "https://gateway.example.com/api/v1/report?type=financial" \
         -o /tmp/leaked_response.bin

    Because the global cache key does not contain the Host predicate, the gateway finds a cache entry for the same URI and returns the privileged JSON without contacting the upstream service. The attacker now possesses data that should have been limited to internal users.

    2.3 Verification (optional)

    diff /tmp/privileged_response.bin /tmp/leaked_response.bin && echo "Cache poisoning successful"

    If the files are identical, the attack succeeded.

    Note: If the restricted route also varies on a header that is reflected in the response’s Vary header (e.g., Vary: Authorization), the attacker must include the same header value when priming the cache. In the example above the Authorization header is part of the key, so the attacker must supply a valid token when priming but does not need it when retrieving because the public route does not send it; the cache entry is still keyed on the presence of the header, not its value. This nuance is why the vulnerability is rated high confidentiality.

    3. Post‑exploitation

  • Data exfiltration: The attacker can script the two‑step process to harvest any cached confidential endpoint (e.g., user profiles, configuration files, internal API responses).
  • Chaining: The leaked data may contain further credentials, internal service URLs, or API keys that enable deeper compromise of the internal network.
  • Persistence: Because the cache entry lives for the configured TTL (default 30 seconds – 5 minutes depending on SCG settings), the attacker can repeatedly request the same URI during that window without needing to prime again, effectively turning the gateway into an unauthenticated “data dump” endpoint.

  • 🌍 Real‑World Impact

    CIA TriadImpact (derived from CVSS vector)
    Confidentiality (C:H)High – an unauthenticated remote attacker can read data intended for a different audience (e.g., internal financial reports, PII, configuration).
    Integrity (I:N)None – the vulnerability does not allow modification of data.
    Availability (A:N)None – the cache does not cause denial‑of‑service; it merely serves stale data.

    Practical consequences

    EnvironmentConcrete risk
    Multi‑tenant SaaS platforms using SCG to route tenant‑specific APIsTenant A’s confidential data could be exposed to Tenant B or to the public internet.
    Zero‑trust internal APIs protected by IP‑allowlist predicatesAn attacker outside the trusted subnet can retrieve cached responses without ever being allowed onto the internal network.
    Micro‑service architectures where the gateway caches expensive downstream calls (e.g., billing, health records)Sensitive business data leaks, GDPR/PCI‑DSS compliance violations, and potential legal exposure.

    Because the attack does not require authentication, does not need user interaction, and can be performed over the public internet, the risk rating is high despite the limited impact on integrity/availability.


    🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    ActionDetails
    UpgradeMove to a Spring Cloud Gateway version where the bug is fixed. The Spring team released the fix in 5.0.4.2 (and in all later 5.x releases). Verify the exact patched version in the official Spring release notes.
    Version checkcurl -s http://gateway.example.com/actuator/infojq .gateway.version should report ≥ 5.0.4.2.

    2. Immediate Work‑arounds (if patch cannot be applied instantly)

    Work‑aroundHow to applyEffectiveness
    Disable the global LocalResponseCache filterRemove LocalResponseCache from the global filter chain (e.g., in application.yml or Java DSL).<br>spring.cloud.gateway.globalfilters[0].name: LocalResponseCache → delete or comment out.Eliminates the shared cache, removing the cross‑route leakage.
    Force per‑route cachesAdd an explicit LocalResponseCache filter to each route that needs caching. The per‑route filter creates an isolated cache, so the route identifier becomes part of the key implicitly.Keeps caching benefits while preventing cross‑route contamination.
    Add a custom cache‑key predicateImplement a GatewayFilterFactory that appends the route ID (or the Host predicate) to the cache key, e.g.:<br>``java<br>@Bean<br>public GlobalFilter cacheKeyEnricher() {<br> return (exchange, chain) -> {<br> String routeId = exchange.getAttribute(ServerWebExchangeUtils.GATEWAY_ROUTE_ATTR).getId();<br> exchange.getAttributes().put("cacheKey", routeId + ":" + exchange.getRequest().getURI());<br> return chain.filter(exchange);<br> };<br>}<br>`Mitigates the issue without disabling caching, but requires code change and redeployment.
    Shorten cache TTLReduce spring.cloud.gateway.filter.local-response-cache.time-to-live to a few seconds (e.g., 5s). This limits the window an attacker has to retrieve a poisoned entry.Reduces exposure but does not eliminate it.
    Add a Vary: Host header on responsesIf the upstream service can be configured to add Vary: Host, the Host header becomes part of the cache key (because the filter includes any header listed in Vary`).Works only if upstream control is possible and does not break other caching semantics.

    3. Detection

    IndicatorSample log entry (Spring Cloud Gateway)Why it matters
    Cache‑hit for a route that normally requires auth2026-11-30 12:34:56.789 INFO 12345 --- [reactor-http-epoll-4] o.s.c.g.filter.LocalResponseCacheFilter : Cache hit for key [/api/v1/report?type=financial] (route: public‑api)The filter logs a cache hit; if the same key is hit from a route that does not have the Authorization header, it may indicate cross‑route leakage.
    Repeated identical response bodies from different source IPs2026-11-30 12:35:01.112 INFO 12345 --- [reactor-http-nio-2] o.s.c.g.filter.LocalResponseCacheFilter : Served cached response (size=1024) for URI /api/v1/report?type=financial (followed by many such lines from distinct IPs)High frequency of identical cached responses suggests an attacker is probing the cache.
    Unexpected Vary header omissionResponse Headers: Content-Type: application/json (no Vary)If the upstream normally sends Vary: Authorization,Host but the gateway strips it, the cache key will be incomplete.
    WAF/IDS rule triggerModSecurity: [id "1000015"] "Potential LocalResponseCache cross‑route cache leakage"Custom rule (see below) can flag suspicious patterns.

    Example ModSecurity rule (illustrative)

    # Detect repeated identical GET responses for the same URI from different client IPs
    SecRule REQUEST_METHOD "GET" \
        "chain,phase:5,t:none,log,tag:'cache-leak',id:1000015,\
        SecRule RESPONSE_BODY "@rx ^\{.*\"sensitiveField\".*\}$" \
            "chain,\
            SecRule TX:ANOMALY_SCORE "@gt 0" \
                "setvar:tx.cache_leak=+1,\
                expirevar:tx.cache_leak=60,\
                capture,\
                msg:'Possible Spring Cloud Gateway LocalResponseCache cross‑route leakage',\
                severity:2"

    The rule looks for a JSON body containing a known sensitive field (adjust to the target) and increments a counter when the same body is seen from multiple IPs within a minute.

    4. Verification after mitigation

    1. Clear the cache – restart the gateway or invoke the LocalResponseCache eviction endpoint if exposed (POST /actuator/gateway/cache/evict).
    2. Re‑run the PoC – the second request (public route) should now result in a cache miss (200 OK from upstream, not the privileged body).
    3. Check logs – ensure no “Cache hit” entries appear for the public route when the Authorization header is absent.


    ⚠️ Urgency

  • CVSS 7.5 (High) – confidentiality impact is severe, and the attack requires no authentication, no user interaction, and can be performed remotely over the network.
  • Exploit complexity: Low – the attacker only needs to know that two routes share a URI and that the global cache is enabled. No special privileges or prior foothold are required.
  • Public exposure: The vulnerability is publicly disclosed (published 02‑Dec‑2026) and the description provides a clear exploitation path, making it trivial for opportunistic attackers to script.
  • Patch priority: Critical for any production gateway that:

  • runs version 5.0.4.1 (or any earlier 5.x where the global filter is present),
  • has the global LocalResponseCache enabled, and
  • hosts at least two routes that can resolve the same URI via different predicates.
If immediate upgrade is not feasible, disable the global filter or force per‑route caches as a temporary mitigation while the patch is tested and rolled out.
Bottom line: The flaw stems from an insufficient cache‑key design that omits the route context, allowing an attacker to harvest confidential responses across route boundaries. Prompt patching or disabling the global cache is the only reliable way to eliminate the risk.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

body="Whitelabel Error Page"
CVSS Score
7.5 / 10 · CVSS HIGH
Affected Products (1)
Spring:Spring Cloud Gateway (5.0.4.1)
References & Advisories (2)
Related CVEs
6.9
CVE-2026-144417
### Summary The dataset-preview endpoint `POST /jmreport/qurestSql` substitutes request parameters into the d
9.3
CVE-2026-144337
osTicket before 1.17.9 and 1.18.0 before 1.18.5 contains an unauthenticated stored cross-site scripting vulner
9.2
CVE-2026-144579
curl_cffi 0.15.0 through 0.17.0 contains a server-side request forgery protection bypass in allow_redirects='s
9.2
CVE-2026-144598
Homebox 0.22.0-rc.2 through 0.27.1 contains an authentication bypass vulnerability in UserService.LoginOIDC th
9.2
CVE-2026-145153
LangChain4j before 1.5.4-beta11, 1.11.12-beta19, 1.19.4-beta29, and 1.23.0-beta33 contains an injection vulner
9.1
CVE-2026-144956
Hoverfly before 1.12.17 contains an improper certificate validation vulnerability in GetHttpClient in core/htt
8.8
CVE-2026-77417
Local CI is a ground-up rewrite of the GitHub Actions orchestration layer that runs entirely on a personal mac