# CVE-2026-40989: VMware Spring Cloud Function infinite recursion in routing layer

Source: https://junglewise.ai/threats/cve-2026-40989-vmware-spring-cloud-function-infinite-recursion-in-routing-layer  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-01. Updated: 2026-07-09  
License: CC BY 4.0 with a link back

CVE-2026-40989 · Severity: medium · CVSS 5.7 · Published 2026-06-01

Spring Cloud Function, a framework used to build cloud-native functions, is vulnerable to a denial-of-service condition. An attacker can trigger a recursive loop within the system's routing layer, causing the application to run out of memory and crash. This can lead to service outages and impact business operations that rely on these automated functions.

Technologies: [org.springframework.cloud:spring-cloud-function-context (Maven)](https://junglewise.ai/threats/technologies/org-springframework-cloud-spring-cloud-function-context), [VMware Spring Cloud Function](https://junglewise.ai/threats/technologies/spring-cloud-function). Vendors: [Maven](https://junglewise.ai/threats/vendors/maven), [VMware](https://junglewise.ai/threats/vendors/vmware).

## Quick answers

**Is CVE-2026-40989 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-40989 being exploited in the wild.

**How severe is CVE-2026-40989?** Medium severity, with a CVSS score of 5.7, published 1 June 2026.

**Which products and versions are affected?** org.springframework.cloud:spring-cloud-function-context (Maven) ECOSYSTEM:introduced=4.3.0,fixed=4.3.3; VMware Spring Cloud Function 3.2.x prior to 3.2.16, 4.1.x prior to 4.1.10, 4.2.x prior to 4.2.6, 4.3.x prior to 4.3.3, 5.0.x prior to 5.0.2.

**Is there a fix for CVE-2026-40989?** Yes. org.springframework.cloud:spring-cloud-function-context (Maven): upgrade to 4.3.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-40989 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-40989?** Check whether you run org.springframework.cloud:spring-cloud-function-context (Maven) or VMware Spring Cloud Function at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- org.springframework.cloud:spring-cloud-function-context (Maven): upgrade to 4.3.3 or later

  ```sh
  # set org.springframework.cloud:spring-cloud-function-context to 4.3.3 in your pom.xml or build.gradle
  ```


## Technical details

A vulnerability classified as Uncontrolled Recursion (CWE-674) exists in the routing layer of Spring Cloud Function. The issue stems from how the FunctionRegistry handles recursive composition and request routing. An authenticated attacker can exploit this by sending specifically crafted requests that trigger infinite recursion, leading to an Out of Memory (OOM) error and a subsequent Denial of Service (DoS). While some advisory sources suggest physical access requirements, the NVD assessment indicates a network-based attack vector is possible with low privileges. Patches have been released across multiple major versions (3.2.16, 4.1.10, 4.2.6, 4.3.3, and 5.0.2).

## Affected products

- VMware Spring Cloud Function 3.2.x prior to 3.2.16, 4.1.x prior to 4.1.10, 4.2.x prior to 4.2.6, 4.3.x prior to 4.3.3, 5.0.x prior to 5.0.2

## Identifiers

- CVE-2026-40989
- GHSA-x9c7-5h6g-hq8q

## Timeline

- 2026-06-01: disclosed
- 2026-06-01: advisory

## References

- [https://spring.io/security/cve-2026-40989](https://spring.io/security/cve-2026-40989)
- [https://github.com/spring-cloud/spring-cloud-function/commit/6bcd55803c5a2ce0adec794fee1e03c2fac36cf9](https://github.com/spring-cloud/spring-cloud-function/commit/6bcd55803c5a2ce0adec794fee1e03c2fac36cf9)

## Related threats

- [Spring Cloud Function Azure sensitive data logging](https://junglewise.ai/threats/cve-2026-59301-spring-cloud-function-azure-sensitive-data-logging)
- [Spring Cloud Function sensitive data logging in AWS integration](https://junglewise.ai/threats/cve-2026-59300-spring-cloud-function-sensitive-data-logging-in-aws-integration)
- [Spring Cloud Function arbitrary file read and SSRF](https://junglewise.ai/threats/cve-2026-59291-spring-cloud-function-arbitrary-file-read-and-ssrf)
- [VMware Spring Cloud Function resource exhaustion in Function Registry](https://junglewise.ai/threats/cve-2026-40990-vmware-spring-cloud-function-resource-exhaustion-in-function)
- [Spring Cloud Function Framework vulnerable to Denial of Service](https://junglewise.ai/threats/cve-2024-22271-spring-cloud-function-framework-vulnerable-to-denial-of-service)
