CVE-2026-47825: Spring Cloud Gateway Header Spoofing Vulnerability – Critical Patch Required
Spring Cloud Gateway, a widely-used API gateway in Spring Boot microservices architectures, has a header-spoofing vulnerability. In certain configurations, the gateway fails to properly validate the origin of X-Forwarded-For and Forwarded HTTP headers—standard headers used to track client IP addresses through proxy chains. An attacker can craft requests with forged headers to make the gateway believe requests originate from trusted sources, potentially bypassing IP-based access controls, WAF rules, or authentication mechanisms that rely on client IP validation. This affects both synchronous (WebMVC) and asynchronous (WebFlux) implementations.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 8.6 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
- Weaknesses (CWE)
- CWE-346
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-15 / 2026-06-23
NVD description (verbatim)
Spring Cloud Gateway Server forwards the X-Forwarded-For and Forwarded headers from untrusted proxies in certain configuration scenarios. This affects both the WebMVC and WebFlux Gateway Servers. Affected versions: Spring Cloud Gateway 3.1.x (fix 3.1.13). Spring Cloud Gateway 4.1.x (fix 4.1.13). Spring Cloud Gateway 4.2.x (fix 4.2.9). Spring Cloud Gateway 4.3.x (fix 4.3.5). Spring Cloud Gateway 5.0.x (fix 5.0.2).
1 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from insufficient validation of proxy headers in Spring Cloud Gateway's header-forwarding logic. The X-Forwarded-For and Forwarded headers are conventionally used by reverse proxies to preserve the original client IP. However, without proper trust-boundary enforcement, an attacker positioned on the network path or able to send direct requests to the gateway can inject arbitrary header values. The gateway then propagates these untrusted values downstream to backend applications, or uses them in internal routing decisions. The issue manifests differently depending on gateway configuration—specifically when the gateway is configured to trust forwarded headers without proper validation of the proxy chain. Both the WebMVC (Spring MVC) and WebFlux (reactive) implementations are affected, indicating the flaw is in the common gateway core rather than transport-specific code.
Business impact
Organizations relying on Spring Cloud Gateway for API management and microservices orchestration face integrity and access-control risks. If downstream services use the forwarded client IP for authentication, rate-limiting, audit logging, or region-specific access policies, an attacker can bypass these controls by spoofing the headers. This could enable unauthorized access to sensitive endpoints, circumvention of geo-blocking policies, session hijacking, or fraudulent activity masquerading as legitimate internal traffic. The impact scales with the number of backend services that trust the forwarded IP—a common pattern in cloud-native architectures.
Affected systems
Spring Cloud Gateway versions across the 3.1.x through 5.0.x release lines are affected. This includes Spring Cloud Gateway 3.1.x (prior to 3.1.13), 4.1.x (prior to 4.1.13), 4.2.x (prior to 4.2.9), 4.3.x (prior to 4.3.5), and 5.0.x (prior to 5.0.2). Organizations running Spring Boot microservices with Spring Cloud Gateway in active development, production, or hybrid cloud deployments should inventory their gateway versions immediately. The vulnerability is particularly critical for enterprises with multi-tier API architectures where the gateway is the primary entry point for internal and external traffic.
Exploitability
This vulnerability has a CVSS 3.1 score of 8.6 (HIGH) with a network-accessible attack vector, no special privileges required, and no user interaction needed. Exploitation is straightforward: an attacker sends a crafted HTTP request with forged X-Forwarded-For or Forwarded headers directly to the gateway or via any network path. No special tooling or deep knowledge of Spring internals is required—basic HTTP client capabilities suffice. The low attack complexity reflects that the configuration weakness is common in deployments where gateways sit behind load balancers or CDNs, creating a false sense of trust in header values. Exploit proof-of-concepts are likely to emerge quickly, making rapid patching essential.
Remediation
Apply the patched versions immediately: Spring Cloud Gateway 3.1.13 or later, 4.1.13 or later, 4.2.9 or later, 4.3.5 or later, or 5.0.2 or later, depending on your active release line. Patches implement proper validation of proxy headers and enforce strict trust-boundary checks. In the interim, mitigation involves explicitly configuring the gateway to only trust forwarded headers from known, verified proxies (use the RemoteAddressResolver or ProxyHeadersFilter configuration to restrict header sources). Additionally, ensure downstream services do not blindly trust client IP values from gateway-forwarded headers without their own validation; implement header signature or mutual TLS verification if relying on IP-based access controls.
Patch guidance
Verify your current Spring Cloud Gateway version using your build tool (Maven: check pom.xml; Gradle: check build.gradle). If running version 3.1.x, 4.1.x, 4.2.x, 4.3.x, or 5.0.x below the patched thresholds listed above, schedule an immediate update. Test patched versions in a staging environment before deploying to production, paying special attention to any custom proxy header configurations or integrations with third-party WAF or load-balancer solutions. The patch is non-breaking for standard configurations; however, organizations with highly customized gateway filter chains should verify compatibility with their extensions. For long-term support (LTS) considerations, consult the Spring Cloud release calendar to understand which versions receive extended support.
Detection guidance
Monitor gateway logs for suspicious X-Forwarded-For and Forwarded header patterns, such as IPs that don't match expected proxy networks or rapid changes in reported source IPs from the same connection. Implement egress monitoring to detect downstream services receiving requests with mismatched source IP claims (compare the header values against actual network flows). Network-based detection can identify requests where the HTTP header claims an internal or trusted IP but the actual source is external. Consider correlation with authentication and access-control logs to identify attempted privilege escalation or policy bypasses. Patch application logs to redact or flag suspicious forwarded headers during the transition period.
Why prioritize this
The combination of ease of exploitation, high CVSS score (8.6), broad applicability across active Spring Cloud Gateway versions, and direct impact on network security controls (IP-based access) makes this a critical priority. The vulnerability requires only network access and no authentication, and it directly undermines trust boundaries in microservices architectures. Organizations should treat this as a P1 remediation task, particularly those with internet-facing APIs or reliance on IP-based rate-limiting or geo-fencing.
Risk score, explained
The CVSS 3.1 score of 8.6 reflects a HIGH-severity network-accessible vulnerability with high integrity impact (I:H). The vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N indicates: network-accessible attack vector, low attack complexity, no privilege or user interaction required, and scope change (affecting resources beyond the vulnerable component). The confidentiality impact is none (the header spoofing itself does not leak secrets), but integrity is significantly compromised—downstream trust is broken. The scope-change metric reflects that the vulnerability affects not just the gateway but the broader ecosystem of backend services relying on its trust assertions.
Frequently asked questions
Can this be exploited if our Spring Cloud Gateway sits behind a reverse proxy or load balancer?
Yes. Attackers on the network path between the load balancer and the gateway, or able to send direct requests to the gateway, can exploit this. The vulnerability exists because the gateway does not validate whether the forwarded headers came from a trusted source. Load balancers themselves typically do validate headers, but if an attacker can route traffic directly to the gateway or if the configuration does not restrict header sources, the flaw remains exploitable. Proper mitigation requires the gateway to explicitly trust only known proxy IP ranges.
Do we need to patch all our Spring Cloud Gateway instances if only some handle untrusted traffic?
Yes. Even if some gateways are internal-only, the configuration weakness is the same. An internal threat actor or compromised service can exploit the vulnerability. Additionally, the distinction between internal and external traffic often blurs in cloud environments. Patching all instances provides defense-in-depth and prevents lateral movement attacks.
What should we configure after patching to prevent header spoofing?
After patching, configure the gateway's RemoteAddressResolver or ProxyHeadersFilter to explicitly whitelist the IP addresses or CIDR ranges of your reverse proxies and load balancers. Disable header forwarding for any untrusted network segments. If using Spring Cloud Gateway with Spring Security, ensure that authentication mechanisms do not rely solely on client IP extracted from these headers without additional verification, such as mutual TLS or signed headers.
Is this vulnerability being actively exploited in the wild?
This vulnerability is not currently listed on CISA's Known Exploited Vulnerabilities (KEV) catalog as of the advisory date. However, given the straightforward nature of the exploit and the widespread use of Spring Cloud Gateway, organizations should treat this as a high priority regardless of current threat activity. Public exploit code may emerge quickly after disclosure, making proactive patching essential.
This analysis is provided for informational purposes and reflects the vulnerability details as published on the advisory date (2026-06-15). Patch versions and affected software versions are as stated in the official vendor advisory; verify against the latest vendor guidance before deployment. Organizations should conduct their own risk assessment based on their specific Spring Cloud Gateway configurations and network architecture. SEC.co does not provide legal, compliance, or business advice. Consult your organization's security and development teams before applying patches to production systems. Exploit code or weaponized proofs-of-concept are not provided in this analysis. Source: NVD (public-domain), retrieved 2026-07-24. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2026-10846HIGHNLnet Labs ldns DNS Spoofing Vulnerability - Off-Path Poisoning Attack
- CVE-2026-11693HIGHGoogle Chrome Site Isolation Bypass via Plugin Flaw
- CVE-2026-41700HIGHSpring for GraphQL WebSocket Cross-Site Hijacking Vulnerability
- CVE-2026-42558HIGHXibo Stored XSS and Iframe Sandbox Escape in Data Connector
- CVE-2026-44698HIGHHome Assistant Companion App Token Theft Vulnerability
- CVE-2026-44894HIGHNetty QUIC Amplification Attack via NoQuicTokenHandler Default
- CVE-2026-45674HIGHNetty DNS CNAME Validation Bypass (CVSS 8.7 HIGH)
- CVE-2026-47265HIGHAIOHTTP Cookie Leak on Cross-Origin Redirects (CVSS 7.5)