HIGH

CVE-2026-59338

Unbounded Tika text extraction can exhaust JVM memory

Description

TikaDocumentReader in Spring AI uses Apache Tika to extract text from documents. Its default configuration disables Tika's built-in content-size limit, so the extracted text of a parsed document is buffered in memory with no absolute bound. Apache Tika still aborts a parse when the extracted text is disproportionate to the size of the input, which rejects highly compressed inputs such as archive bombs, but that guard is relative to the input and places no ceiling on the total amount of text extracted. An application that uses TikaDocumentReader to process documents from an untrusted source (e.g., user-uploaded files or attacker-supplied URLs) may therefore be induced to allocate an excessive amount of memory while parsing a sufficiently large document, potentially exhausting available JVM heap and causing a denial of service.

Affected Maven artifacts (1)

ArtifactAffected versionsFixed in
org.springframework.ai » spring-ai-tika-document-reader
>= 1.0.0, <= 1.0.10>= 1.1.0, <= 1.1.9>= 2.0.0, < 2.0.3
2.0.3

Blast radius

1affected artifacts
22affected versions
42dependent artifacts (est.)
309dependent versions

78% of the dependent artifacts (33) still pull an affected version in their latest release.

DepthDependent versions
Direct
151
2 hops
122
3 hops
34
4 hops
2

Most used dependents

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.