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-2023-41105

CVE-2023-41105: Python Path Traversal Vulnerability

CVE-2023-41105 is a path traversal vulnerability in Python 3.11 that allows null byte injection to bypass security checks. This article covers the technical details, affected versions, security impact, and mitigation.

Published: February 4, 2026

CVE-2023-41105 Overview

CVE-2023-41105 is an Input Validation Error vulnerability discovered in Python 3.11 through 3.11.4 that affects the os.path.normpath() function. When a path containing null bytes (\0) is passed to this function, the path is unexpectedly truncated at the first null byte occurrence. This behavior change from Python 3.10.x and earlier versions creates a security regression where filenames that would have been rejected for security reasons in previous versions are no longer rejected in Python 3.11.x.

This vulnerability represents a classic null byte injection attack vector that could be exploited to bypass security controls, particularly in applications that rely on path normalization for input validation and security filtering.

Critical Impact

Applications using os.path.normpath() for security-critical path validation may be vulnerable to path traversal attacks and security filter bypasses when processing untrusted input containing null bytes in Python 3.11.x environments.

Affected Products

  • Python 3.11 through 3.11.4
  • NetApp Active IQ Unified Manager (Windows)

Discovery Timeline

  • 2023-08-23 - CVE-2023-41105 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2023-41105

Vulnerability Analysis

The vulnerability exists in Python's os.path.normpath() function, which is designed to normalize pathnames by collapsing redundant separators and up-level references. In Python 3.11.x, when a path containing embedded null bytes (\0) is processed, the function truncates the path at the first null byte rather than properly handling or rejecting the malformed input.

This represents a significant security regression because null byte injection is a well-known attack technique. Attackers can craft malicious paths like /var/www/safe_file.txt\0/../../../etc/passwd where security checks might validate the path before the null byte, but the underlying file system operations could interpret the truncated path differently.

The root cause relates to how Python 3.11 handles C-string operations internally, where null bytes traditionally serve as string terminators. This inconsistency between Python's string handling and the underlying C implementation creates an exploitable condition.

Root Cause

The vulnerability stems from improper input validation in the os.path.normpath() function when processing paths containing null bytes. In Python 3.10.x and earlier versions, the function would either reject or properly handle such inputs. However, the Python 3.11.x implementation introduced a regression where null bytes cause unexpected string truncation during path normalization operations.

This is classified as CWE-426, which relates to untrusted search path vulnerabilities. The fundamental issue is that the function fails to properly sanitize or reject paths containing null bytes, leading to security-relevant path truncation that can bypass application-level security controls.

Attack Vector

The attack vector is network-based, allowing remote attackers to exploit this vulnerability without requiring authentication or user interaction. An attacker can submit a specially crafted path containing null bytes to any application that:

  1. Accepts user-controlled file paths
  2. Uses os.path.normpath() for path normalization or security validation
  3. Runs on Python 3.11 through 3.11.4

The attack mechanism involves embedding a null byte after an innocuous-looking path component, followed by malicious path traversal sequences. When the path is normalized, everything after the null byte may be truncated, potentially allowing the attacker to access files outside the intended directory or bypass filename blacklists.

For example, an application checking if a requested file is within a safe directory might approve a path like /uploads/document.txt\0/../../../etc/passwd because the normalization truncates it to /uploads/document.txt, but subsequent file operations might behave differently depending on how the path is processed downstream.

Detection Methods for CVE-2023-41105

Indicators of Compromise

  • HTTP requests or file access attempts containing null bytes (%00 or \\x00) in file path parameters
  • Application logs showing unusual path normalization behavior or unexpected file access patterns
  • File access attempts to sensitive system files that bypass normal path validation
  • Error logs indicating path-related issues following path normalization operations

Detection Strategies

  • Implement application-level logging to capture all path inputs before and after normalization, flagging any that contain null bytes
  • Deploy web application firewalls (WAF) configured to detect and block requests containing null byte sequences in URL paths and parameters
  • Monitor Python application logs for path normalization anomalies or unexpected file access patterns
  • Use runtime application self-protection (RASP) tools to detect null byte injection attempts in real-time

Monitoring Recommendations

  • Enable verbose logging for file system operations in Python applications running version 3.11.x
  • Configure security information and event management (SIEM) rules to alert on null byte patterns in web requests and file paths
  • Implement file integrity monitoring for sensitive configuration and system files that could be targeted through path traversal
  • Monitor for unusual process behavior or file access patterns that might indicate successful exploitation

How to Mitigate CVE-2023-41105

Immediate Actions Required

  • Upgrade Python to version 3.11.5 or later where the vulnerability has been patched
  • Audit all applications using os.path.normpath() for security-critical path validation
  • Implement additional input validation to reject paths containing null bytes before calling os.path.normpath()
  • Review and update any custom path validation logic that may rely on the previously secure behavior

Patch Information

The Python Security Team has addressed this vulnerability in subsequent releases. Organizations should update to Python 3.11.5 or later to receive the fix. The patches are available through the official Python CPython repository:

  • GitHub Issue #106242 - Original issue report and discussion
  • GitHub Pull Request #107981 - Primary fix implementation
  • GitHub Pull Request #107982 - Backport patch
  • GitHub Pull Request #107983 - Additional backport

For additional vendor-specific guidance, refer to the NetApp Security Advisory #ntap-20231006-0015 for Active IQ Unified Manager deployments.

Workarounds

  • Implement pre-validation to check for and reject any paths containing null bytes before passing them to os.path.normpath()
  • Use alternative path validation methods that do not rely solely on os.path.normpath() for security decisions
  • Apply strict input sanitization at application entry points to filter null bytes from user-supplied path data
  • Consider using os.path.realpath() in combination with explicit null byte checks as an additional safety measure
python
# Workaround: Validate paths for null bytes before normalization
import os

def safe_normpath(path):
    """Safely normalize a path, rejecting inputs with null bytes."""
    if '\0' in path:
        raise ValueError("Path contains null bytes")
    return os.path.normpath(path)

# Example usage
user_input = "/var/www/uploads/file.txt"
try:
    normalized = safe_normpath(user_input)
    # Proceed with validated path
except ValueError as e:
    # Handle malicious input
    print(f"Rejected malicious path: {e}")

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechPython

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.37%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-426
  • Technical References
  • Python Security Announcement

  • NetApp Security Advisory #ntap-20231006-0015
  • Vendor Resources
  • GitHub Issue #106242

  • GitHub Pull Request #107981

  • GitHub Pull Request #107982

  • GitHub Pull Request #107983
  • Related CVEs
  • CVE-2025-4517: Python tarfile Path Traversal Vulnerability

  • CVE-2025-4330: Python Tarfile Path Traversal Vulnerability

  • CVE-2025-4138: Python tarfile Path Traversal Vulnerability

  • CVE-2025-13462: Python tarfile Module Parsing 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