GHSA-4xc4-762w-m6cg

Suggest an improvement
Source
https://github.com/advisories/GHSA-4xc4-762w-m6cg
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/01/GHSA-4xc4-762w-m6cg/GHSA-4xc4-762w-m6cg.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-4xc4-762w-m6cg
Aliases
Published
2026-01-09T19:48:22Z
Modified
2026-01-11T15:09:51.327176Z
Severity
  • 2.7 (Low) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U CVSS Calculator
Summary
pypdf has possible long runtimes for missing /Root object with large /Size values
Details

Impact

An attacker who exploits this vulnerability can craft a PDF which leads to possibly long runtimes for actually invalid files. This can be achieved by omitting the /Root entry in the trailer, while using a rather large /Size value. Only the non-strict reading mode is affected.

Patches

This has been fixed in pypdf==6.6.0.

Workarounds

from pypdf import PdfReader, PdfWriter


# Instead of
reader = PdfReader("file.pdf")
# use the strict mode:
reader = PdfReader("file.pdf", strict=True)

# Instead of
writer = PdfWriter(clone_from="file.pdf")
# use an explicit strict reader:
writer = PdfWriter(clone_from=PdfReader("file.pdf", strict=True))

Resources

This issue has been fixed in #3594.

Database specific
{
    "cwe_ids": [
        "CWE-400"
    ],
    "severity": "LOW",
    "nvd_published_at": "2026-01-10T05:16:01Z",
    "github_reviewed": true,
    "github_reviewed_at": "2026-01-09T19:48:22Z"
}
References

Affected packages

PyPI / pypdf

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.6.0

Affected versions

1.*

1.0
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
1.10
1.11
1.12
1.13

3.*

3.1.0
3.2.0
3.2.1
3.3.0
3.4.0
3.4.1
3.5.0
3.5.1
3.5.2
3.6.0
3.7.0
3.7.1
3.8.0
3.8.1
3.9.0
3.9.1
3.10.0
3.11.0
3.11.1
3.12.0
3.12.1
3.12.2
3.13.0
3.14.0
3.15.0
3.15.1
3.15.2
3.15.3
3.15.4
3.15.5
3.16.0
3.16.1
3.16.2
3.16.3
3.16.4
3.17.0
3.17.1
3.17.2
3.17.3
3.17.4

4.*

4.0.0
4.0.1
4.0.2
4.1.0
4.2.0
4.3.0
4.3.1

5.*

5.0.0
5.0.1
5.1.0
5.2.0
5.3.0
5.3.1
5.4.0
5.5.0
5.6.0
5.6.1
5.7.0
5.8.0
5.9.0

6.*

6.0.0
6.1.0
6.1.1
6.1.2
6.1.3
6.2.0
6.3.0
6.4.0
6.4.1
6.4.2
6.5.0

Database specific

source

"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/01/GHSA-4xc4-762w-m6cg/GHSA-4xc4-762w-m6cg.json"