T08 · Insecure Dependencies
- Location
SKILL.md:9- Finding
Unpinned Global Installation of a Security-Sensitive Third-Party CLI
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:9
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumCode Snippet:
yaml install: npm install -g m365-cliTechnical Analysis
The Skill instructs users or agents to globally install
m365-cliwithout specifying an exact reviewed version or package integrity value. Consequently, installation resolves to whichever release is current in the npm registry at execution time.This CLI is particularly security-sensitive because it receives OAuth authorization to read and modify personal email, calendars, contacts, and OneDrive files. It also stores and uses refreshable credentials. A malicious future release, compromised publisher account, registry compromise, or malicious lifecycle script could execute locally during installation or later command invocation.
The documented GitHub repository, npm package, and publisher provide provenance information but do not make the mutable installation reproducible or protect against a future supply-chain compromise.
Attack Path
- An attacker compromises the npm publisher account, release process, or package source.
- The attacker publishes a malicious version under the legitimate
m365-clipackage name. - A user or agent follows the Skill and executes
npm install -g m365-cli. - npm installs the compromised release globally and may execute its lifecycle scripts.
- The malicious package accesses local data or intercepts OAuth credentials and Microsoft Graph operations when the user authenticates or invokes the CLI.
- Stolen credentials or delegated access are used to access the victim's Microsoft account data.
Impact Assessment
Successful exploitation could execute code with the privileges of the user running npm. Because the installed CLI is trusted with broad Microsoft Graph scopes, compromise could expose or modify email, calendar events, contacts, an ...[truncated 199 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
m365-clito an exact version that has been reviewed, rather than resolving the latest release. - Record and verify package integrity using a lockfile, npm integrity metadata, or a trusted package hash.
- Prefer a project-local installation or isolated execution environment over global installation.
- Disable lifecycle scripts during installation where compatible with the package and workflow.
- Document the reviewed package version, source commit, publisher identity, and expected integrity value.
- Periodically audit dependency ownership and release changes before updating the pinned version.
- Run the CLI under a minimally privileged OS account and limit OAuth scopes to those required for the specific requested operation.
- Pin
