CVE-2026-27628: Pypdf Pypdf Has A Possible Infinite Vulnerability
LOWCVE-2026-27628 is a LOW pypdf has a possible infinite vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Pypdf libraries in the PyPI ecosystem. The issue involves pypdf has a possible infinite loop when loading circular /prev entries in cross-reference streams. Remediation is available by upgrading affected packages to version 6.7.2.
CVE-2026-27628 at a Glance
How to Fix CVE-2026-27628
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.7.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-27628, 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.7.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-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. 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-27628 Affected Pypdf Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pypdf
|
PyPI |
< 6.7.2
|
6.7.2
|
References
Frequently Asked Questions
What is CVE-2026-27628?
Which Pypdf versions are affected?
What version fixes CVE-2026-27628?
Is pypdf affected?
What CWE is associated with CVE-2026-27628?
How can I check PyPI dependencies for CVE-2026-27628?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2rw7-x74f-jg35",
"modified" : "2026-02-25T16:09:03Z",
"published" : "2026-02-25T16:09:03Z",
"aliases" : [ "CVE-2026-27628" ],
"summary" : "pypdf has a possible infinite loop when loading circular /Prev entries in cross-reference streams",
"details" : "### Impact\n\nAn attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires reading the file.\n\n### Patches\n\nThis has been fixed in [pypdf==6.7.2](https://github.com/py-pdf/pypdf/releases/tag/6.7.2).\n\n### Workarounds\n\nIf users cannot upgrade yet, consider applying the changes from PR [#3655](https://github.com/py-pdf/pypdf/pull/3655).",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pypdf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.7.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/py-pdf/pypdf/security/advisories/GHSA-2rw7-x74f-jg35"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-27628"
}, {
"type" : "WEB",
"url" : "https://github.com/py-pdf/pypdf/issues/3654"
}, {
"type" : "WEB",
"url" : "https://github.com/py-pdf/pypdf/commit/f0a462d36971cf077d74492a348d0d06fd60ea4d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/py-pdf/pypdf"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-835" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-25T16:09:03Z",
"nvd_published_at" : "2026-02-25T03:16:06Z"
}
}