CVE-2026-40260: CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion') in py-pdf pypdf
CVE-2026-40260 is a medium severity vulnerability in the py-pdf pypdf library prior to version 6. 10. 0. It involves improper restriction of recursive entity references in XML DTDs, specifically in XMP metadata parsing. An attacker can craft a malicious PDF with manipulated XMP metadata entity declarations that cause excessive memory consumption, potentially exhausting system RAM. This vulnerability has been fixed in pypdf version 6. 10. 0.
AI Analysis
Technical Summary
The vulnerability CVE-2026-40260 affects pypdf versions before 6.10.0 and is classified under CWE-776 (Improper Restriction of Recursive Entity References in DTDs). It arises when parsing XMP metadata in PDF files containing crafted entity declarations that recursively expand, leading to large memory usage and potential denial of service due to resource exhaustion. The issue has been addressed and fixed in version 6.10.0 of pypdf.
Potential Impact
Exploitation of this vulnerability allows an attacker to cause excessive memory consumption on systems parsing malicious PDFs with crafted XMP metadata. This can lead to denial of service conditions by exhausting available RAM. There is no indication of privilege escalation, code execution, or data disclosure from the provided information.
Mitigation Recommendations
Upgrade to pypdf version 6.10.0 or later, where this vulnerability has been fixed. Since this is a library vulnerability, applying the official patch by updating the software version is the recommended remediation. No other mitigation or temporary workaround is indicated.
CVE-2026-40260: CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion') in py-pdf pypdf
Description
CVE-2026-40260 is a medium severity vulnerability in the py-pdf pypdf library prior to version 6. 10. 0. It involves improper restriction of recursive entity references in XML DTDs, specifically in XMP metadata parsing. An attacker can craft a malicious PDF with manipulated XMP metadata entity declarations that cause excessive memory consumption, potentially exhausting system RAM. This vulnerability has been fixed in pypdf version 6. 10. 0.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability CVE-2026-40260 affects pypdf versions before 6.10.0 and is classified under CWE-776 (Improper Restriction of Recursive Entity References in DTDs). It arises when parsing XMP metadata in PDF files containing crafted entity declarations that recursively expand, leading to large memory usage and potential denial of service due to resource exhaustion. The issue has been addressed and fixed in version 6.10.0 of pypdf.
Potential Impact
Exploitation of this vulnerability allows an attacker to cause excessive memory consumption on systems parsing malicious PDFs with crafted XMP metadata. This can lead to denial of service conditions by exhausting available RAM. There is no indication of privilege escalation, code execution, or data disclosure from the provided information.
Mitigation Recommendations
Upgrade to pypdf version 6.10.0 or later, where this vulnerability has been fixed. Since this is a library vulnerability, applying the official patch by updating the software version is the recommended remediation. No other mitigation or temporary workaround is indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-10T17:31:45.787Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69e1716682d89c981fde6ff3
Added to database: 4/16/2026, 11:31:50 PM
Last enriched: 4/16/2026, 11:46:57 PM
Last updated: 4/17/2026, 12:52:43 AM
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.