PSF-2026-14: webbrowser.open() allows leading dashes in URLs

Published Mar 20, 2026
·
Updated

The webbrowser.open() API would accept leading dashes in the URL which could be handled as command line options for certain web browsers. New behavior rejects leading dashes. Users are recommended to sanitize URLs prior to passing to webbrowser.open().

Affected Software

1 affected component
Python Software Foundation Python webbrowser module

Event History

Mar 20, 2026
CVE Published
via OSV·03:08 PM
Data Sourced
via OSV·03:08 PM
DescriptionSeverity

Frequently Asked Questions

1

What conditions are needed for exploitation?

An attacker needs to influence a URL passed to webbrowser.open() and have a user trigger the browser-opening action. The URL must begin with a dash so that an affected browser can interpret it as a command-line option.

2

Who is exposed?

Applications using Python's webbrowser module are exposed when they pass attacker-controlled or insufficiently validated URLs to webbrowser.open(). The impact depends on the web browser invoked and whether it handles leading-dash URLs as command-line options.

3

What should be done if updating is not immediately possible?

Sanitize and validate URLs before passing them to webbrowser.open(), specifically rejecting values that begin with a dash. Ensure user-controlled input cannot be supplied directly as the URL argument.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203