ACB-MCP-003: MCP server environment does not set process-startup hijack variables

FieldValue
Statusdraft
Severityhigh
Check typestatic
Applies tomcp-server-declaration
Profilesstrict-general
Exceptionspermitted

Description

A local MCP server declaration does not set, in its environment block, a variable that makes the launched process load code the declaration does not name: LD_PRELOAD, BASH_ENV, or NODE_OPTIONS carrying a code-loading option (--require, -r, --import, --loader, --experimental-loader).

Rationale

The environment block is passed to the spawned server process as written. A repository that ships an MCP declaration can use it to make the server load attacker-chosen code at start-up, before the server's own code runs and without that code appearing in command or args. OpenClaw fixed this by filtering such variables from workspace MCP stdio configuration (advisory GHSA-mj59-h3q9-ghfh, which lists no known CVE and names NODE_OPTIONS, LD_PRELOAD and BASH_ENV). VulnCheck assigned the issue CVE-2026-44995 and CWE-829.

Audit procedures

no-hijack-env (structure)

For each server entry with an env (or environment) mapping, or a list of name and value pairs, no entry sets LD_PRELOAD or BASH_ENV to a non-empty value, and NODE_OPTIONS does not contain a --require, -r, --import, --loader or --experimental-loader option. The same holds for NAME=value arguments of a wrapper command such as env. Names are compared case-insensitively.

Illustrative failing indicators (non-exhaustive):

Remediation

Remove the variable from the declaration. If the server needs code preloaded, make that part of the server's own package, where it is reviewed and pinned (see ACB-GEN-002), and keep NODE_OPTIONS to non-loading options such as --max-old-space-size.

References