{"id":"UBUNTU-CVE-2025-66221","details":"Werkzeug is a comprehensive WSGI web application library. Prior to version 3.1.4, Werkzeug's safe_join function allows path segments with Windows device names. On Windows, there are special device names such as CON, AUX, etc that are implicitly present and readable in every directory. send_from_directory uses safe_join to safely serve files at user-specified paths under a directory. If the application is running on Windows, and the requested path ends with a special device name, the file will be opened successfully, but reading will hang indefinitely. This issue has been patched in version 3.1.4.","modified":"2025-12-11T08:45:52.082629Z","published":"2025-11-29T03:16:00Z","withdrawn":"2025-12-11T05:36:09Z","upstream":["CVE-2025-66221"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2025-66221"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2025-66221"},{"type":"REPORT","url":"https://github.com/pallets/werkzeug/security/advisories/GHSA-hgf8-39gv-g3f2"},{"type":"REPORT","url":"https://github.com/pallets/werkzeug/commit/4b833376a45c323a189cd11d2362bcffdb1c0c13"},{"type":"REPORT","url":"https://github.com/pallets/werkzeug/releases/tag/3.1.4"}],"affected":[{"package":{"name":"python-werkzeug","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/python-werkzeug@0.10.4+dfsg1-1ubuntu1.2+esm2?arch=source&distro=esm-infra/xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.10.4+dfsg1-1ubuntu1","0.10.4+dfsg1-1ubuntu1.1","0.10.4+dfsg1-1ubuntu1.2","0.10.4+dfsg1-1ubuntu1.2+esm1","0.10.4+dfsg1-1ubuntu1.2+esm2"],"ecosystem_specific":{"binaries":[{"binary_name":"python-werkzeug","binary_version":"0.10.4+dfsg1-1ubuntu1.2+esm2"},{"binary_name":"python3-werkzeug","binary_version":"0.10.4+dfsg1-1ubuntu1.2+esm2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-66221.json"}},{"package":{"name":"python-werkzeug","ecosystem":"Ubuntu:Pro:18.04:LTS","purl":"pkg:deb/ubuntu/python-werkzeug@0.14.1+dfsg1-1ubuntu0.2+esm1?arch=source&distro=esm-infra/bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.12.2+dfsg1-2","0.13+dfsg1-1","0.14.1+dfsg1-1","0.14.1+dfsg1-1ubuntu0.1","0.14.1+dfsg1-1ubuntu0.2","0.14.1+dfsg1-1ubuntu0.2+esm1"],"ecosystem_specific":{"binaries":[{"binary_version":"0.14.1+dfsg1-1ubuntu0.2+esm1","binary_name":"python-werkzeug"},{"binary_name":"python3-werkzeug","binary_version":"0.14.1+dfsg1-1ubuntu0.2+esm1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-66221.json"}},{"package":{"name":"python-werkzeug","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/python-werkzeug@0.16.1+dfsg1-2ubuntu0.2?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.14.1+dfsg1-4","0.15.6+dfsg1-1","0.16.0+dfsg1-1","0.16.1+dfsg1-1ubuntu1","0.16.1+dfsg1-2","0.16.1+dfsg1-2ubuntu0.1","0.16.1+dfsg1-2ubuntu0.2"],"ecosystem_specific":{"binaries":[{"binary_name":"python3-werkzeug","binary_version":"0.16.1+dfsg1-2ubuntu0.2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-66221.json"}},{"package":{"name":"python-werkzeug","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/python-werkzeug@2.0.2+dfsg1-1ubuntu0.22.04.3?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.1+dfsg1-2","2.0.2+dfsg1-1","2.0.2+dfsg1-1ubuntu0.22.04.1","2.0.2+dfsg1-1ubuntu0.22.04.2","2.0.2+dfsg1-1ubuntu0.22.04.3"],"ecosystem_specific":{"binaries":[{"binary_name":"python3-werkzeug","binary_version":"2.0.2+dfsg1-1ubuntu0.22.04.3"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-66221.json"}},{"package":{"name":"python-werkzeug","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/python-werkzeug@3.0.1-3ubuntu0.2?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.2.2-3","3.0.1-1","3.0.1-2","3.0.1-3","3.0.1-3ubuntu0.1","3.0.1-3ubuntu0.2"],"ecosystem_specific":{"binaries":[{"binary_name":"python3-werkzeug","binary_version":"3.0.1-3ubuntu0.2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-66221.json"}},{"package":{"name":"python-werkzeug","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/python-werkzeug@3.1.3-2?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.1.3-2"],"ecosystem_specific":{"binaries":[{"binary_name":"python3-werkzeug","binary_version":"3.1.3-2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-66221.json"}},{"package":{"name":"python-werkzeug","ecosystem":"Ubuntu:25.04","purl":"pkg:deb/ubuntu/python-werkzeug@3.1.3-2?arch=source&distro=plucky"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.3-1","3.0.4-1ubuntu1","3.1.3-2"],"ecosystem_specific":{"binaries":[{"binary_version":"3.1.3-2","binary_name":"python3-werkzeug"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-66221.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"},{"type":"Ubuntu","score":"medium"}]}