CVE-2026-59338
HighCVSS 7.5Exploitation Probability (EPSS)
Low risk34th percentile - higher than 34% of all known CVEs
Summary
TikaDocumentReader in Spring AI uses Apache Tika to extract text from documents, and its default configuration disables Tika's built-in content-size limit. Extracted text is buffered in memory with no absolute bound, and Tika's guard against disproportionate text does not cap the total amount extracted. An application processing documents from an untrusted source may be induced to allocate excessive memory.
Risk Assessment
An attacker can upload a sufficiently large document, exhausting JVM heap and causing denial of service. This particularly affects applications accepting user-uploaded files or fetching documents from attacker-supplied URLs.
Recommendation
Update Spring AI to a version with the fix, or enable an absolute limit on extracted text size in Tika. Restrict the size of processed documents and avoid processing untrusted documents without additional safeguards.
Other vulnerabilities in Spring AI
See all- CVE-2026-59369High
TypesenseVectorStore is vulnerable to a filter expression injection that can bypass application-enforced metadata filters. TypesenseFilterExpressionConverter escapes user-controlled filter values only as JSON string literals before embedding them in the filter_by string, but Typesense's tokenizer does not treat those escapes as delimiting a literal value, so a crafted value can terminate the intended clause and introduce additional filter conditions. Applications incorporating untrusted input into metadata filter values passed to SearchRequest.filterExpression(...) are affected.
- CVE-2026-59361High
RedisVectorStore is vulnerable to RediSearch query injection when metadata filter expressions are built from untrusted values. RedisFilterExpressionConverter translates Spring AI filter expressions into RediSearch query clauses but escapes only a subset of characters treated as query syntax, so a value from an untrusted source can change the query structure. Compound filter expressions are additionally emitted without grouping, so operator precedence can alter their meaning.
- CVE-2026-59345High
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. A crafted document can exhaust the thread's stack, causing an uncaught StackOverflowError and crashing the processing thread; repeated submissions can degrade or deny service to all users.
- CVE-2026-59344High
CoherenceVectorStore is vulnerable to a metadata filter bypass when evaluating filter expressions against an Oracle Coherence backend. CoherenceFilterExpressionConverter builds its underlying Coherence extractor directly from a quoted key in the Spring AI filter DSL, without validating that the key text represents a literal metadata field name. Certain key strings are interpreted by Coherence as operations on the metadata object itself, which can cause a filter to match documents it was never meant to match.
- CVE-2026-59339High
FilterExpressionTextParser, the vector store filter expression parser in Spring AI, is vulnerable to denial of service when parsing untrusted filter expressions. The recursive-descent ANTLR4 parser has no nesting depth limit, and parse() only catches ParseCancellationException, so deeply nested parentheses cause unbounded recursion and an uncaught StackOverflowError. Applications accepting filter expressions from untrusted input, such as via QuestionAnswerAdvisor.FILTER_EXPRESSION or SearchRequest.withFilterExpression(), are impacted.
- CVE-2026-59337Low
The full prompt, which may contain end-user PII and proprietary system prompts, is written to the WARN log and shipped to centralized log stores with broader read access than the originating tenant. This may lead to leakage of sensitive data.
- CVE-2026-59319Medium
RedisChatMemoryRepository.findByMetadata() builds RediSearch tag and text queries from caller-supplied metadata values without applying RediSearchUtil.escape(), unlike get(), clear(), and findByTimeRange() in the same class which do escape their inputs. An application that passes user-controlled values to findByMetadata() on a tag-typed metadata field allows an attacker to inject RediSearch syntax (e.g. x} | *) that breaks out of the tag clause and matches all indexed chat messages across every conversation in the index. Affects Spring AI 2.0.0.
- CVE-2026-59294Medium
ResourceCacheService.getCacheName() builds the on-disk filename by appending the URI fragment verbatim, without stripping path separators or .. sequences, and passes the result to new File(resourceParentFolder, newFileName) before writing the downloaded bytes there. Affects Spring AI versions 2.0.0, 1.1.0-1.1.8, and 1.0.9 and earlier.
- CVE-2026-47852High
A local attacker on a multi-user host can pre-create the deterministic cache path and plant a malicious ONNX model file. Affects Spring AI versions 2.0.0, 1.1.0-1.1.8, and 1.0.0-1.0.9.
- CVE-2026-47851High
Analyzing a PDF with a deeply nested or cyclic table of contents can cause a StackOverflowError in the ingestion thread. Affects Spring AI versions 2.0.0, 1.1.0-1.1.8, and 1.0.0-1.0.9.
Original NVD description (English source)
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.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

