CVE-2026-113786: CWE-20: Improper Input Validation in py-pdf pypdf
Description
A vulnerability in pypdf prior to version 6.21.1 allows crafted PDFs with image data labeled as /DCTDecode to cause the Pillow library to invoke an unintended image parser. This improper input validation issue affects environments where the optional Pillow dependency is installed. The vulnerability is fixed in version 6.21.1.
CVSS v4.0
Score 2.3low
Affected software
py-pdf
pypdf
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The pypdf library, a pure-Python PDF processing tool, had an improper input validation vulnerability (CWE-20) before version 6.21.1. An attacker could craft a PDF containing image data tagged with the /DCTDecode filter that causes the Pillow image processing library to select and invoke an unintended image parser when loading the image. This issue only affects environments where Pillow is installed as an optional dependency. The vulnerability is addressed by updating pypdf to version 6.21.1.
Potential Impact
The vulnerability has a low CVSS score (2.3) indicating limited impact. It requires user interaction (opening a crafted PDF) and privileges are not required. The issue could potentially lead to unintended image parser invocation, but no direct code execution or data compromise is described. Environments without Pillow are not affected.
Mitigation Recommendations
Upgrade pypdf to version 6.21.1 or later, where this vulnerability is fixed. If Pillow is not used in the environment, the vulnerability does not apply.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-10-20T17:39:41.372Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ad8d3d84d27ba8daab76ef9
Added to database: 10/21/2026, 15:01:44 UTC
Last enriched: 10/21/2026, 15:15:21 UTC
Last updated: 10/21/2026, 15:15:21 UTC
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.