CVE-2026-59345
Denial of Service via regex-recursion
Description
ExtractedTextFormatter is vulnerable to a denial of service when processing untrusted text extracted from documents.
trimAdjacentBlankLines() and alignToLeft() collapse runs of blank lines using regular expressions with a quantified group, and Java's backtracking regex engine recurses one stack frame per repetition of that group. A specially crafted document can exploit this to exhaust the calling thread's stack, resulting in an uncaught StackOverflowError. This crashes the thread processing the document; repeated submissions against a bounded worker pool can degrade or deny service to all users, even though any single crash is thread-local rather than JVM-wide. Any application that processes documents from untrusted sources (document upload, email attachment processing, RAG ingestion, web crawling) through TikaDocumentReader, PagePdfDocumentReader, or ParagraphPdfDocumentReader is impacted, regardless of file type.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.springframework.ai » spring-ai-commons | >= 1.0.0, <= 1.0.10>= 1.1.0, <= 1.1.9>= 2.0.0, < 2.0.3 | 2.0.3 |
Blast radius
83% of the dependent artifacts (1,250) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 586 |
| 2 hops | 2,890 |
| 3 hops | 6,926 |
| 4 hops | 5,154 |
| 5 hops | 1,172 |
| 6 hops | 466 |
Most used dependents
- org.springframework.ai » spring-ai-model341 usages
- org.springframework.ai » spring-ai-client-chat283 usages
- org.springframework.ai » spring-ai-openai119 usages
- org.springframework.ai » spring-ai-vector-store119 usages
- org.springframework.ai » spring-ai-starter-model-openai86 usages
- org.springframework.ai » spring-ai-mcp74 usages
- org.springframework.ai » spring-ai-starter-mcp-server-webmvc74 usages
- com.embabel.agent » embabel-agent-api67 usages
- com.alibaba.cloud.ai » spring-ai-alibaba-core63 usages
- io.github.loom-ai-labs » ai-fabric-core57 usages
- org.springframework.ai » spring-ai-starter-mcp-server54 usages
- org.springframework.ai » spring-ai-starter-model-anthropic51 usages
- org.springframework.ai » spring-ai-autoconfigure-model-tool51 usages
- com.alibaba.cloud.ai » spring-ai-alibaba-dashscope50 usages
- org.springframework.ai » spring-ai-transformers47 usages
Computed from the dependency graph of build 20261125.2201 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
