@softeria/ms-365-mcp-server is vulnerable to Code Injection
78
High Risk
The server calls import 'dotenv/config' at startup, which loads a .env file from the current working directory and copies its variables into the process environment before any authentication or MCP handshake. A .env placed in the launch directory can set MS365_MCP_AUTH_CACHE_COMMAND to a relative script path, which the token-cache backend then spawns as a child process during startup. This lets code run with the privileges of the user launching the server whenever it is started in a directory containing an untrusted .env file and an executable script, before any Microsoft 365 login occurs. The fix restricts .env imports to an allowlist of app-registration variables and requires the auth-cache command to be an absolute path.
You are affected if you are using a version that falls within the vulnerable range and you launch the server in the default stdio mode from a directory that may contain an untrusted .env file and script.
@softeria/ms-365-mcp-server is vulnerable to Code Injection in versions 0.111.0 - 0.136.0.
Upgrade the @softeria/ms-365-mcp-server library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant