The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-27199

CVE-2026-27199: Werkzeug Path Traversal Vulnerability

CVE-2026-27199 is a path traversal flaw in Werkzeug that allows Windows device names as filenames, causing indefinite hangs when reading files. This article covers technical details, affected versions, and mitigation.

Published: February 27, 2026

CVE-2026-27199 Overview

CVE-2026-27199 is a denial of service vulnerability in Werkzeug, a comprehensive WSGI web application library for Python. The vulnerability exists in the safe_join function, which allows Windows device names as filenames if preceded by other path segments. This bypasses previous filtering added in response to GHSA-hgf8-39gv-g3f2, as the fix failed to account for multi-segment paths such as example/NUL.

When an application running on Windows uses the send_from_directory function (which relies on safe_join to safely serve files), a malicious request with a path ending in a special device name (such as NUL, CON, PRN, etc.) will cause the file to be opened successfully, but any read operation will hang indefinitely, resulting in a denial of service condition.

Critical Impact

Applications running Werkzeug on Windows are vulnerable to denial of service attacks where an attacker can cause application threads to hang indefinitely by requesting paths containing Windows special device names.

Affected Products

  • Werkzeug versions 3.1.5 and below
  • Python web applications using send_from_directory or safe_join functions on Windows
  • Flask applications serving static files on Windows servers

Discovery Timeline

  • 2026-02-21 - CVE CVE-2026-27199 published to NVD
  • 2026-02-23 - Last updated in NVD database

Technical Details for CVE-2026-27199

Vulnerability Analysis

The vulnerability stems from improper path name resolution for restricted file names (CWE-67) in Werkzeug's safe_join function. Windows reserves certain device names (such as NUL, CON, PRN, AUX, COM1-COM9, LPT1-LPT9) that have special behavior when accessed as files. When an application attempts to read from these device names, the operation may hang indefinitely or behave unexpectedly.

The safe_join function is designed to prevent directory traversal and other path-based attacks when serving files. A previous fix (GHSA-hgf8-39gv-g3f2) added filtering for Windows device names, but this filtering only checked single-segment paths. The vulnerability exists because safe_join accepts paths with multiple segments, allowing an attacker to bypass the filter by prepending a valid directory segment to the device name (e.g., example/NUL).

Root Cause

The root cause is insufficient input validation in the safe_join function's Windows device name filtering logic. The function did not properly validate all path segments for reserved Windows device names, only checking single-segment paths. This allowed multi-segment paths containing device names in non-initial positions to bypass the security check.

Attack Vector

An attacker can exploit this vulnerability remotely over the network without authentication. The attack requires:

  1. The target application must be running Werkzeug version 3.1.5 or below
  2. The application must be running on a Windows operating system
  3. The application must use send_from_directory or safe_join to serve user-requested files

By sending a crafted HTTP request with a path like /files/example/NUL, the attacker can cause the application to attempt to read from a Windows device, resulting in the thread hanging indefinitely.

The security patch addresses this issue by checking all segments of multi-segment paths for Windows device names:

text
 
 Unreleased
 
+-   ``safe_join`` on Windows does not allow special devices names in
+    multi-segment paths. :ghsa:`29vq-49wr-vm6x`
+
 
 Version 3.1.5
 -------------

Source: GitHub Commit Update

Additionally, the patch includes updates to the security module:

python
 DEFAULT_PBKDF2_ITERATIONS = 1_000_000
 
 _os_alt_seps: list[str] = list(
-    sep for sep in [os.sep, os.path.altsep] if sep is not None and sep != "/"
+    sep for sep in [os.sep, os.altsep] if sep is not None and sep != "/"
 )
 # https://chrisdenton.github.io/omnipath/Special%20Dos%20Device%20Names.html
 _windows_device_files = {

Source: GitHub Commit Update

Detection Methods for CVE-2026-27199

Indicators of Compromise

  • HTTP requests containing Windows device names in path segments (e.g., /files/example/NUL, /static/dir/CON, /assets/PRN)
  • Application threads or processes hanging indefinitely without returning responses
  • Increased server resource consumption from blocked threads
  • Log entries showing requests for paths ending with NUL, CON, PRN, AUX, or COM1-COM9

Detection Strategies

  • Monitor web server access logs for requests containing Windows reserved device names in multi-segment paths
  • Implement application-level monitoring to detect threads that have been blocked for abnormally long periods
  • Deploy web application firewall (WAF) rules to block requests containing Windows device names in URL paths
  • Use runtime application self-protection (RASP) solutions to detect and block suspicious file access patterns

Monitoring Recommendations

  • Configure alerting for requests matching patterns like */NUL, */CON, */PRN, */AUX, */COM[1-9], */LPT[1-9] in web server logs
  • Monitor application health metrics for signs of thread pool exhaustion or increased response times
  • Review Werkzeug version in all deployed Python applications to identify vulnerable instances
  • Implement request timeout mechanisms to prevent indefinite hangs from affecting application availability

How to Mitigate CVE-2026-27199

Immediate Actions Required

  • Upgrade Werkzeug to version 3.1.6 or later immediately on all Windows deployments
  • Audit all Python web applications to identify those using safe_join or send_from_directory functions
  • Deploy WAF rules to block requests containing Windows device names as a temporary mitigation
  • Consider moving file-serving functionality to a dedicated static file server that is not affected by this vulnerability

Patch Information

The vulnerability has been fixed in Werkzeug version 3.1.6. The patch ensures that safe_join properly validates all segments of multi-segment paths for Windows special device names.

  • Fixed Version:3.1.6
  • Patch Commit:f407712fdc60a09c2b3f4fe7db557703e5d9338d
  • Release Notes:Werkzeug 3.1.6 Release
  • Security Advisory:GHSA-29vq-49wr-vm6x

Workarounds

  • Implement request filtering at the web server or reverse proxy level to block paths containing Windows device names
  • Add application-level validation to reject paths containing device names before passing them to safe_join or send_from_directory
  • Deploy the application on a non-Windows operating system where Windows device names are not interpreted specially
  • Use a dedicated static file serving solution instead of Werkzeug's file serving functions
bash
# Example nginx configuration to block Windows device names
location ~* /(nul|con|prn|aux|com[1-9]|lpt[1-9])(/|$) {
    return 403;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechWerkzeug

  • SeverityMEDIUM

  • CVSS Score6.3

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS Vector
  • 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-67
  • Technical References
  • GitHub Commit Update

  • GitHub Release 3.1.6

  • GitHub Security Advisory GHSA-29vq-49wr-vm6x
  • Related CVEs
  • CVE-2026-21860: Werkzeug Path Traversal Vulnerability

  • CVE-2024-34069: Werkzeug Debugger RCE Vulnerability

  • CVE-2024-49767: Palletsprojects Quart DoS Vulnerability

  • CVE-2023-46136: Werkzeug Multipart Parsing DoS Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English