Skip to content

Arbitrary command execution in qutebrowser on Windows via URL handler

High
The-Compiler published GHSA-vw27-fwjf-5qxm Oct 21, 2021

Package

pip qutebrowser (pip)

Affected versions

>= 1.7.0

Patched versions

2.4.0

Description

Impact

Starting with qutebrowser v1.7.0, the Windows installer for qutebrowser registers it as a handler for certain URL schemes. With some applications such as Outlook Desktop, opening a specially crafted URL can lead to argument injection, allowing execution of qutebrowser commands, which in turn allows arbitrary code execution via commands such as :spawn or :debug-pyeval.

Only Windows installs where qutebrowser is registered as URL handler are affected. It does not have to be set as default browser for the exploit to work.

Patches

The issue has been fixed in qutebrowser v2.4.0 in commit 8f46ba3.

The fix also adds additional hardening for potential similar issues on Linux (by adding the new --untrusted-args flag to the .desktop file), though no such vulnerabilities are known.

Backported patches for older versions are available, but no further releases are planned:

(commits are referring to qutebrowser/qutebrowser on GitHub)

Workarounds

Remove qutebrowser from the default browser settings entirely, so that it does not handle any kind of URLs. Make sure to remove all handlers, including an (accidental) qutebrowserURL handler, e.g. using NirSoft URLProtocolView.

Timeline

2021-10-15: Issue reported via security@qutebrowser.org by Ping Fan (Zetta) Ke of Valkyrie-X Security Research Group (VXRL)
2021-10-15: Issue confirmed by @The-Compiler (lead developer), author of installer (@bitraid) contacted for help/review
2021-10-15: CVE assigned by GitHub
2021-10-15 to 2021-10-17: Fix developed
2021-10-17: Additional core developer (@toofar) contacted for help/review
2021-10-21: v2.4.0 released containing the fix
2021-10-21: Advisory and fix published

References

See the commit message for additional information and references to various similar issues in other projects.

Acknowledgements

Thanks to Ping Fan (Zetta) Ke of Valkyrie-X Security Research Group (VXRL/@vxresearch) for finding and responsibly disclosing this issue.

Contact

If you have any questions or comments about this advisory, please email security@qutebrowser.org.

Severity

High
8.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

CVE ID

CVE-2021-41146