Spring AI Vulnerable to OOM by attacker-controlled PDF
Date: 2026-04
Affected: maven/org.springframework.ai:spring-ai-pdf-document-reader, maven/org.springframework.ai:spring-ai-pdf-document-reader
Attack vector: dos
Category: vulnerability-disclosure
Severity: Medium
CVE: CVE-2026-40980
CWE: CWE-400
CVSS: 6.5 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)

In Spring AI, a malicious PDF file can be crafted that triggers the allocation of unreasonable amounts of memory when handled by `ForkPDFLayoutTextStripper`. Affected versions: Spring AI: 1.0.0 - 1.0.5 (fixed in 1.0.6), 1.1.0 - 1.1.4 (fixed in 1.1.5)


Mitigations:

Architectural layers (MAESTRO):