CVE Catalog

CVE-2026-59345

HighCVSS 7.5
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.37%

32th percentile - higher than 32% of all known CVEs

Summary

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.

Risk Assessment

An attacker can submit crafted documents, causing thread crashes and worker pool exhaustion, leading to denial of service for all users. Applications processing documents from untrusted sources via TikaDocumentReader, PagePdfDocumentReader, or ParagraphPdfDocumentReader are affected.

Recommendation

Update Spring AI to a version containing the fix. Consider limiting the size and complexity of processed documents and monitoring thread crashes.

Other vulnerabilities in Spring AI

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS