Vulnerabilities · 2025 · Palletsprojects
CVE-2025-66221
Palletsprojects Werkzeug vulnerability
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.
Affected products
Werkzeug. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Palletsprojects Werkzeug runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/pallets/werkzeug/security/advisories/GHSA-hgf8-39gv-g3f2
- nvd.nist.gov/vuln/detail/CVE-2025-66221
- github.com/pallets/werkzeug/commit/4b833376a45c323a189cd11d2362bcffdb1c0c13
- github.com/pallets/werkzeug/releases/tag/3.1.4
- github.com/advisories/GHSA-hgf8-39gv-g3f2
- nvd.nist.gov/vuln/detail/CVE-2025-66221
- cve.org/CVERecord?id=CVE-2025-66221
More vulnerabilities in Palletsprojects products
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.