pypdf is a free and open-source pure-python PDF library. Prior to 6.13.1, an attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires merging a file with threads/articles into a writer. This vulnerability is fixed in 6.13.1.
PUBLISHED5.2CWE-835
pypdf: Possible infinite loop when processing threads/articles in writer
Problem type
Affected products
py-pdf
pypdf
< 6.13.1 - AFFECTED
References
https://github.com/py-pdf/pypdf/security/advisories/GHSA-g9xf-7f8q-9mcj
https://github.com/py-pdf/pypdf/security/advisories/GHSA-g9xf-7f8q-9mcj
https://github.com/py-pdf/pypdf/pull/3839
https://github.com/py-pdf/pypdf/pull/3839
https://github.com/py-pdf/pypdf/releases/tag/6.13.1
https://github.com/py-pdf/pypdf/releases/tag/6.13.1
JSON source
https://cveawg.mitre.org/api/cve/CVE-2026-54651Click to expand
{
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"cveMetadata": {
"cveId": "CVE-2026-54651",
"assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"assignerShortName": "GitHub_M",
"dateUpdated": "2026-06-22T20:28:28.412Z",
"dateReserved": "2026-06-15T20:16:46.198Z",
"datePublished": "2026-06-22T20:28:28.412Z",
"state": "PUBLISHED"
},
"containers": {
"cna": {
"providerMetadata": {
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M",
"dateUpdated": "2026-06-22T20:28:28.412Z"
},
"title": "pypdf: Possible infinite loop when processing threads/articles in writer",
"descriptions": [
{
"lang": "en",
"value": "pypdf is a free and open-source pure-python PDF library. Prior to 6.13.1, an attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires merging a file with threads/articles into a writer. This vulnerability is fixed in 6.13.1."
}
],
"affected": [
{
"vendor": "py-pdf",
"product": "pypdf",
"versions": [
{
"version": "< 6.13.1",
"status": "affected"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"lang": "en",
"description": "CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')",
"cweId": "CWE-835",
"type": "CWE"
}
]
}
],
"references": [
{
"url": "https://github.com/py-pdf/pypdf/security/advisories/GHSA-g9xf-7f8q-9mcj",
"name": "https://github.com/py-pdf/pypdf/security/advisories/GHSA-g9xf-7f8q-9mcj",
"tags": [
"x_refsource_CONFIRM"
]
},
{
"url": "https://github.com/py-pdf/pypdf/pull/3839",
"name": "https://github.com/py-pdf/pypdf/pull/3839",
"tags": [
"x_refsource_MISC"
]
},
{
"url": "https://github.com/py-pdf/pypdf/releases/tag/6.13.1",
"name": "https://github.com/py-pdf/pypdf/releases/tag/6.13.1",
"tags": [
"x_refsource_MISC"
]
}
],
"metrics": [
{}
]
}
}
}