CVE-2023-36810: PyPDF2 quadratic runtime with malformed PDF missing xref marker
6.2
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.33324%
CWE
Published
6/30/2023
Updated
11/6/2023
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| PyPDF2 | pip | <= 1.27.8 | 1.27.9 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the readNextEndLine method's inefficient string handling. The commit diff shows the function was modified to replace sequential string concatenation (line = x + line) with a list-based approach (line_parts.append(x) followed by reverse+join). This change directly addresses the quadratic complexity issue described in CVE-2023-36810 and the associated GitHub advisory. The regression test added in Tests/test_reader.py confirms the performance impact relates to xref marker parsing.