Critical Security Flaws in Python 3.14: Command Injection and XSS Vulnerabilities
Summary
ALSA-2026:28247: Important: python3.14 security, bug fix, and enhancement update. Affects python3.14 versions < 3.14.5-1.el9_8. Fixed in 3.14.5-1.el9_8. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
Python 3.14 is an interpreted, interactive, object-oriented programming language widely used for various applications, including web development, data analysis, artificial intelligence, and more. It features dynamic data types, extensive libraries, and a strong community support. However, recent vulnerabilities have been identified that could compromise the security of applications utilizing this version.
Vulnerability Detail
The vulnerabilities in Python 3.14 include arbitrary code execution via command injection in the webbrowser.open() API (CVE-2026-4786) and a Cross-Site Scripting (XSS) vulnerability in the http.cookies module (CVE-2026-6019). These vulnerabilities can allow attackers to execute malicious code or inject harmful scripts, potentially leading to unauthorized access, data breaches, or other security incidents.
How To Fix
Minimum fixed version
3.14.5-1.el9_8
This is the first release that contains the fix.
sudo dnf update python3.14
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary measure, avoid using the affected APIs until the package is updated. For web applications, implement input validation and sanitization to mitigate the risk of XSS attacks.
Conclusion
Python 3.14 has critical vulnerabilities that could expose applications to security risks. It is essential to update to the latest patched version to safeguard against potential exploits. Utilizing tools like Vulert can help monitor and manage vulnerabilities effectively.
See every vulnerability recorded for python3.14 →
FAQ
CVE-2026-4786 is a vulnerability that allows arbitrary code execution through command injection in the webbrowser.open() API of Python 3.14.
CVE-2026-6019 refers to a Cross-Site Scripting (XSS) vulnerability in the http.cookies module of Python 3.14, which can lead to script injection attacks.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Simply upload your manifest file like package-lock.json to check for vulnerabilities.
If an immediate update is not possible, implement input validation and avoid using the vulnerable APIs as a temporary workaround.
For detailed information, refer to the CVE pages for CVE-2026-4786 and CVE-2026-6019, which provide insights into the vulnerabilities and their impacts.
Related vulnerabilities
Recent vulnerabilities recorded for python3.14.