---
schema_version: '1.0'
id: security-20261016-5c262e
title: 'CVE-2026-102598: Werkzeug safe_join() allows Windows special device names'
url: https://osv.dev/vulnerability/PYSEC-2026-4312
url_hash: 5c262e030f5fa5b93edee5259472a7df0dd151e16687c8ffc610202bc94b1d92
canonical_url: https://osv.dev/vulnerability/PYSEC-2026-4312
source: osv:pypa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-102598
- PYSEC-2026-4312
- severity: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
- werkzeug
- PyPI
lang: en
published_at: '2026-10-15T10:22:46Z'
fetched_at: '2026-10-16T11:21:45.501655Z'
updated_at: '2026-10-16T13:02:19Z'
status: published
content_hash: 9effc6bfc1e053e187699aee83aeb3ac5ff278af6ec5d4e95134ad9352ff2a0d
content_changed_at: null
license_note: full
summary: Werkzeug safe_join() allows Windows special device names
summary_source: rss
summary_en: Werkzeug safe_join() allows Windows special device names
summary_omitted_reason: null
redistribution: true
keywords_en:
- allows
- cve
- CVE-2026-102598
- device
- Joint Chiefs of Staff
- library vulnerability
- names
- PyPI
- PYSEC-2026-4312
- safe_join
- SafeSchoolCoordinatorIliya
- severity: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
- software security
- special
- werkzeug
- Windows
entities_en:
- name: Joint Chiefs of Staff
  type: organization
- name: SafeSchoolCoordinatorIliya
  type: person
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: SafeSchoolCoordinatorIliya
  type: person
- name: Joint Chiefs of Staff
  type: organization
key_facts: []
related: []
related_auto:
- name: IGPDisu
  type: person
  weight: 1.0
computed_at: '2026-10-16T13:02:09Z'
---

# CVE-2026-102598: Werkzeug safe_join() allows Windows special device names

## TL;DR
Werkzeug safe_join() allows Windows special device names

## Key Points
- cve / CVE-2026-102598 / PYSEC-2026-4312 / severity: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 / werkzeug / PyPI

## Details
**Severity:** 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
**Advisory:** PYSEC-2026-4312 (CVE-2026-102598)

**Details:**
Werkzeug's `safe_join` function allows Windows device names as filenames when they have an empty ADS marker on NTFS.

This was previously reported as https://github.com/pallets/werkzeug/security/advisories/GHSA-hgf8-39gv-g3f2, but the added filtering failed to account for the fact Windows allows special device names with an empty ADS marker, such as `NUL:`.

`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 NTFS, and the requested path ends with a special device name, the file will be opened successfully, but reading will hang indefinitely.

**References:**
- https://github.com/pallets/werkzeug/security/advisories/GHSA-g6x2-hccm-hh4m
- https://nvd.nist.gov/vuln/detail/CVE-2026-102598
- https://github.com/pallets/werkzeug/pull/3309
- https://github.com/pallets/werkzeug/commit/8d77320bcdf3a34941ec06dcf16b03c065cd21b6
- https://github.com/pallets/werkzeug
- https://github.com/pallets/werkzeug/releases/tag/3.1.9
- https://pypi.org/project/werkzeug
- https://github.com/advisories/GHSA-g6x2-hccm-hh4m

_Data: OSV.dev (upstream: pypa) — https://osv.dev/vulnerability/PYSEC-2026-4312_

## Source
元記事: [CVE-2026-102598: Werkzeug safe_join() allows Windows special device names](https://osv.dev/vulnerability/PYSEC-2026-4312) — published 2026-10-15T10:22:46Z
