Skip to content
OpenAdvisories
Medium · 6.3 CVE-2026-21860 EUVD-2026-1425GHSA-87hc-h4r5-73f7PYSEC-2026-2044

Werkzeug safe_join() allows Windows special device names with compound extensions

Published Jan 8, 2026 · Updated Jan 8, 2026 · Assigned by GitHub_M

Description

Werkzeug is a comprehensive WSGI web application library. Prior to version 3.1.5, Werkzeug's safe_join function allows path segments with Windows device names that have file extensions or trailing spaces. On Windows, there are special device names such as CON, AUX, etc that are implicitly present and readable in every directory. Windows still accepts them with any file extension, such as CON.txt, or trailing spaces such as CON. This issue has been patched in version 3.1.5.

Affected products

VendorProductAffectedFixed
pallets werkzeug < 3.1.5 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Alpine v3.24 py3-werkzeug 3.1.5-r0 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI werkzeug < 3.1.5 3.1.5 GHSA-87hc-h4r5-73f7

Advisories 1

References