🔴 [P0] Sanitize agent spawn command payloads (command injection risk) #274

Closed
opened 2026-02-03 22:29:25 +00:00 by jason.woltje · 0 comments
Owner

Summary

Agent spawn passes unvalidated context and options to orchestrator. Potential command injection and RCE.

Location

apps/api/src/federation/federation-agent.service.ts:237-275

Security Impact

  • Command injection if context contains shell commands
  • Path traversal if context contains file paths
  • Remote code execution risk

Required Implementation

  1. Validate taskId format
  2. Whitelist allowed agentType values
  3. Sanitize context fields
  4. Validate all string values

Priority

CRITICAL (P0) - RCE risk

## Summary Agent spawn passes unvalidated `context` and `options` to orchestrator. Potential command injection and RCE. ## Location `apps/api/src/federation/federation-agent.service.ts:237-275` ## Security Impact - Command injection if context contains shell commands - Path traversal if context contains file paths - Remote code execution risk ## Required Implementation 1. Validate `taskId` format 2. Whitelist allowed `agentType` values 3. Sanitize `context` fields 4. Validate all string values ## Priority **CRITICAL (P0)** - RCE risk
jason.woltje added the securityp0apiapi labels 2026-02-03 22:29:25 +00:00
jason.woltje added this to the M7.1-Remediation (0.0.8) milestone 2026-02-03 22:31:44 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#274