Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS13amNjLWNxNzktcDYzZs4AA21E
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.
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS13amNjLWNxNzktcDYzZs4AA21E
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: about 1 year ago
Updated: 11 months ago
CVSS Score: 5.1
CVSS vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Percentage: 0.00049
EPSS Percentile: 0.2044
Identifiers: GHSA-wjcc-cq79-p63f, CVE-2023-46250
References:
- https://github.com/py-pdf/pypdf/security/advisories/GHSA-wjcc-cq79-p63f
- https://nvd.nist.gov/vuln/detail/CVE-2023-46250
- https://github.com/py-pdf/pypdf/pull/2264
- https://github.com/py-pdf/pypdf/commit/9b23ac3c9619492570011d551d521690de9a3e2d
- https://github.com/advisories/GHSA-wjcc-cq79-p63f
Blast Radius: 18.3
Affected Packages
pypi:pypdf
Dependent packages: 390Dependent repositories: 3,809
Downloads: 7,940,972 last month
Affected Version Ranges: >= 3.7.0, < 3.17.0
Fixed in: 3.17.0
All affected versions: 3.7.0, 3.7.1, 3.8.0, 3.8.1, 3.9.0, 3.9.1, 3.10.0, 3.11.0, 3.11.1, 3.12.0, 3.12.1, 3.12.2, 3.13.0, 3.14.0, 3.15.0, 3.15.1, 3.15.2, 3.15.3, 3.15.4, 3.15.5, 3.16.0, 3.16.1, 3.16.2, 3.16.3, 3.16.4
All unaffected versions: 3.1.0, 3.2.0, 3.2.1, 3.3.0, 3.4.0, 3.4.1, 3.5.0, 3.5.1, 3.5.2, 3.6.0, 3.17.0, 3.17.1, 3.17.2, 3.17.3, 3.17.4, 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.2.0, 4.3.0, 4.3.1, 5.0.0, 5.0.1, 5.1.0