pypdf possible Infinite Loop when PdfWriter(clone_from) is used with a PDF
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-835.
Summary
pypdf is a free and open-source pure-python PDF library. An attacker who uses a vulnerability present in versions 3.7.0 through 3.16.4 can craft a PDF which leads to an infinite loop. This infinite loop blocks the current process and can utilize a single core of the CPU by 100%. It does not affect memory usage. That is, for example, the case when the pypdf-user manipulates an incoming malicious PDF e.g. by merging it with another PDF or by adding annotations. The issue was fixed in version 3.17.0. As a workaround, apply the patch manually by modifying `pypdf/generic/_data_structures.py`.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| py-pdf | pypdf | 3.7.0 to before 3.17.0 | 3.17.0 | Patch available | CNA |
| — | pypdf (PyPI) | 3.7.0 to before 3.17.0 | 3.17.0 | Patch available | GHSA-wjcc-cq79-p63f |
- pypdf Vendorpy-pdf Affected 3.7.0 to before 3.17.0 Fixed in 3.17.0 Patch available CNA
- pypdf (PyPI) Vendor— Affected 3.7.0 to before 3.17.0 Fixed in 3.17.0 Patch available GHSA-wjcc-cq79-p63f
Remediation
- Fix · CNA pypdf (py-pdf) Fixed in 3.17.0
- Fix · GHSA-wjcc-cq79-p63f pypdf (PyPI) Fixed in 3.17.0 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2023-46250
- 2026-10-03 Alias added: GHSA-wjcc-cq79-p63f
References
More py-pdf Pypdf vulnerabilities
- TI-2023-18601 Infinite Loop when reading malformed objects in pypdf CVSS 3.1MEDIUM 6.5
- TI-2023-18305 Infinite Loop when a comment isn't followed by a character in pypdf CVSS 3.1MEDIUM 6.2
- TI-2026-42743 pypdf: Possible infinite loop for not terminated inline images CVSS 4.0HIGH 8.7
- TI-2026-42742 pypdf: Possible infinite loop for not terminated inline images (ASCII85 and ASCIIHex filter) CVSS 4.0HIGH 8.7
- TI-2026-65557 pypdf: Possible large memory usage when retrieving alphabetical page labels CVSS 4.0HIGH 8.7
- TI-2026-65556 pypdf: Possible long runtimes with large amount of embedded files CVSS 4.0HIGH 8.7
Sources
- CVE-2023-46250 · CVE Program
- CVE-2023-46250 · NVD
- FIRST EPSS
- GHSA-wjcc-cq79-p63f · GitHub Advisory Database · CC BY 4.0
- CVE-2023-46250 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences