org.springframework.cloud:spring-cloud-gateway-server@2.2.10.RELEASE

  • latest version

    4.3.5

  • latest non vulnerable version

  • first published

    5 years ago

  • latest version published

    9 days ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the org.springframework.cloud:spring-cloud-gateway-server package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • H
    Use of Less Trusted Source

    Affected versions of this package are vulnerable to Use of Less Trusted Source. Spring Cloud Gateway Server forwards the X-Forwarded-For and Forwarded request headers it receives from untrusted proxies to downstream services. Both the WebFlux and WebMVC Gateway Servers process these headers via their forwarded-header filters (e.g. XForwardedHeadersFilter / ForwardedHeadersFilter and, in WebFlux, the NettyServerCustomizer), but when no trusted-proxy configuration is present the gateway does not strip the incoming headers before proxying the request. An attacker who can reach the gateway can therefore send a forged X-Forwarded-For or Forwarded header that the gateway passes through unchanged to backend services. Downstream applications that trust these headers for client-IP-based access control, rate limiting, audit logging, or geolocation can be misled, enabling IP allowlist/denylist bypass, source-address spoofing, and log forgery.

    Note:

    This is only exploitable in certain configuration scenarios: when forwarded-header handling is enabled but the trusted proxy property is not set (so the gateway has no basis to distinguish trusted from untrusted proxies), or when relying on the WebFlux NettyServerCustomizer.

    How to fix Use of Less Trusted Source?

    Upgrade org.springframework.cloud:spring-cloud-gateway-server to version 4.3.5 or higher.

    [,4.3.5)
    • H
    Expression Language Injection

    Affected versions of this package are vulnerable to Expression Language Injection in route definitions. An attacker with permission to define routes can expose the server's file structure or other sensitive environment variables by crafting a SpEL expression to access sensitive system beans such as @systemProperties and @systemEnvironment

    Note: Additional fixed versions might be available for commercial users of Spring Enterprise.

    How to fix Expression Language Injection?

    Upgrade org.springframework.cloud:spring-cloud-gateway-server to version 4.2.6, 4.3.2 or higher.

    [,4.2.6)[4.3.0,4.3.2)
    • C
    Expression Language Injection

    Affected versions of this package are vulnerable to Expression Language Injection in the GatewayEvaluationContext method, which allows property modification that in turn enables code execution.

    Only Webflux applications are vulnerable, not WebMVC applications. Additionally, the following conditions must be true to render an application vulnerable:

    • Spring Boot actuator is a dependency.

    • The Spring Cloud Gateway Server Webflux actuator web endpoint is enabled via management.endpoints.web.exposure.include=gateway.

    How to fix Expression Language Injection?

    Upgrade org.springframework.cloud:spring-cloud-gateway-server to version 4.2.5, 4.3.1 or higher.

    [,4.2.5)[4.3.0,4.3.1)
    • H
    Unintended Proxy or Intermediary ('Confused Deputy')

    Affected versions of this package are vulnerable to Unintended Proxy or Intermediary ('Confused Deputy') due to the improper validation of X-Forwarded-For and Forwarded headers forwarded from untrusted proxies. An attacker can manipulate the server's behavior by sending crafted headers from an untrusted proxy.

    Notes:

    1. The vulnerability was also fixed in version 4.0.12, a commercial version;

    2. The X-Forwarded-* and Forwarded header functionality will be disabled by default with the fix versions. If you require X-Forwarded-* or Forwarded header functionality, after upgrading you will need to set spring.cloud.gateway.trusted-proxies to a Java Regular Expression that specifies the proxies whose headers you trust. If you are using Spring Cloud Gateway Server MVC (only available from 4.1.x onward) set spring.cloud.gateway.mvc.trusted-proxies.

    How to fix Unintended Proxy or Intermediary ('Confused Deputy')?

    Upgrade org.springframework.cloud:spring-cloud-gateway-server to version 3.1.10, 4.1.8, 4.2.3 or higher.

    [,3.1.10)[4.0.0,4.1.8)[4.2.0,4.2.3)
    • C
    Arbitrary Code Injection

    Affected versions of this package are vulnerable to Arbitrary Code Injection via a maliciously crafted request. Note: This requires the Gateway Actuator endpoint to be enabled, exposed and insecure.

    How to fix Arbitrary Code Injection?

    Upgrade org.springframework.cloud:spring-cloud-gateway-server to version 3.0.7, 3.1.1 or higher.

    [,3.0.7)[3.1.0,3.1.1)