CVE-2025-41243
Java vulnerability analysis and mitigation

Overview

CVE-2025-41243 is a critical Spring Expression Language (SpEL) injection vulnerability in Spring Cloud Gateway Server WebFlux that allows unauthenticated remote attackers to modify Spring Environment properties, potentially leading to full system compromise. It was initially reported on September 8, 2025, and publicly disclosed on September 16, 2025. Affected versions include Spring Cloud Gateway 3.1.0–3.1.x (before 3.1.11), 4.0.0–4.1.x (before 4.1.11), 4.2.0–4.2.x (before 4.2.5), and 4.3.0–4.3.x (before 4.3.1); Spring Cloud Gateway Server WebMVC is not affected. The vulnerability carries a CVSS v3.1 base score of 10.0 (Critical) (Spring Advisory, GitHub Advisory).

Technical details

The root cause is improper neutralization of special elements in an Expression Language statement (CWE-94, CWE-917), allowing code injection via the Spring Cloud Gateway actuator endpoint. When the gateway actuator web endpoint is exposed and unsecured (management.endpoints.web.exposure.include=gateway), an unauthenticated attacker can send crafted HTTP requests to manipulate Spring Environment properties using SpEL expressions. Exploitation requires five concurrent conditions: use of the WebFlux variant (not WebMVC), Spring Boot Actuator as a dependency, the gateway actuator endpoint enabled and exposed to the network, and the endpoint left unsecured without authentication. A public proof-of-concept exploit exists at https://github.com/SFN233/CVE-2025-41243-Vulnerability-Lab, and a technical write-up is available at https://psytester.github.io/CVE-2025-41243_Spring_SpEL_property_modification (Spring Advisory, GitHub Advisory).

Impact

Successful exploitation allows unauthenticated remote attackers to inject malicious SpEL expressions into the Spring Environment configuration, resulting in complete system compromise across confidentiality, integrity, and availability dimensions. Attackers can gain unauthorized access to sensitive application data, modify application behavior and routing logic, and potentially cause denial-of-service conditions. The changed scope in the CVSS rating indicates that a compromised gateway component can impact resources beyond its own security boundary, enabling lateral movement within microservice architectures that rely on the gateway for routing and access control (Spring Advisory, GitHub Advisory).

Exploitation steps

  1. Reconnaissance: Use tools like Shodan, Censys, or Nuclei templates to identify internet-facing Spring Cloud Gateway Server WebFlux instances running affected versions (3.1.0–3.1.10, 4.0.0–4.1.10, 4.2.0–4.2.4, 4.3.0).
  2. Verify actuator exposure: Probe the target for the exposed gateway actuator endpoint by sending a GET request to /actuator/gateway or /actuator/gateway/routes. A successful response (HTTP 200) without authentication confirms the endpoint is exposed and unsecured.
  3. Identify property modification endpoint: Target the Spring Cloud Gateway actuator's environment or refresh endpoints (e.g., /actuator/gateway/env or similar property-setting endpoints) that accept POST requests.
  4. Craft SpEL injection payload: Construct a POST request with a JSON body containing a malicious Spring Expression Language expression as a property value, designed to execute arbitrary code or exfiltrate environment data (e.g., {"name": "spring.cloud.gateway.x", "value": "#{T(java.lang.Runtime).getRuntime().exec('id')}"}).
  5. Submit payload: Send the crafted POST request to the actuator endpoint. The server evaluates the SpEL expression within the Spring Environment context, executing the injected code.
  6. Achieve objective: Leverage code execution to establish a reverse shell, exfiltrate secrets (e.g., database credentials, API keys from environment properties), or pivot to internal services accessible through the gateway (Spring Advisory, GitHub Advisory).

Indicators of compromise

  • Network: Unexpected HTTP POST requests to /actuator/gateway or sub-paths (e.g., /actuator/gateway/env, /actuator/gateway/refresh) from external or untrusted IP addresses; outbound connections from the gateway server to unknown external hosts following actuator access.
  • Logs: Spring Boot application logs showing SpEL expression evaluation errors or unusual property modification events; access logs recording POST requests to actuator endpoints from unauthenticated sources; log entries referencing org.springframework.expression or EvaluationException in unexpected contexts.
  • Process: Unusual child processes spawned by the Java process running Spring Cloud Gateway (e.g., sh, bash, curl, wget, python); unexpected network connections initiated by the JVM process.
  • File System: New or modified files in the application working directory created by the gateway process; unexpected scripts or binaries dropped in temp directories accessible by the service account.

Mitigation and workarounds

Upgrade Spring Cloud Gateway to the following patched versions: 3.1.11 (Enterprise), 4.1.11 (covers 4.0.x and 4.1.x), 4.2.5, or 4.3.1 (OSS), depending on the currently deployed version. If immediate upgrade is not possible, remove gateway from the management.endpoints.web.exposure.include configuration property to disable the vulnerable actuator endpoint, or secure the actuator endpoints by requiring authentication via Spring Security. Additionally, implement network-level access controls (firewall rules, API gateway policies) to restrict actuator endpoint access to trusted internal sources only. Audit all deployments to identify instances meeting all five vulnerability conditions and prioritize patching of exposed, unsecured instances (Spring Advisory, GitHub Advisory).

Community reactions

Spring (Broadcom/VMware) published the official security advisory on September 8, 2025, crediting researcher Ezzer17 for responsible disclosure. VMware Tanzu published a blog post titled "The $5 Million Question: What Is Your Spring Cloud Gateway Vulnerability Really Costing You," highlighting the business risk of unpatched instances. SecurityOnline.info covered the vulnerability and the subsequent PoC release, noting the CVSS 10.0 score. The vulnerability appeared in the CISA weekly vulnerability bulletin (SB25-265) and was featured in community roundups such as the CVEWatch subreddit's trending CVEs list. Nuclei templates from ProjectDiscovery and Emerging Threats IDS rules were rapidly developed and released, reflecting strong community engagement in detection tooling (Spring Advisory, GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Java vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-10050HIGH8.7
  • Java logoJava
  • confluent-kafka
NoYesAug 04, 2026
CVE-2026-59920MEDIUM6.5
  • Java logoJava
  • netty
NoYesJul 29, 2026
CVE-2026-59898MEDIUM6.3
  • Java logoJava
  • strimzi-kafka-operator
NoYesJul 29, 2026
CVE-2026-59919MEDIUM5.5
  • Java logoJava
  • apache-polaris
NoYesJul 29, 2026
CVE-2026-53573MEDIUM4.8
  • Java logoJava
  • org.geonetwork-opensource:geonetwork
NoYesJul 31, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management