Skip to content
Heist/ feed
Back to feed
Medium

Werkzeug safe_join not safe on Windows

Type: advisorySources: OSV

Werkzeug is a Web Server Gateway Interface web application library. On Python < 3.11 on Windows, os.path.isabs() does not catch UNC paths like //server/share. Werkzeug's safe_join() relies on this check, and so can produce a path that is not safe, potentially allowing unintended access to data. Applications using Python >= 3.11, or not using Windows, are not vulnerable. Werkzeug version 3.0.6 contains a patch.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-49766
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 03:27 UTC · Revision 1

Source evidence

Werkzeug safe_join not safe on Windows

core-osv · Original source

Published 25 Oct 2024, 19:22 UTC

Werkzeug is a Web Server Gateway Interface web application library. On Python < 3.11 on Windows, os.path.isabs() does not catch UNC paths like //server/share. Werkzeug's safe_join() relies on this check, and so can produce a path that is not safe, potentially allowing unintended access to data. Applications using Python >= 3.11, or not using Windows, are not vulnerable. Werkzeug version 3.0.6 contains a patch.

osv:CVE-2024-49766
Complete source record
{
  "id": "88ba3eb5f1190bcadfeae903f11ec895ac24be88d7a9e1a2f70b334e843fcdbd",
  "url": "https://osv.dev/vulnerability/CVE-2024-49766",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Werkzeug safe_join not safe on Windows",
    "summary": "Werkzeug is a Web Server Gateway Interface web application library. On Python < 3.11 on Windows, os.path.isabs() does not catch UNC paths like //server/share. Werkzeug's safe_join() relies on this check, and so can produce a path that is not safe, potentially allowing unintended access to data. Applications using Python >= 3.11, or not using Windows, are not vulnerable. Werkzeug version 3.0.6 contains a patch.",
    "evidence": "osv:CVE-2024-49766",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2024-49766",
      "aliases": [
        "CVE-2024-49766",
        "GHSA-f9vj-2wh5-fj8j",
        "PYSEC-2026-2045"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/pallets/werkzeug",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "5eaefc3996aa5cc8c5237d8b82f1b89eed6ea624"
                },
                {
                  "fixed": "2767bcb10a7dd1c297d812cc5e6d11a474c1f092"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:palletsprojects:werkzeug:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "3.0.6"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "2767bcb10a7dd1c297d812cc5e6d11a474c1f092"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "5eaefc3996aa5cc8c5237d8b82f1b89eed6ea624"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "3.0.6"
                  }
                ]
              }
            }
          ],
          "versions": [
            "3.0.2",
            "2.2.0",
            "2.2.0a1",
            "2.1.0",
            "2.0.0",
            "2.0.0rc5",
            "2.0.0rc4",
            "2.0.0rc3",
            "2.0.0rc2",
            "2.0.0rc1",
            "1.0.0",
            "1.0.0rc1",
            "0.15.0",
            "0.14",
            "0.13",
            "0.12",
            "0.11",
            "0.10",
            "0.9",
            "0.8",
            "0.7",
            "0.6.2",
            "0.6.1",
            "0.6",
            "0.4.1",
            "0.4",
            "0.3",
            "0.2",
            "0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-49766.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:42.451330851Z",
      "provider": "osv",
      "references": [
        "https://github.com/pallets/werkzeug/releases/tag/3.0.6",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/49xxx/CVE-2024-49766.json",
        "https://github.com/pallets/werkzeug/security/advisories/GHSA-f9vj-2wh5-fj8j",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-49766",
        "https://security.netapp.com/advisory/ntap-20250131-0005/",
        "https://github.com/pallets/werkzeug/commit/2767bcb10a7dd1c297d812cc5e6d11a474c1f092"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-22"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/49xxx/CVE-2024-49766.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-49766",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 509842,
  "published_at": "2024-10-25T19:22:36.38+00:00"
}