CVE-2026-41721
Executive Summary
CVE-2026-41721 is a high-severity Denial of Service (DoS) vulnerability in the Spring Data Commons library, affecting a wide range of versions from 2.7.0 up to 4.0.5. The flaw is triggered when Spring Data Web Support is enabled alongside a Controller method annotated with @ProjectedPayload. An attacker can send a specially crafted HTTP request that forces the application to allocate excessive memory, leading to resource exhaustion and service unavailability.
The vulnerability is classified under CWE-400 (Uncontrolled Resource Consumption) and has a CVSS score of 5.9 (Medium). While no public exploit code or proof-of-concept is currently available, the attack vector is network-based, requires no authentication, and involves low complexity, making it a significant risk for unpatched systems.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects the Spring Data Commons library, which is a core component of the Spring ecosystem. Organizations using Spring Boot or Spring Data REST are particularly at risk if they expose endpoints that leverage @ProjectedPayload. The library is distributed via Maven Central and is a transitive dependency for many Spring-based applications. Supply chain risk is elevated because the vulnerability exists in a widely used open-source component, and no official patch has been released at the time of this analysis. Teams should audit their dependency trees for affected versions and consider temporary mitigations.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The attack can be launched remotely.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – The impact is confined to the vulnerable component.
- Confidentiality (C): None (N) – No data exposure.
- Integrity (I): None (N) – No data modification.
- Availability (A): High (H) – Complete loss of availability due to resource exhaustion.
Threat Level: Medium. The vulnerability is easy to exploit remotely but only results in a denial of service, not data compromise. However, in critical production environments, a DoS can have severe business impact.
Deep Dive & Mechanics
The vulnerability resides in the Spring Data Web Support module, specifically in the handling of @ProjectedPayload annotations. When a controller method uses @ProjectedPayload, Spring Data attempts to deserialize the incoming request body into a projection interface. The flaw occurs because the deserialization process does not properly limit the size or complexity of the input data.
An attacker can craft an HTTP request with a payload that, when processed, triggers the allocation of an unbounded amount of memory. This can be achieved by sending a JSON or XML payload that contains deeply nested structures, repeated fields, or extremely large arrays. The application will attempt to map this payload to the projection interface, consuming all available heap memory and causing an OutOfMemoryError, effectively crashing the JVM or making the application unresponsive.
The root cause is a missing resource consumption guard in the ProjectedPayloadHandler or similar component. The fix would involve implementing input size validation, depth limits, or streaming deserialization to prevent memory exhaustion.
Vulnerable vs. Patched Code
Since no official patch is available, the following is a conceptual comparison.
Vulnerable Code (Conceptual):
@RestController
public class MyController {
@PostMapping("/data")
public ResponseEntity<?> handle(@ProjectedPayload MyProjection projection) {
// Process projection
return ResponseEntity.ok().build();
}
}
In this scenario, the @ProjectedPayload annotation triggers deserialization without any size checks.
Patched Code (Conceptual):
@RestController
public class MyController {
@PostMapping("/data")
public ResponseEntity<?> handle(@Valid @RequestBody @ProjectedPayload MyProjection projection) {
// Process projection with validation
return ResponseEntity.ok().build();
}
}
A patched version would include input validation (e.g., @Valid) and possibly a custom deserializer that enforces size limits. Additionally, the Spring Data Commons library would need to add a configuration option to limit the maximum payload size or depth.
Exploitation & Lab Setup
Red Team
Objective: Cause a Denial of Service on a target Spring application using @ProjectedPayload.
Prerequisites:
- Target application using Spring Data Commons (affected version).
- A controller endpoint annotated with
@ProjectedPayload. - Network access to the endpoint.
Exploitation Steps:
Identify the target endpoint. Use Shodan or manual reconnaissance to find Spring applications. Look for endpoints that accept POST requests with JSON/XML bodies.
Craft a malicious payload. Create a deeply nested JSON object or a very large array. Example:
{ "data": { "nested": { "deep": { "field": "value" } } } }For maximum impact, use a payload with thousands of nested objects or a massive array.
Send the request. Use
curlor a script to send the payload repeatedly.curl -X POST https://target.com/api/data \ -H "Content-Type: application/json" \ -d '{"data": {"nested": {"deep": {"field": "value"}}}}'Monitor resource exhaustion. The target application will consume memory until it crashes or becomes unresponsive.
Note: No public exploit code is available. The above is a conceptual approach.
Blue Team
Detection:
- Monitor for sudden spikes in memory usage on application servers.
- Look for HTTP requests with unusually large or deeply nested JSON/XML payloads.
- Use Web Application Firewall (WAF) rules to block requests exceeding a certain size or depth.
Mitigation:
- Disable
@ProjectedPayloadif not needed. - Implement input validation and size limits at the controller level.
- Use a reverse proxy (e.g., Nginx) to limit request body size.
- Apply rate limiting to prevent repeated attacks.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP POST requests with extremely large or deeply nested JSON/XML bodies.
- Repeated requests to endpoints using
@ProjectedPayload.
- System IOCs:
- Application logs showing
OutOfMemoryErrororjava.lang.OutOfMemoryError. - High memory usage in JVM heap dumps.
- Application crashes or unresponsive behavior.
- Application logs showing
- File IOCs:
- Heap dump files (
.hprof) generated during the attack.
- Heap dump files (
Detection Engineering
YARA Rule
rule CVE_2026_41721_Spring_Data_DoS {
meta:
description = "Detects potential exploitation of CVE-2026-41721 via large payloads"
author = "Valters IT"
date = "2026-01-01"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2026-41721"
strings:
$json_deep = /"\{[^}]*\{[^}]*\{[^}]*\{[^}]*\{[^}]*\{/" nocase
$xml_deep = /<[^>]+>[^<]*<[^>]+>[^<]*<[^>]+>[^<]*<[^>]+>/ nocase
$memory_error = "OutOfMemoryError" nocase
condition:
any of ($json_deep, $xml_deep) or $memory_error
}
Sigma Rule
title: CVE-2026-41721 Spring Data Commons DoS Exploitation
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP requests with deeply nested JSON/XML payloads targeting Spring endpoints
author: Valters IT
date: 2026-01-01
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: '/api/'
cs-user-agent|contains: 'curl'
condition: selection
falsepositives:
- Legitimate complex payloads from trusted sources
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2026-41721 Spring Data Commons DoS Attempt";
flow:to_server,established;
content:"POST"; http_method;
content:"/api/"; http_uri;
pcre:"/\{[^}]*\{[^}]*\{[^}]*\{/";
sid:1000001;
rev:1;
reference:cve,2026-41721;
classtype:attempted-dos;
priority:2;
)
Remediation & Mitigation
Immediate Actions:
- Disable
@ProjectedPayloadin all controller methods if not required. - Implement input validation using
@Validand custom validators to limit payload size and depth. - Configure a reverse proxy (e.g., Nginx, Apache) to limit request body size:
client_max_body_size 1m; - Apply rate limiting to prevent repeated requests from the same source.
Long-term Fix:
- Monitor the Spring Security Advisories for an official patch.
- Upgrade to a patched version once released (e.g., Spring Data Commons 4.0.6 or later).
- Consider using a Web Application Firewall (WAF) with rules to block deeply nested payloads.
Workaround:
- If upgrading is not possible, implement a custom
HandlerInterceptorto reject requests with excessive nesting or size before they reach the controller.
Valters IT
Securing Digital Frontiers