T07 · Tool Hijacking and Spoofing
- Location
scripts/propose-action.js:2- Finding
Unauthenticated Action-Gate Sidecar Can Forge Approval Decisions
- Content
View full analysis
Vulnerability Details
File Location:
scripts/propose-action.js, lines 2-23
Vulnerability Type: Unauthenticated local tool/API spoofing
Risk Level: MediumVulnerable Code
javascript const base = process.env.ACTION_GATE_URL || "http://localhost:8787"; const input = { source: process.argv[2] || "communications", actionType: process.argv[3], target: process.argv[4], summary: process.argv[5], payloadSummary: process.argv[6] || "", program: process.argv[7] || "", }; async function main() { if (!input.actionType || !input.target || !input.summary) { throw new Error( "Usage: propose-action.js <source> <actionType> <target> <summary> [payloadSummary] [program]", ); } const res = await fetch(`${base}/v1/proposals`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(input), });The corresponding workflow in
references/action-bridge.md, lines 14-16, treats the sidecar's decision as authoritative:markdown 4. let the sidecar return `allowed`, `needs_approval`, `blocked`, or `accepted` 5. only then decide what to show the user 6. if approved and an execution adapter exists, execute behind the sidecarTechnical Analysis
The client submits action details to an HTTP endpoint without authenticating the sidecar or verifying the integrity and origin of its response. The endpoint can be replaced through
ACTION_GATE_URL, while the default endpoint uses unauthenticated plaintext HTTP on localhost.A malicious process capable of binding to port
8787, or an attacker capable of controlling the environment variable or intercepting a non-loopback plaintext connection, can impersonate the action gate. The client also does not validate the HTTP status, response content type, response schema, approval nonce, expiration, or cryptographic binding between a response a ...[truncated 1613 chars]- Remediation
View remediation
Remediation Suggestions
- Authenticate the sidecar with a per-session bearer token, mutually authenticated TLS, or a Unix-domain socket protected by strict filesystem permissions.
- Require HTTPS for every non-loopback endpoint and reject insecure remote URLs.
- Restrict endpoint configuration to an explicit allowlist of trusted schemes, hosts, and ports.
- Validate successful HTTP status codes, expected content type, and a strict response schema before processing a decision.
- Cryptographically bind each approval to the exact action payload, user identity, one-time nonce, policy version, and short expiration time.
- Distinguish sidecar receipt from approval:
acceptedshould not be interpreted as user authorization. - Fail closed when sidecar authentication, response verification, or policy evaluation fails.
- Require an independently verifiable user-approval artifact before execution of red-category actions.
