🇰🇷 한글 설명
Microsoft APM 0.5.4~0.12.4에서 Path.glob() 및 Path.rglob() 호출 시 심볼릭 링크를 자동 해제하여, 원격 의존성의 .apm/prompts 및 .apm/agents 디렉토리에 포함된 악의적 심볼릭 링크를 통해 임의의 파일을 apm_modules 및 배포 디렉토리에 작성할 수 있습니다. SecurityGate 스캔과 git 자동 .gitignore가 이를 감지하지 못해 민감한 정보 유출 및 공급망 공격이 가능합니다.
💡 쉬운 설명
AI 에이전트 패키지 관리자에서 숨겨진 파일 바로가기를 통해 임의의 파일을 프로젝트에 몰래 삽입할 수 있습니다. 삽입된 파일이 코드로 저장되고 배포되어 민감한 정보가 유출되거나 악성 코드가 실행될 수 있습니다.
🇺🇸 원문 (English)
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.
📍 영향받는 시스템
Microsoft APM versions 0.5.4 to 0.12.4 (fixed in 0.13.0)
⚔️ 공격 벡터
Malicious symbolic links in .apm/prompts/*.prompt.md or .apm/agents/*.agent.md in remote dependencies are followed during integration, writing arbitrary files to deploy directories
🛡️ 대응 방법
Upgrade Microsoft APM to version 0.13.0 or later
🔧 검증 코드
표시된 버전이 0.13.0 이상이면 안전함. 0.12.4 이하 또는 설치되지 않으면 미설치 상태 확인 필요
npm ls @microsoft/apm 2>&1 | grep -oE '(@microsoft/)?apm@[0-9]+\.[0-9]+\.[0-9]+' || echo 'Not installed'