cvelo
P2 · HighCVSS 7.5EPSS 0.4%

Denial of Service via regex-recursion

  • CVE-2026-59345
  • GHSA-9rpf-xhrg-8h45
  • EUVD-2026-141029

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.

Text from the CVE.org record.

Affected

  • Spring Spring AI

    • from 2.0.0 to before 2.0.2.1
    • from 1.1.0 to before 1.1.10
    • from 1.0.0 to before 1.0.11
    • from 2.0.0 to before 2.0.3

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.