CVE-2021-29421
Python vulnerability analysis and mitigation

Overview

The vulnerability CVE-2021-29421 affects the pikepdf package versions 1.3.0 through 2.9.2 for Python. The vulnerability was discovered in the models/metadata.py component and allows XML External Entity (XXE) attacks when parsing XMP metadata entries. The issue was reported by Eric Therond of Sonarsource and was fixed in pikepdf version 2.10.0, released in April 2021 (GitHub Commit, Fedora Update).

Technical details

The vulnerability exists in the XMP metadata parsing functionality of pikepdf. The issue occurs because the XML parser did not have proper protections against XXE attacks. The fix involved implementing a custom XMLParser class that explicitly disables entity resolution and network access by setting 'resolveentities=False' and 'nonetwork=True' parameters (GitHub Commit).

Impact

An attacker who can supply a specially crafted PDF file could potentially exploit this vulnerability to read arbitrary files on the system through XML external entity processing when the PDF's XMP metadata is parsed (Red Hat CVE).

Mitigation and workarounds

Users should upgrade to pikepdf version 2.10.0 or later which includes the fix for this vulnerability. The fix prevents XXE attacks by implementing proper XML parser configuration that disables entity resolution and network access (Fedora Update).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-67511CRITICAL9.6
  • PythonPython
  • cai-framework
NoNoDec 09, 2025
CVE-2025-66645HIGH7.5
  • PythonPython
  • nicegui
NoYesDec 09, 2025
GHSA-9rwj-6rc7-p77cHIGH7.3
  • PythonPython
  • langgraph-checkpoint-sqlite
NoYesDec 10, 2025
CVE-2025-67502MEDIUM5.4
  • PythonPython
  • taguette
NoYesDec 10, 2025
CVE-2025-67485MEDIUM5.3
  • PythonPython
  • mad-proxy
NoNoDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management