Skip to main content

Improper Link Resolution Before File Access ('Link Following')

CVE-2026-45539

Severity High
Score 7.4/10

Summary

Microsoft APM is an open-source, community-driven dependency manager for AI agents. In versions from 0.5.4 through 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.

  • LOW
  • NETWORK
  • NONE
  • CHANGED
  • REQUIRED
  • NONE
  • HIGH
  • NONE

CWE-59 - Improper Link Resolution Before File Access

'Improper link resolution before file access' occurs when software accesses a file resource but fails to verify that the file isn't a link or shortcut to another file. An attacker can potentially gain access to arbitrary files and from there the impact can vary, depending on the application, from sensitive data exposure to remote code execution.

References

Advisory Timeline

  • Published