T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:100- Finding
Wildcard Sub-Agent Authorization Violates Least Privilege
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 100 and 273
Vulnerability Type: Unrestricted sub-Agent delegation
Risk Level: MediumVulnerable Code
The same insecure configuration is recommended in two examples:
json "subagents": { "allowAgents": ["*"] }Technical Analysis
The wildcard in
allowAgentsauthorizes the configured specialist Agent to invoke every registered Agent rather than only those required for its role. This violates the principle of least privilege.The documented architecture assigns orchestration responsibilities to the main Agent while specialist Agents receive bounded tasks. Consequently, specialist Agents generally do not require unrestricted delegation rights. If a specialist processes attacker-controlled content, such as a Discord message or delegated task containing prompt-injection instructions, the wildcard permission may allow that input to cross role boundaries and trigger Agents with broader tools, data access, or operational authority.
The finding concerns the recommended configuration itself. Whether exploitation succeeds in a deployed environment depends on the registered Agents, their tools, and the runtime's authorization controls.
Attack Path
- An administrator deploys a specialist Agent using the documented
allowAgents: ["*"]configuration. - An attacker supplies malicious instructions through an input accepted by that specialist, such as Discord content or task data.
- The specialist follows the injected instructions and attempts to spawn another registered Agent outside its intended collaboration boundary.
- The wildcard allowlist permits the cross-role invocation.
- The newly invoked Agent may use its own tools or access rights to perform actions unavailable to the original specialist.
Impact Assessment
A compromised or prompt-injected specialist could invoke any registered Agent permitted by the surrounding runtime. This may result in:
- Unauthorized cro ...[truncated 490 chars]
- An administrator deploys a specialist Agent using the documented
- Remediation
View remediation
Remediation Suggestions
- Replace the wildcard with an explicit allowlist containing only the Agents that the role must legitimately invoke:
json "subagents": { "allowAgents": ["compliance-reviewer"] }- Remove the
subagentsauthorization entirely from specialist Agents that do not need to delegate work. - Reserve broad orchestration permissions for the trusted main Agent, and still prefer an explicit allowlist where practical.
- Define separate allowlists for each role according to its documented responsibilities and collaboration boundaries.
- Ensure that authorization is enforced by the runtime rather than relying only on prompt instructions in role files.
- Treat Discord messages and delegated task content as untrusted input and add confirmation controls before sensitive cross-Agent operations.
- Log and monitor Agent-spawn requests, including source Agent, target Agent, task origin, and authorization result.
- Add configuration tests that reject wildcard delegation for non-orchestrator Agents.
