CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-46383

CVE-2026-46383: Arbitrary File Overwrite via Path Traversal (TarSlip) in Microsoft APM

Amit Schendel
Amit Schendel
Senior Security Researcher

May 15, 2026·5 min read·22 visits

Executive Summary (TL;DR)

Microsoft APM < 0.13.0 on Windows is vulnerable to an arbitrary file overwrite during archive extraction. Exploitation requires user interaction to install a crafted tarball.

A path traversal vulnerability exists in the legacy-bundle probing logic of Microsoft APM, an open-source dependency manager for AI agents. On Windows systems using Python versions prior to 3.12, this allows local attackers to overwrite arbitrary files via a crafted tarball.

Vulnerability Overview

Microsoft APM functions as an open-source dependency manager designed specifically for AI agents. The tool allows users to install modules and plugins, frequently distributed as .tar.gz archives, via the apm install <bundle> command. To support backward compatibility, APM implements a probing phase that extracts the contents of a local archive to a temporary directory to check for the presence of a legacy apm.lock.yaml file.

The vulnerability, tracked as CVE-2026-46383, occurs during this probing phase. The extraction logic utilizes the standard Python tarfile library without adequate path sanitization for Windows environments. This oversight results in an arbitrary file overwrite vulnerability, commonly referred to as a "TarSlip" attack.

Because the extraction happens before the bundle's format is validated, the malicious payload is executed regardless of whether the bundle is ultimately accepted as valid. This path traversal vulnerability is categorized under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) and CWE-73 (External Control of File Name or Path).

Root Cause Analysis

The fundamental flaw lies in how the tarfile.extractall() method handles archive members and how Python's os.path.join() interacts with absolute paths on Windows operating systems. By default, tarfile in Python versions prior to 3.12 does not sanitize member names that contain absolute paths or UNC paths.

When tarfile extracts a member, it appends the member's stored path to the target extraction directory using os.path.join(). On Windows, if os.path.join() encounters an absolute path component (e.g., D:/path or \\server\share), it discards all preceding path components. Consequently, an expression like os.path.join('C:/temp/apm_probe', 'D:/evil/startup.bat') resolves directly to D:/evil/startup.bat.

The APM legacy-bundle probe extracts the entire archive contents unconditionally to check for a single lock file. This unrestricted extraction passes attacker-controlled absolute paths directly to the vulnerable os.path.join() operation. The operation completely bypasses the intended temporary directory boundary, resulting in arbitrary file writes anywhere the executing user has permissions.

Code Analysis and Patch Verification

The vulnerability was mitigated in version 0.13.0 through commit 77d1dda8303c8d7ccb6148788a6274fdece98499. The patch introduces a comprehensive pre-extraction validation loop that inspects every archive member before any data is written to disk.

# src/apm_cli/bundle/local_bundle.py
for member in tar.getmembers():
    name = member.name
    if (
        name.startswith("/")
        or PureWindowsPath(name).drive
        or PureWindowsPath(name).is_absolute()
    ):
        return False # Reject Windows absolute paths
    try:
        validate_path_segments(name, context="tar member")
    except PathTraversalError:
        return False

The patched code uses pathlib.PureWindowsPath to accurately parse Windows-specific path semantics regardless of the host OS. It explicitly rejects any archive member where a drive letter (.drive) is specified or where the path is determined to be absolute (.is_absolute()).

Additionally, the code now invokes a validate_path_segments utility to detect and block relative traversal sequences, such as ... For environments running Python 3.12 or newer, the patch also implements the native filter="data" argument in tar.extractall(), as recommended by PEP 706, providing an additional layer of runtime protection against TarSlip attacks.

Exploitation and Attack Vector

Exploitation requires social engineering or supply chain poisoning, as the victim must be induced to download and install a crafted archive. The attacker first generates a malicious .tar.gz file containing a member named with a Windows absolute path, such as C:/Users/Public/startup.bat.

The victim executes the command apm install malicious.tar.gz in their local environment. APM begins the installation process by entering the legacy-bundle probe phase, creating a temporary directory for extraction.

During extraction, the tarfile module reads the absolute path from the archive member. The os.path.join() function resolves the extraction path to the attacker's specified absolute path, ignoring the temporary directory base. The file is then written, overwriting any existing file or placing a new file at the specified location.

Impact Assessment

A successful exploit allows the attacker to write or overwrite arbitrary files on the victim's filesystem with the privileges of the user executing the apm install command. The CVSS v3.1 base score of 5.5 reflects the local attack vector, the requirement for user interaction, and the high impact to data integrity.

If the victim runs APM with administrative privileges, the attacker can overwrite critical system files or drop persistent malware into startup directories. Even under standard user privileges, an attacker can modify user-specific configuration files, overwrite SSH keys, or manipulate localized startup scripts to achieve code execution on the next login.

The vulnerability does not directly impact system availability or confidentiality according to the CVSS vector. The primary consequence is unauthorized data modification, which serves as a stepping stone for further local exploitation and persistence mechanisms.

Remediation and Mitigation Guidance

The primary remediation for CVE-2026-46383 is to upgrade the microsoft/apm package to version 0.13.0 or later. This version contains the logic required to safely validate archive members prior to extraction on all supported platforms.

As a defense-in-depth measure, users should run APM on Python 3.12 or newer. Python 3.12 introduces native protections against TarSlip vulnerabilities via the filter parameter in tarfile.extractall(). The patched version of APM leverages this feature automatically when the modern runtime is detected.

Users who cannot immediately upgrade should strictly avoid installing APM bundles or plugins from unverified third-party sources. Administrators should also enforce least privilege principles, ensuring that the user account executing apm install does not possess administrative rights, thereby limiting the scope of any potential file overwrites.

Official Patches

MicrosoftGitHub Security Advisory for Microsoft APM

Fix Analysis (1)

Technical Appendix

CVSS Score
5.5/ 10
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Affected Systems

Microsoft APM on Windows environments using Python < 3.12

Affected Versions Detail

Product
Affected Versions
Fixed Version
microsoft/apm
Microsoft
< 0.13.00.13.0
AttributeDetail
CVE IDCVE-2026-46383
CWE IDCWE-22
CVSS Score5.5
Attack VectorLocal (User Interaction Required)
ImpactHigh Integrity (Arbitrary File Overwrite)
Exploit StatusProof of Concept
CISA KEVNot Listed

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Vulnerability Timeline

Fix commit authored
2026-05-11
Security advisory published and CVE assigned
2026-05-15
APM version 0.13.0 released
2026-05-15

References & Sources

  • [1]GHSA-mq5j-pw29-jcv3

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•2 days ago•CVE-2026-55699
6.5

CVE-2026-55699: Arbitrary Directory Deletion via Path Traversal in pnpm globalBinDir Resolver

CVE-2026-55699 (also identified as GHSA-4gxm-v5v7-fqc4) is a critical path traversal and arbitrary directory deletion vulnerability in the pnpm package manager. The issue exists because the manifest validation process fails to prevent relative path segments within the package 'bin' keys. When a malicious package containing structured path traversal markers is globally installed and later manipulated, pnpm resolves the target paths through path.join() and passes the resolved paths to a recursive deletion function, resulting in arbitrary directory removal.

Amit Schendel
Amit Schendel
16 views•6 min read
•3 days ago•CVE-2026-55700
7.1

CVE-2026-55700: Path Traversal and Arbitrary File Write in pnpm stage download

A path traversal vulnerability in pnpm stage download allows malicious registries or compromised package manifests to overwrite arbitrary files on the victim's filesystem via unvalidated package name and version fields.

Alon Barad
Alon Barad
13 views•4 min read
•3 days ago•GHSA-WW5P-J6CJ-6MQQ
5.5

GHSA-WW5P-J6CJ-6MQQ: Credential Exposure in Nezha Dashboard DDNS and Notification APIs

GHSA-WW5P-J6CJ-6MQQ is a technical credential exposure vulnerability in Nezha Dashboard prior to version 2.2.5. The vulnerability allows authenticated administrative users or actors possessing scoped read-only Personal Access Tokens (PATs) to exfiltrate plaintext third-party API credentials, secret keys, and webhook authorization headers due to a lack of data redaction during API object serialization.

Amit Schendel
Amit Schendel
10 views•7 min read
•3 days ago•GHSA-FR4H-3CPH-29XV
7.1

GHSA-FR4H-3CPH-29XV: Path Traversal and Directory Hijacking in pnpm and pacquet Dependency Resolution

GHSA-FR4H-3CPH-29XV is a high-severity path traversal vulnerability in pnpm and its Rust-based port pacquet. The flaw manifests when using the hoisted node-linker configuration, allowing an attacker to manipulate the lockfile to resolve relative traversal sequences or target reserved subdirectories, leading to arbitrary file write or execution hijacking.

Amit Schendel
Amit Schendel
8 views•8 min read
•3 days ago•GHSA-72R4-9C5J-MJ57
7.1

GHSA-72R4-9C5J-MJ57: Arbitrary File Deletion via Path Traversal in pnpm patch-remove

A path traversal vulnerability in the pnpm package manager's 'patch-remove' command allows an attacker to delete arbitrary files outside the patches directory. By manipulating configuration files like package.json, an attacker can specify a traversal path that the application deletes recursively without validating the path's containment.

Alon Barad
Alon Barad
9 views•5 min read
•3 days ago•GHSA-QRV3-253H-G69C
8.3

GHSA-QRV3-253H-G69C: Path Traversal and Arbitrary Symlink Creation via configDependencies in pnpm

A high-severity path traversal vulnerability exists in the pnpm package manager. By crafting a malicious lockfile (pnpm-lock.yaml) with path traversal characters in the configDependencies block, an attacker can create arbitrary directories and symlinks outside the project's node_modules/.pnpm-config directory. This exploitation happens automatically during pnpm installation, even when executing with scripts disabled via the --ignore-scripts flag.

Amit Schendel
Amit Schendel
10 views•7 min read