T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:55- Finding
Child Agents Explicitly Bypass Parent Denial Rules
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 55–59
Vulnerability Type: Safety constraint bypass during sub-agent delegation
Risk Level: HighVulnerable Code
markdown ### Permission isolation rules - Inherit the parent Agent's alwaysAllow rules - **Do not** inherit alwaysDeny rules (sub-Agents may require different permissions) - Independent tool allowlist (specified in the Agent definition) - High-risk operations require separate user confirmationThe original source text is written in Chinese; the excerpt above is a faithful English translation of the complete affected section.
Technical Analysis
The skill explicitly instructs delegated child agents to inherit the parent agent's allowed permissions while not inheriting its
alwaysDenyrestrictions. This creates an asymmetric permission model that preserves grants but removes prohibitions.This behavior violates least privilege and constitutes an instruction-level safety constraint bypass. The issue is especially significant because the agent-definition example at lines 35–42 permits powerful tools such as filesystem read/write access, command execution, and web search:
markdown --- description: Agent description tools: [read, write, exec, web_search] # Tool allowlist model: zai/glm-5.1 effort: thorough background: true --- # Agent instructions...A statement that high-risk operations require user confirmation does not restore the discarded denial rules. The document does not define an enforceable mechanism that guarantees confirmation before each prohibited operation.
Attack Path
- A complex task activates the skill's sub-agent delegation workflow.
- The coordinator constructs or loads an agent definition containing tools such as
read,write,exec, orweb_search. - The coordinator creates the child through
sessions_spawn. - Under the documented permission rules, the child inherits the parent's
alwaysAllowrules but not its `alwaysDe ...[truncated 1090 chars]
- Remediation
View remediation
Remediation Suggestions
- Require every child agent to inherit all parent
alwaysDenyrules without exception. - Calculate child permissions as an intersection of the parent's effective permissions and a narrowly scoped child allowlist.
- Never allow skill instructions or agent definitions to weaken platform-, administrator-, or user-defined denials.
- If exceptional access is legitimately required, use an enforceable elevation mechanism that:
- Identifies the exact tool and operation.
- Limits access to specific resources and arguments.
- Explains the reason and security impact to the user.
- Requires explicit user approval before elevation.
- Applies only to one task or operation.
- Records the approval and subsequent privileged actions.
- Default child agents to minimal capabilities and avoid broad combinations such as unrestricted
read,write,exec, and network access. - Enforce high-risk confirmations in the runtime authorization layer rather than relying on natural-language instructions.
- Add tests verifying that operations denied to the parent remain denied in every spawned child, background worker, and persistent session.
- Require every child agent to inherit all parent
