A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-2025-66645

CVE-2025-66645: Zauberzeug NiceGUI Path Traversal Flaw

CVE-2025-66645 is a path traversal vulnerability in Zauberzeug NiceGUI that allows attackers to read arbitrary files on the server. This article covers the technical details, affected versions, impact, and mitigation.

Published: April 29, 2026

CVE-2025-66645 Overview

CVE-2025-66645 is a directory traversal vulnerability affecting NiceGUI, a Python-based UI framework developed by Zauberzeug. Versions 3.3.1 and below are vulnerable to directory traversal through the App.add_media_files() function, which allows a remote attacker to read arbitrary files on the server filesystem. This vulnerability enables unauthorized access to sensitive server-side files without requiring authentication.

Critical Impact

Remote attackers can exploit this directory traversal flaw to read arbitrary files from the server filesystem, potentially exposing configuration files, credentials, source code, and other sensitive data.

Affected Products

  • Zauberzeug NiceGUI versions 3.3.1 and below
  • Applications using the App.add_media_files() function with user-controllable paths
  • Web applications built with vulnerable NiceGUI versions exposing media file endpoints

Discovery Timeline

  • 2025-12-09 - CVE-2025-66645 published to NVD
  • 2025-12-19 - Last updated in NVD database

Technical Details for CVE-2025-66645

Vulnerability Analysis

This directory traversal vulnerability (CWE-22) exists in the App.add_media_files() function within NiceGUI's application handling code. The vulnerability allows network-based exploitation without any privileges or user interaction, resulting in complete confidentiality compromise of server-side files.

The vulnerable function creates a route handler that serves files from a specified local directory. However, in versions 3.3.1 and below, the code failed to properly validate that the requested filepath remained within the intended directory boundary, allowing attackers to traverse outside the designated directory using sequences like ../.

Root Cause

The root cause lies in insufficient path validation when constructing the file path to serve. The original code directly concatenated the local directory with the user-supplied filename without verifying that the resulting path remained within the intended directory. This allowed attackers to use path traversal sequences (../) to escape the media directory and access arbitrary files on the filesystem.

Attack Vector

An attacker can exploit this vulnerability by sending crafted HTTP requests to endpoints created by App.add_media_files(). By including directory traversal sequences in the filename parameter, the attacker can navigate outside the intended media directory and read sensitive files such as /etc/passwd, application configuration files, or other sensitive data accessible to the web server process.

python
         """
         @self.get(url_path.rstrip('/') + '/{filename:path}')  # NOTE: prevent double slashes in route pattern
         def read_item(request: Request, filename: str, nicegui_chunk_size: int = 8192) -> Response:
-            filepath = Path(local_directory) / filename
-            if not filepath.is_file():
+            local_dir = Path(local_directory).resolve()
+            filepath = (local_dir / filename).resolve()
+            if not filepath.is_relative_to(local_dir) or not filepath.is_file():
                 raise HTTPException(status_code=404, detail='Not Found')
             return get_range_response(filepath, request, chunk_size=nicegui_chunk_size)
 

Source: GitHub Commit Update

Detection Methods for CVE-2025-66645

Indicators of Compromise

  • HTTP requests containing path traversal sequences (../, ..%2f, ..%252f) targeting media file endpoints
  • Access logs showing requests for sensitive system files like /etc/passwd, /etc/shadow, or application configuration files
  • Unusual file access patterns in web server logs indicating reconnaissance activity
  • Failed access attempts for files outside the expected media directory structure

Detection Strategies

  • Implement web application firewall (WAF) rules to detect and block path traversal patterns in URL paths
  • Monitor application logs for requests containing ../ sequences or URL-encoded variants
  • Deploy SentinelOne Singularity platform for real-time detection of file access anomalies and exploitation attempts
  • Enable verbose logging for NiceGUI applications to capture all file access requests

Monitoring Recommendations

  • Configure alerting for any access attempts to sensitive system files through web application endpoints
  • Implement file integrity monitoring on critical system files that could be targeted
  • Review web server access logs regularly for path traversal indicators
  • Monitor network traffic for unusual data exfiltration patterns following exploitation

How to Mitigate CVE-2025-66645

Immediate Actions Required

  • Upgrade NiceGUI to version 3.4.0 or later immediately
  • Audit existing applications using App.add_media_files() for potential exposure
  • Review access logs for signs of prior exploitation attempts
  • Implement network segmentation to limit access to vulnerable application servers

Patch Information

The vulnerability has been fixed in NiceGUI version 3.4.0. The fix implements proper path validation by resolving both the local directory and the constructed filepath to their canonical forms, then verifying that the filepath remains within the local directory boundary using Python's Path.is_relative_to() method. For detailed patch information, see the GitHub Security Advisory and the GitHub Commit Update.

Workarounds

  • If immediate upgrade is not possible, disable or remove endpoints created with App.add_media_files() until patching is complete
  • Implement reverse proxy rules to filter path traversal sequences from incoming requests
  • Restrict network access to the NiceGUI application to trusted IP addresses only
  • Consider running the application in a containerized environment with limited filesystem access
bash
# Upgrade NiceGUI to the patched version
pip install --upgrade nicegui>=3.4.0

# Verify installed version
pip show nicegui | grep Version

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechZauberzeug Nicegui

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability1.11%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-22
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory
  • Latest CVEs
  • CVE-2026-9813: FlowIntel SSRF Vulnerability

  • CVE-2026-4377: D-Link DWR-X1820 Auth Bypass Vulnerability

  • CVE-2026-47074: ex_aws_sns Auth Bypass Vulnerability

  • CVE-2026-46241: Linux Kernel Use-After-Free Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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