Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-4519: Vulnerability in Python Software Foundation CPython

0
Medium
VulnerabilityCVE-2026-4519cvecve-2026-4519
Published: Fri Mar 20 2026 (03/20/2026, 15:08:32 UTC)
Source: CVE Database V5
Vendor/Project: Python Software Foundation
Product: CPython

Description

CVE-2026-4519 is a medium severity vulnerability in the Python CPython webbrowser. open() API where URLs with leading dashes could be interpreted as command line options by certain web browsers. This behavior could potentially be exploited if an attacker controls the URL input, leading to unintended command line argument parsing. The vulnerability requires local access with low privileges and partial authentication, with no user interaction needed. The Python Software Foundation has updated the behavior to reject URLs with leading dashes, and users are advised to sanitize URLs before passing them to webbrowser. open(). No known exploits are currently reported in the wild. Organizations using Python's webbrowser module in security-sensitive contexts should review and update their code to mitigate risks.

AI-Powered Analysis

AILast updated: 03/20/2026, 15:38:40 UTC

Technical Analysis

CVE-2026-4519 identifies a vulnerability in the Python Software Foundation's CPython implementation, specifically within the webbrowser.open() API. The issue arises because the API previously accepted URLs beginning with leading dashes ('-'). Certain web browsers interpret such leading dashes as command line options rather than as part of the URL. This can cause the browser to process these inputs as command line arguments, potentially altering browser behavior or enabling unintended command execution scenarios. The new behavior introduced in CPython rejects URLs with leading dashes to prevent this ambiguity. The vulnerability requires local access with low privileges and partial authentication, and does not require user interaction. The CVSS 4.0 score is 5.7 (medium severity), reflecting moderate impact on integrity and availability, with a high attack complexity and partial authentication required. No known exploits have been reported in the wild, and no patches or updates are explicitly linked, but users are recommended to sanitize URLs before passing them to webbrowser.open() to avoid this issue. This vulnerability primarily affects applications and scripts that invoke webbrowser.open() with untrusted or unsanitized URL inputs, potentially leading to command line injection or unexpected browser behavior.

Potential Impact

The vulnerability could allow an attacker who can influence the URL passed to webbrowser.open() to cause the browser to interpret the URL as command line options. This may lead to unintended browser behavior, potentially impacting the integrity and availability of the system or browser session. While the attack complexity is high and partial authentication is required, the impact could be significant in environments where Python scripts are used to automate browser launches with user-supplied URLs, such as in automated testing, web scraping, or internal tooling. Exploitation could disrupt normal operations or enable further attacks if combined with other vulnerabilities. Since the vulnerability does not allow direct remote exploitation and requires local privileges, the overall risk is moderate but should not be ignored in sensitive environments.

Mitigation Recommendations

To mitigate this vulnerability, developers should sanitize and validate all URLs before passing them to webbrowser.open(), explicitly rejecting or removing leading dashes. Implement input validation routines that enforce strict URL formatting and reject malformed or suspicious inputs. Update CPython to the latest version where the behavior rejecting leading dashes is implemented. Avoid passing user-controlled or untrusted URLs directly to webbrowser.open() without proper sanitization. Additionally, consider running Python scripts with the least privileges necessary and monitor for unusual browser behaviors or command line invocations. Employ application whitelisting and endpoint protection to detect anomalous command executions triggered by browser launches. Regularly review and audit codebases that use webbrowser.open() to ensure compliance with these practices.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
PSF
Date Reserved
2026-03-20T15:01:11.126Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69bd66a5e32a4fbe5fa5cd32

Added to database: 3/20/2026, 3:24:21 PM

Last enriched: 3/20/2026, 3:38:40 PM

Last updated: 3/20/2026, 4:28:44 PM

Views: 41

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses