Critical XML External Entity Vulnerability in Python Packages

python2.7 Updated 02 Oct 2025

Summary

22/08/2023
N/A
Yes i
Critical
9.8

UBUNTU-CVE-2022-48565: An XML External Entity (XXE) issue was discovered in Python through 3.9.1. Affects python2.7 versions < 2.7.6-8ubuntu0.6+esm16. Fixed in 2.7.6-8ubuntu0.6+esm16. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Python is a widely-used high-level programming language known for its readability and versatility. It supports multiple programming paradigms and is extensively used in web development, data analysis, artificial intelligence, and more. The affected packages, including python2.7, python3.5, python3.4, and others, are essential components of various applications, providing core functionalities for executing Python code. This vulnerability exposes these packages to potential XML External Entity (XXE) attacks, which can lead to unauthorized access to sensitive data and system resources.

Vulnerability Detail

An XML External Entity (XXE) issue was discovered in Python through version 3.9.1. The vulnerability arises from the plistlib module, which previously accepted entity declarations in XML plist files. This acceptance can be exploited by attackers to manipulate XML data, potentially leading to data exfiltration, denial of service, or other malicious activities. The CVSS score for this vulnerability is 9.8, indicating a critical severity level, which underscores the urgency for remediation.

How To Fix

Minimum fixed version

2.7.6-8ubuntu0.6+esm16

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python2.7

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate patching is not feasible, consider disabling the XML parsing functionality or validating XML input to prevent the processing of potentially malicious XML data. This can be done by implementing stricter input validation or using alternative libraries that do not exhibit this vulnerability.

Conclusion

The XML External Entity vulnerability in Python packages poses a significant risk to applications relying on these components. It is crucial to update to the patched versions of the affected packages to mitigate potential threats. Users should also consider implementing workarounds if immediate updates are not feasible.

See every vulnerability recorded for python2.7 →

Share this vulnerability

FAQ

An XXE vulnerability allows an attacker to interfere with the processing of XML data, potentially leading to unauthorized access to sensitive files or services.

You can use the Vulert platform to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without any signup.

Exploitation of this vulnerability can lead to data breaches, denial of service, and unauthorized access to sensitive information.

Yes, patched versions of the affected Python packages are available. Ensure to update to the latest versions to mitigate the risk.

If immediate updates are not possible, implement workarounds such as disabling XML parsing or validating XML input to reduce the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for python2.7.

How To Fix

Minimum fixed version

2.7.6-8ubuntu0.6+esm16

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python2.7

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback