Every CVE Search/ Get API key

CVE-2023-46250

pypdf possible Infinite Loop when PdfWriter(clone_from) is used with a PDF

5.1 MediumFix available

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

0.25%Up 0.2 points since Nov 1, 2023
90%50%10%1%

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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 3.1
5.5 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 3.1
5.5 MediumCVSS: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

Affected packages
PackageAffectedFixed
pypdf
PyPI
3.7.0 up to 3.17.0
3.17.0
pypdf
PyPI
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 less
3.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
pypdf2
Ubuntu: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
pypdf2
Ubuntu: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
pypdf2
Ubuntu: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
pypdf2
Ubuntu: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
pypdf
Ubuntu: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
pypdf2
Ubuntu:24.04:LTS
All versions, plus listed versions
2.12.1-32.12.1-4
None known
pypdf
Ubuntu:25.10
All versions, plus listed versions
4.3.1-15.4.0-1
None known
pypdf
Ubuntu:26.10
All versions, plus listed versions
6.9.2-16.9.2-2
None known
pypdf
Ubuntu:26.04:LTS
All versions, plus listed versions
5.4.0-16.9.2-1
None known

History

History
RecordedChangedSources
factsOSV
aliases, publishedEUVD
first indexedCVE 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

Show 4 moreShow less
MoveEnter Open