CVE-2026-47851 in Spring
Summary
by MITRE • 08/27/2026
Analyzing a PDF with a deeply nested or cyclic table of contents can cause a StackOverflowError in the ingestion thread. Spring AI 2.0.0 Spring AI 1.1.0 - 1.1.8 Spring AI 1.0.0 - 1.0.9
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 08/27/2026
The vulnerability described involves a denial of service condition within the document processing capabilities of Spring AI, specifically affecting versions ranging from 1.0.0 through 2.0.0. This issue arises when the application attempts to ingest or parse PDF files that contain deeply nested structures or cyclic references in their table of contents metadata. The core technical flaw lies in the recursive parsing logic used by the underlying document ingestion engine, which fails to implement adequate depth limits or cycle detection mechanisms for hierarchical data structures within PDF documents. When a maliciously crafted PDF is processed, the parser enters an infinite recursion loop as it attempts to resolve nested bookmarks or outline items that reference each other cyclically. This uncontrolled recursion consumes stack space rapidly until the Java Virtual Machine exhausts its allocated memory for thread stacks, resulting in a StackOverflowError.
From a security architecture perspective, this vulnerability represents a classic resource exhaustion attack vector where an attacker can trigger system instability without requiring authentication or elevated privileges if the ingestion endpoint is publicly accessible. The operational impact includes the immediate termination of the affected application thread, which may lead to service unavailability for other users sharing the same server resources depending on how the Spring AI integration handles exceptions and thread pooling. In worst-case scenarios involving shared hosting environments or containerized deployments with limited resource quotas, this could contribute to broader system instability or require manual intervention to restart services. The vulnerability aligns with CWE-674, which covers uncontrolled recursion, as well as CWE-400 concerning unconstrained resource consumption that leads to denial of service conditions.
The attack surface is primarily defined by any API endpoint or internal process that accepts PDF uploads for analysis, summarization, or data extraction using the vulnerable Spring AI versions. Attackers can exploit this by uploading specially constructed PDF files containing deeply nested outline entries or circular references in the document structure. These malformed documents trigger the recursive parsing routine repeatedly until the stack overflow occurs. This type of vulnerability is particularly dangerous because it does not require code execution but instead targets the availability component of the CIA triad, potentially disrupting business operations that rely on automated document processing pipelines.
Mitigation strategies should focus on both immediate patching and architectural hardening. The primary remediation step is to upgrade Spring AI to a version where this issue has been resolved by implementing proper depth limits for recursive parsing or adding cycle detection algorithms in the PDF ingestion module. Organizations unable to immediately update their dependencies can implement input validation at the network perimeter using web application firewalls that inspect uploaded files for suspicious structural patterns, although such signatures may be difficult to maintain due to the variability of malicious payloads. Additionally, deploying runtime protection mechanisms such as Java agent-based monitoring tools can help detect and terminate threads exhibiting abnormal stack depth growth before they cause a full system crash. It is also recommended to configure thread pools with appropriate rejection policies and timeouts to isolate failures from affecting other services running on the same infrastructure.