Executive brief
A vulnerability in the Python standard library's 'webbrowser' module could allow an attacker to execute unauthorized commands on a user's system. This occurs when a specially crafted URL is opened, bypassing previous security fixes intended to prevent malicious command injection. If an application uses this module to open links provided by users, it could lead to a full system compromise or unauthorized data access.
Technical details
This vulnerability is a regression or incomplete fix for CVE-2026-4519 within the CPython 'webbrowser' module. The original mitigation intended to prevent command injection by checking for dash-prefixed arguments that could be interpreted as shell flags; however, this check could be bypassed if a URL contained the '%action' string. When the 'webbrowser.open()' API is called, an attacker can inject arbitrary commands into the underlying shell on certain browser types. The issue affects multiple active CPython branches including 3.10 through 3.14. Patches have been developed to properly sanitize the '%action' substitution and enforce dash-prefix restrictions.
Affected products
- Python Software Foundation CPython 3.10, 3.11, 3.12, 3.13, 3.14
Timeline
- 2026-03-31: other: Initial fix developed in CPython repository
- 2026-04-06: disclosed: Issue reported on GitHub and PRs opened
- 2026-04-13: patched: Fixes merged into CPython main branch
- 2026-04-13: advisory: NVD advisory published
References
- https://github.com/python/cpython/commit/28b4ad38067bbdad34edfcd03ad2de5f06387e53
- https://github.com/python/cpython/commit/c5767a72838a8dda9d6dc5d3558075b055c56bca
- https://github.com/python/cpython/commit/d22922c8a7958353689dc4763dd72da2dea03fff
- https://github.com/python/cpython/commit/d6d68494be70bdbda20f89f83801ba52ec37daa4
- https://github.com/python/cpython/commit/f4654824ae0850ac87227fb270f9057477946769
- https://github.com/python/cpython/issues/148169
- https://github.com/python/cpython/pull/148170