Patch Released for High-Severity DoS Flaw in smalot/pdfparser

A high-severity denial-of-service vulnerability has been patched in the smalot/pdfparser PHP library. The flaw, identified as CVE-2026-134129, allowed remote attackers to exhaust server resources by submitting crafted PDFs with deeply nested unbalanced parentheses. This triggered inefficient algorithmic complexity in the formatContent() function, causing processing times to grow quadratically. The issue affected versions prior to 2.14.0 and was rated 8.7 on the CVSS 4.0 scale. A fix was released on November 27, 2026, and users are advised to upgrade immediately.
Key points
- The vulnerability, CVE-2026-134129, affects smalot/pdfparser versions prior to 2.14.0 and is classified as a high-severity denial-of-service issue.
- The flaw stems from inefficient algorithmic complexity (CWE-407) in the PDFObject::formatContent() function, which rescans growing content on each pass, resulting in O(n^2) processing time.
- Attackers can exploit this by submitting a small, crafted PDF with deeply nested unbalanced parentheses, causing the library to stall or exhaust PHP worker resources for seconds to minutes.
- The vulnerability has a CVSS 4.0 score of 8.7 and a CVSS 3.1 score of 7.5, with a network attack vector, low complexity, and no required privileges or user interaction.
- A secondary impact involves the silent loss of text for elements larger than approximately 64 KB, as the rebuilt regular expression fails to compile, allowing crafted PDFs to hide text from relying tools.
- The fix was released in version 2.14.0 on November 27, 2026, and includes hardening against unmatched brackets and operators that previously caused TypeErrors.
Background
This incident follows a recent trend of quadratic complexity denial-of-service vulnerabilities in PHP libraries, such as the one patched in web-token jwt-framework and jwt-library on November 26, 2026. It also aligns with other recent DoS patches in software like Tanium Zone Server and Android Zero Wire protocol, highlighting ongoing concerns over resource exhaustion via algorithmic inefficiencies.
Why it matters
The vulnerability poses a significant risk to any application using smalot/pdfparser to process untrusted PDFs, as it can lead to service unavailability and resource exhaustion. The high severity and ease of exploitation (no privileges or user interaction required) make it a critical issue for developers and system administrators. The secondary impact of silent text loss also raises concerns about data integrity and the reliability of text extraction tools.
What to watch
Users of smalot/pdfparser should upgrade to version 2.14.0 or later to mitigate the vulnerability. Developers should review their use of the library and ensure that untrusted PDFs are processed with the patched version. Monitoring for unusual resource usage in PHP workers may help detect potential exploitation attempts.
Want the full story? Read the original reporting
Read on CVEs | Zero Wire | Cloudflare Radar