What happened
Spring AI 1.x/2.x PDF readers reconstruct layout from glyph positions and cap each computed gap's allocation but not the cumulative allocation across a page. A crafted PDF forces excessive memory allocation during processing, causing OutOfMemoryError and, under ExitOnOutOfMemoryError JVMs, immediate process termination. CVSS 6.5 (CVSS 3.1).
Why it matters
These readers are the RAG ingestion path for untrusted PDFs (document uploads, email attachments, web crawls). A single crafted PDF can crash or degrade the JVM that runs the embedding/RAG pipeline, enabling a remote denial-of-service against an AI application that ingests attacker-supplied documents.
Attack vector
Remote — supply a specially crafted PDF to an ingestion endpoint; memory exhaustion during text-extraction causes OOM/process termination.
Affected systems
Spring AI 2.0.0–2.0.3; 1.1.0–1.1.10; 1.0.0–1.0.11; enterprise 2.0.0–2.0.2.1
Mitigation
Upgrade to the fixed Spring AI version per spring.io advisory; validate/limit PDF size and depth at ingestion.