CVE-2023-46250 json
pypdf possible Infinite Loop when PdfWriter(clone_from) is used with a PDF
published 2023-10-31 3 y ago modified 2026-11-02 6 d ago also GHSA-wjcc-cq79-p63f , PYSEC-2026-1834 , EUVD-2023-2830
- cvss
- 5.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 17%
- public exploits
- 0
- none known
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`.
Patch / fix
- pypi pypdf 3.17.0
- py-pdf pypdf 3.17.0
- github.com/py-pdf/pypdf@9b23ac3 commit
- github.com/py-pdf/pypdf#2264 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2023-46250 updated cvss 5.1
pypdf: infinite loop condition may be triggered to cause denial of service
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.25% chance of exploitation in the next 30 days, higher than 17% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.1 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
| GitHub | 3.1 | 5.1 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | 3.1 | 5.1 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | pypdf | >=3.7.0, <3.17.0 |
3.17.0 |
Affected products
- py-pdf pypdf
Classification
- Weakness
-
- CWE-835 Loop with Unreachable Exit Condition
References
-
github.com
/py-pdf/pypdf/pull/2264
web, issue-tracking, patch
-
github.com
/py-pdf/pypdf/commit/9b23ac3c9619492570011d551d521690de9a3e2d
web, patch
-
github.com
/py-pdf/pypdf/security/advisories/GHSA-wjcc-cq79-p63f
web, vendor-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2023-46250
advisory
-
github.com
/py-pdf/pypdf
package
-
pypi.org
/project/pypdf
package
-
github.com
/advisories/GHSA-wjcc-cq79-p63f
advisory
Sources
- CVE List CVE-2023-46250
- GitHub Advisory GHSA-wjcc-cq79-p63f
- NVD CVE-2023-46250
- OSV PYSEC-2026-1834
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.