pypdf: Manipulated XMP metadata streams can exhaust RAM
Description
Published by the National Vulnerability Database
May 28, 2026
Published to the GitHub Advisory Database
Jun 16, 2026
Reviewed
Jun 16, 2026
Last updated
Jun 16, 2026
Impact
An attacker who uses this vulnerability can craft a PDF which leads to large memory usage. This requires parsing large XMP metadata, possibly with lots of unnecessary elements.
Patches
This has been fixed in pypdf==6.12.1.
Workarounds
If you cannot upgrade yet, consider applying the changes from PR #3796.
References