Highlights
Denial of Service: 45 prior fixes. Scrutinize any change in this area.
pypdf/_reader.py: most-fixed (7 issues). Treat as high-risk during review.
10 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns
The bug types that recur here, drawn from past fixes, not open vulnerabilities.
Denial of Service: Recursive, malformed, or unconstrained stream decoding parameters (such as FlateDecode, LZWDecode, and RunLengthDecode) allow remote attackers to consume excessive CPU or exhaust memory via zip-bomb structures or inefficient byte-by-byte loops. Proper limits on input bytes, decompression output limits, and native libraries must be enforced.
Denial of Service: Recursive parsing of dictionary structures and array elements without loop detection or recursion limit checks can cause infinite loops or stack overflows. Ensuring that loop detection triggers hard errors instead of being silently swallowed in non-strict reading mode is critical.
Denial of Service: Processing malformed or circular references in PDF cross-reference tables (xref) and streams can trigger CPU exhaustion from infinite loops or division-by-zero errors. Stream sizes must be validated against declared count parameters before allocating resources or scanning backwards.