CVE-2023-46250
pypdf possible Infinite Loop when PdfWriter(clone_from) is used with a PDF
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.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
5.1
pypdf possible Infinite Loop when PdfWriter(clone_from) is used with a PDF
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.
- Record
CVE-2023-46250- CVSS 3.1
- 5.1 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-835
- Updated
- 2026-11-02
EUVDEUVD-2023-2830
5.1
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.
- Record
EUVD-2023-2830- CVSS 3.1
- 5.1 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-wjcc-cq79-p63f
5.1
Possible Infinite Loop when PdfWriter(clone_from) is used with a PDF
Impact
An attacker who uses this vulnerability 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.
Patches
The issue was fixed with #2264
Workarounds
If you cannot update your version of pypdf, you should modify pypdf/generic/_data_structures.py just like #2264 did.
- Record
GHSA-wjcc-cq79-p63f- CVSS 3.1
- 5.1 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-835
- Updated
- 2026-11-02
NVD
5.1
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.
- Record
CVE-2023-46250- CVSS 3.1
- 5.1 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Weakness
- CWE-835
- Updated
- 2026-11-02
OSV
5.1
pypdf possible Infinite Loop when PdfWriter(clone_from) is used with a PDF
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.
- Record
CVE-2023-46250- CVSS 3.1
- 5.1 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-835
- Updated
- 2026-11-04
OSVGHSA-wjcc-cq79-p63f
5.1
Possible Infinite Loop when PdfWriter(clone_from) is used with a PDF
Impact
An attacker who uses this vulnerability 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.
Patches
The issue was fixed with #2264
Workarounds
If you cannot update your version of pypdf, you should modify pypdf/generic/_data_structures.py just like #2264 did.
- Record
GHSA-wjcc-cq79-p63f- CVSS 3.1
- 5.1 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-835
- Updated
- 2026-11-02
OSVPYSEC-2026-1834
5.1
Possible Infinite Loop when PdfWriter(clone_from) is used with a PDF
Impact
An attacker who uses this vulnerability 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.
Patches
The issue was fixed with #2264
Workarounds
If you cannot update your version of pypdf, you should modify pypdf/generic/_data_structures.py just like #2264 did.
- Record
PYSEC-2026-1834- CVSS 3.1
- 5.1 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2023-46250
5.1
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.
- Record
UBUNTU-CVE-2023-46250- CVSS 3.1
- 5.1 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
pypdfPyPI |
3.7.0 up to 3.17.0 | 3.17.0 |
pypdfPyPI |
3.7.0 up to 3.17.0, plus listed versions 3.10.03.11.03.11.13.12.03.12.1 Show 19 moreShow less3.12.23.13.03.14.03.15.03.15.13.15.23.15.33.15.43.15.53.16.03.16.13.16.23.16.33.16.43.7.13.8.03.8.13.9.03.9.1 |
3.17.0 |
pypdf2Ubuntu:Pro:16.04:LTS |
All versions, plus listed versions 1.23+git20141008-11.25.1-11.25.1-1ubuntu0.1~esm11.25.1-1ubuntu0.1~esm2 |
None known |
pypdf2Ubuntu:Pro:18.04:LTS |
All versions, plus listed versions 1.26.0-21.26.0-2ubuntu0.1~esm11.26.0-2ubuntu0.1~esm2 |
None known |
pypdf2Ubuntu:20.04:LTS |
All versions, plus listed versions 1.26.0-21.26.0-3ubuntu11.26.0-3ubuntu1.20.04.11.26.0-3ubuntu1.20.04.2 |
None known |
pypdf2Ubuntu:22.04:LTS |
All versions, plus listed versions 1.26.0-41.26.0-4ubuntu0.22.04.11.26.0-4ubuntu0.22.04.2 |
None known |
pypdfUbuntu:24.04:LTS |
All versions, plus listed versions 3.4.1-13.17.4-14.0.0-14.0.1-14.0.2-1 |
None known |
pypdf2Ubuntu:24.04:LTS |
All versions, plus listed versions 2.12.1-32.12.1-4 |
None known |
pypdfUbuntu:25.10 |
All versions, plus listed versions 4.3.1-15.4.0-1 |
None known |
pypdfUbuntu:26.10 |
All versions, plus listed versions 6.9.2-16.9.2-2 |
None known |
pypdfUbuntu:26.04:LTS |
All versions, plus listed versions 5.4.0-16.9.2-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| facts | OSV | |
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2023-46250 is a medium vulnerability (CVSS 5.1) in Py-pdf Pypdf, published October 31, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.25%, the 17th percentile. Fixed in pypdf 3.17.0.
References
github.com/py-pdf/pypdf/security/advisories/GHSA-wjcc-cq79-p63f
github.com/py-pdf/pypdf/pull/2264
github.com/py-pdf/pypdf/commit/9b23ac3c9619492570011d551d521690de9a3e2d
nvd.nist.gov/vuln/detail/CVE-2023-46250
github.com/advisories/GHSA-wjcc-cq79-p63f
github.com/CVEProject/cvelistV5/tree/main/cves/2023/46xxx/CVE-2023-46250.json