# CVE-2026-45539: Microsoft APM: Symlinks under `.apm/prompts/` and `.apm/agents/` are dereferenced during `apm install`, copying host-local file contents into the project tree

> Attackers can use symlinks in AI agent dependencies to copy sensitive host files into project directories during installation, bypassing security scans.

- **Severity:** High 7.4 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 15 May 2026
- **Updated:** 15 May 2026
- **Also known as:** GHSA-q5pp-gvjg-h7v4, PYSEC-2026-2377

## What is CVE-2026-45539?

CVE-2026-45539 is a high-severity path traversal vulnerability in microsoft apm, published on 15 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

Microsoft APM is an open-source, community-driven dependency manager for AI agents. From 0.5.4 to 0.12.4, two primitive integrators in apm-cli enumerate package files with bare Path.glob() / Path.rglob() calls and read each match with Path.read_text(), transparently following symbolic links. A symlink committed inside a remote APM dependency under .apm/prompts/<x>.prompt.md or .apm/agents/<x>.agent.md is preserved verbatim into apm_modules/ on clone and then dereferenced during integration, with the resolved content written as a regular file into the project's deploy directories. The package content_hash, the pre-deploy SecurityGate scan, and apm audit do not flag this. The deploy roots are not added to the auto-generated .gitignore, so the resulting files are staged by git add by default. This vulnerability is fixed in 0.13.0.

Weakness: CWE-59 (Improper Link Resolution Before File Access), CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

## Which versions are affected by CVE-2026-45539?

3 open source packages ship an affected version, including apm.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `apm` | PyPI | From 0.5.4 | 0.13.0 |
| `apm` | PyPI | From 0.5.4 | 0.13.0 |
| `apm` | PyPI | From 0.5.4 | 0.13.0 |

## How do I fix CVE-2026-45539?

Upgrade apm to 0.13.0 or later.

## Is CVE-2026-45539 being exploited?

There is no known exploitation of CVE-2026-45539 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-45539 and fix it if it is affected.

What it is: CVE-2026-45539 is a high-severity path traversal vulnerability in microsoft apm, published on 15 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-45539 in the wild and no public exploit code.

Affected packages and fixed versions:
- apm (PyPI): affected from 0.5.4; fixed in 0.13.0
- apm (PyPI): affected from 0.5.4; fixed in 0.13.0
- apm (PyPI): affected from 0.5.4; fixed in 0.13.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-45539/ (Markdown: https://insights.sbomify.com/CVE-2026-45539/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-45539
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-45539
- OSV: https://osv.dev/vulnerability/CVE-2026-45539

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-45539/
Summaries are generated and may contain mistakes; the official description above is the record.
