Information Exposure Affecting pypdf package, versions [,7.0.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.44% (31st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-PYPDF-22733155
  • published22 Nov 2026
  • disclosed21 Nov 2026
  • creditsuperboy-zjc

Introduced: 21 Nov 2026

NewCVE-2026-134364  (opens in a new tab)
CWE-200  (opens in a new tab)

How to fix?

Upgrade pypdf to version 7.0.0 or higher.

Overview

pypdf is an A pure-python PDF library capable of splitting, merging, cropping, and transforming PDF files

Affected versions of this package are vulnerable to Information Exposure via deterministic, content-derived MD5 file identifiers generated by generate_file_identifiers in pypdf/_writer.py. Because file identifiers are computed as an MD5 hash of the document content, an attacker who possesses a document built from the same low-entropy template can analyze the file identifiers of other encrypted documents sharing that template and recover placeholder contents from those encrypted PDFs. The fix replaces the deterministic MD5-based identifier with a cryptographically random value via secrets.token_bytes.

Note: This is only exploitable when the attacker has access to a document sharing the same template as the target encrypted document, as well as the file identifiers of the target documents.

References

CVSS Base Scores

version 4.0
version 3.1