2.3low
pypdf: Unvalidated JPEG image data loading
- Severity
- 2.3low CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.40% (higher than 36% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-5hx5-vpf9-5wcv
Description
pypdf is a free and open-source pure-python PDF library. Prior to 6.21.1, an attacker can craft a PDF containing image data labeled with the /DCTDecode filter that causes Pillow to select and invoke an unintended image parser when the image is loaded. Environments without the optional Pillow dependency are not affected. This issue is fixed in version 6.21.1.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| py-pdf pypdf | < 6.21.1 | CVE List |
| pypdf (PyPI) | before 6.21.1 | GitHub Advisory Database |
All scores
| GitHub_M | 2.3low CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N |
| GitHub | low CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N |
Classification
What each source says
CVE List
pypdf is a free and open-source pure-python PDF library. Prior to 6.21.1, an attacker can craft a PDF containing image data labeled with the /DCTDecode filter that causes Pillow to select and invoke an unintended image parser when the image is loaded. Environments without the optional Pillow dependency are not affected. This issue is fixed in version 6.21.1.
GitHub Advisory Database
Impact
An attacker who uses this vulnerability can craft a PDF which leads to arbitrary image parsers being called. This requires loading an image which claims to use the /DCTDecode filter (JPEG data).
Users which do not have the optional Pillow dependency installed in their environment are not affected.
Patches
This has been fixed in pypdf==6.21.1.
Workarounds
If you cannot upgrade yet, consider applying the changes from PR #4222.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-113786 changed 2026-10-27 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-5hx5-vpf9-5wcv changed 2026-10-21 | CC-BY-4.0 |
| NVD | CVE-2026-113786 changed 2026-10-27 | Public domain |