CVE-2026-41314: pypdf Manipulated FlateDecode Image Dimensions Can Vulnerability
MODERATECVE-2026-41314 is a MODERATE (CVSS 6.5) manipulated flatedecode image dimensions can vulnerability (CWE-789: Memory Allocation with Excessive Size Value) affecting pypdf libraries in the PyPI ecosystem. The issue involves manipulated flatedecode image dimensions can exhaust ram. Remediation is available by upgrading affected packages to version 6.10.2.
CVE-2026-41314 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-41314
To remediate this vulnerability, upgrade all affected pypdf dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pypdf>=6.10.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pypdf
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-41314, inspect your installed packages using pip:
pip show pypdf
Analyze the terminal output to locate any version of pypdf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.10.2), your application is affected.
Note: The pip show pypdf command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-789: Memory Allocation with Excessive Size Value, where the product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated. In pypdf, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-41314 Affected pypdf Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pypdf
|
PyPI |
< 6.10.2
|
6.10.2
|
References
Frequently Asked Questions
What is CVE-2026-41314?
Which pypdf versions are affected?
What version fixes CVE-2026-41314?
Is pypdf affected?
What is the CVSS score of CVE-2026-41314?
What CWE is associated with CVE-2026-41314?
How can I check PyPI dependencies for CVE-2026-41314?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x284-j5p8-9c5p",
"modified" : "2026-05-05T15:44:27Z",
"published" : "2026-04-16T21:30:25Z",
"aliases" : [ "CVE-2026-41314" ],
"summary" : "pypdf: Manipulated FlateDecode image dimensions can exhaust RAM",
"details" : "### Impact\nAn attacker who uses this vulnerability can craft a PDF which leads to the RAM being exhausted. This requires accessing an image using `/FlateDecode` with large size values.\n\n### Patches\nThis has been fixed in [pypdf==6.10.2](https://github.com/py-pdf/pypdf/releases/tag/6.10.2).\n\n### Workarounds\nIf you cannot upgrade yet, consider applying the changes from PR [#3734](https://github.com/py-pdf/pypdf/pull/3734).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pypdf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.10.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/py-pdf/pypdf/security/advisories/GHSA-x284-j5p8-9c5p"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41314"
}, {
"type" : "WEB",
"url" : "https://github.com/py-pdf/pypdf/pull/3734"
}, {
"type" : "WEB",
"url" : "https://github.com/py-pdf/pypdf/commit/ac734dab4eef92bcce50d503949b4d9887d89f11"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/py-pdf/pypdf"
}, {
"type" : "WEB",
"url" : "https://github.com/py-pdf/pypdf/releases/tag/6.10.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-789" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-16T21:30:25Z",
"nvd_published_at" : "2026-04-22T22:16:32Z"
}
}