Skip to main content
Menu
Advisories

Prototype pollution through "proto" ids in the agent, task and terminal stores

GHSA-6RWV-52G2-VX7JPublished Updated GitHub

Description

Impact

The agent, task and terminal JSON stores are plain objects from JSON.parse. IDENTIFIER_RE in v3/@claude-flow/cli-core/src/mcp-tools/validate-input.ts accepts __proto__ and constructor, so store.agents["__proto__"] resolves to Object.prototype. That value is truthy, so the existence check passes and the handler writes onto it.

Affected handlers include agent_update and agent_terminate (agent-tools.ts), task_complete, task_update and task_cancel (task-tools.ts), and terminal_close (terminal-tools.ts). For example, agent_update {agentId:"__proto__", status:"x", config:{…}} makes every object in the server process inherit status and the caller's config for the life of the process. That can be used to tamper with logic or to cause a denial of service. This was reproduced in node.

#4671 fixed only the DAA, workflow and claims stores.

Fix

Reject __proto__, constructor and prototype in validateIdentifier, look records up with Object.hasOwn, and build collections with Object.create(null) in readRecordStore and the terminal, swarm and neural loaders.

Affected versions

References

GitHub · ruvnet/ruflo