/

CVE-2026-44641

Severity:

HIGH RISK

(7.1)

Path Traversal in Microsoft APM Plugin Normalization

CVE-2026-44641

Deferred

Vulnerability type

Category:

Path Traversal / Directory Traversal

CWE:

CWE-22, CWE-73

Impact:

Arbitrary File Read / File Copy on Host

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Microsoft APM's plugin normalization logic allowed attacker-controlled paths in plugin manifests to escape the plugin directory and copy arbitrary readable files or directories from the host into the .apm/ directory.

When a user installed a malicious marketplace plugin, the plugin could leverage absolute or traversal paths to exfiltrate host files during apm install, exposing sensitive local data to the plugin's consumer or subsequent tooling.

Affected context

This vulnerability occurs in environments where developers or operators install third-party or community-provided Microsoft APM plugins.

During apm install, the tool normalizes plugins by copying components referenced from plugin.json into a .apm/ workspace, but it does not restrict the referenced paths to remain under the plugin's own directory.

In setups where users run apm on their local machines or CI systems and install untrusted or lightly reviewed plugins, this behavior can expose files from the host filesystem to the plugin's artifact set.

Exploit preconditions

  • Attack surface: The apm install command processing plugin manifests from a marketplace or other distribution channel.
  • Required access: Ability to publish or otherwise supply a malicious plugin with crafted plugin.json fields (agents, skills, commands, hooks) to a target user or automation workflow.
  • Trigger point: A victim runs apm install (or equivalent install flow) for the malicious plugin, causing APM to copy files based on attacker-controlled paths.
  • Why exploitation is possible: The implementation trusts manifest paths and copies files into .apm/ without canonicalizing and validating that the resolved paths stay within the plugin's directory, allowing ../ traversal or absolute paths to reach arbitrary readable host files.

Why this happens

The core issue is a lack of proper path normalization and confinement when handling file paths sourced from untrusted manifest fields.

The plugin manifest (plugin.json) exposes several fields (agents, skills, commands, hooks) that describe which files should be copied during normalization.

Instead of treating these as potentially hostile inputs, APM directly uses them to construct filesystem operations, failing to:

  • Canonicalize the target paths (e.g., via realpath)
  • Enforce that the resolved paths remain inside the plugin's directory root
  • Reject absolute or traversal paths

This aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') and is closely related to CWE-73: External Control of File Name or Path, because external data fully controls which paths are accessed.

Potential impact

  • A malicious plugin may copy arbitrary readable files (e.g., SSH configs, API keys, environment configuration files) from the installer's machine into .apm/, where they might be packaged, uploaded, or inspected.
  • Sensitive project files, such as proprietary code or configuration, could be unintentionally exposed to other systems integrated with .apm/ output.
  • Build pipelines or CI environments running apm install could leak secrets or internal configuration into build artifacts or logs.
  • The copied files could be used as stepping stones for broader compromise if they contain credentials or tokens.

General mitigation guidance

Effective mitigation typically focuses on constraining filesystem access and validating all externally influenced paths before use.

Common defensive patterns include:

  • Canonicalizing all manifest-supplied paths (resolving symbolic links, relative segments, and ..) and verifying they remain confined within the intended plugin root directory.
  • Explicitly rejecting absolute paths, paths containing .., or paths that resolve outside the allowed directory tree.
  • Building a strict mapping between manifest entries and a known safe directory structure, rather than copying arbitrary paths.
  • Running dependency tooling (such as APM) with least-privilege filesystem access and avoiding unnecessary exposure of sensitive directories to tools that consume untrusted input.
  • Treating plugin manifests as untrusted configuration and subjecting them to schema validation, including path-format constraints.

How teams detect issues like this

Detection efforts can target both code-level patterns and operational signals:

  • Static analysis and code review:
  • Flag uses of file copy, open, or directory operations where the source or destination path is derived from plugin manifests or other external configuration without normalization and boundary checks.
  • Look for missing checks around canonicalized paths (e.g., ensuring resolved_path.startswith(plugin_root) or equivalent logic).
  • Highlight acceptance of absolute paths or paths containing .. segments in manifest handling logic.
  • Policy and tooling:
  • Enforce secure coding guidelines for path handling in dependency managers and plugin systems, with specific rules for confining file access to designated directories.
  • Use automated code scanning tools that include rules for CWE-22/CWE-73 to detect external control of file paths and path traversal risks.
  • Operational monitoring:
  • In sensitive environments, log and audit file operations performed by tooling that consumes third-party plugins, to identify unexpected reads outside plugin directories.

Sources

SourceLink
github.comgithub.com/microsoft/apm/security/advisories/GHSA-xhrw-5qxx-jpwr

Frequently asked

questions

Exploitation requires that a user or automated system install a malicious or compromised plugin. Once such a plugin is installed, its manifest-controlled paths can cause APM to copy arbitrary readable files from the host into .apm/, but the attacker's reach is limited to files that the running user can read.

The attacker needs the ability to deliver a crafted plugin—typically by publishing it to a marketplace, supplying it via a repository, or otherwise convincing a target to run apm install on it. No direct shell access to the victim system is required beyond the victim executing the install with their own privileges.

The most robust fix is to treat all manifest-defined paths as untrusted, canonicalize them, and enforce strict confinement to the plugin's root directory. This includes rejecting absolute paths and any path that, after resolution, escapes the intended directory, thereby preventing traversal and arbitrary file access.

Design plugin and dependency systems with clear trust boundaries and least-privilege filesystem access. Validate and sanitize all file paths derived from external configuration, apply schema constraints on manifest formats, and include automated checks (static analysis and CI policies) that flag unbounded path usage and external control of file names or paths.

Find out what's already
exploitable in your codebase.