T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:61- Finding
Unscoped Automatic Approval of All Pending Peers
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:61andSKILL.md:96
Vulnerability Type:T05: Unauthorized Access and Privilege Escalation
Risk Level: HighVulnerable code at line 61:
bash pilotctl --json pending | jq -r '.[].node_id' | xargs -I {} pilotctl --json approve {}Repeated vulnerable code at line 96:
bash # Approve handshakes pilotctl --json pending | jq -r '.[].node_id' | xargs -I {} pilotctl --json approve {}Technical Analysis
The documented command retrieves every pending handshake from the local daemon and passes every returned node identifier to
pilotctl approve. It does not restrict approval to nodes discovered through the selected swarm, compare pending identifiers against the expected$PEERSset, validate authenticated swarm membership, verify the registry of origin, or request operator confirmation.Consequently, the approval step crosses the workflow's intended trust boundary. Although the skill is intended to establish trust with members of a named swarm, the command approves unrelated pending peers as well. An attacker who can cause a handshake request to appear in the daemon's pending list may be approved during routine execution of the workflow.
Attack Path
- An attacker-controlled node sends a handshake request that reaches the victim's
pilotctldaemon. - The attacker's node identifier is added to the daemon's pending-handshake list.
- The victim invokes the documented swarm-joining workflow for an otherwise legitimate swarm.
- The workflow executes
pilotctl --json pending, which returns both legitimate swarm peers and the attacker-controlled node. jqextracts every returnednode_idwithout validating swarm membership.xargsinvokespilotctl --json approvefor each identifier, including the attacker's.- The attacker obtains an approved trust relationship despite not being verified as a member of the selected s ...[truncated 675 chars]
- An attacker-controlled node sends a handshake request that reaches the victim's
- Remediation
View remediation
Remediation Suggestions
Replace blanket approval with a scoped process that approves only authenticated node identifiers associated with the selected swarm:
- Build an explicit allowlist from peers discovered through the expected registry and exact swarm topic.
- Intersect the pending-handshake list with that allowlist before invoking
pilotctl approve. - Validate each peer's authenticated identity and swarm membership rather than relying solely on message-controlled identifiers.
- Require explicit operator confirmation for unknown or unexpected peers.
- Reject or leave unapproved any pending request that cannot be associated with the current swarm operation.
- Safely handle empty lists so that no approval command is executed when there are no verified peers.
- Apply the same correction to both the standalone “Approve Peers” command at line 61 and the workflow example at line 96.
- Where supported by
pilotctl, use a native scoped-approval option tied to a registry, topic, invitation, or authenticated membership token instead of parsing broad daemon output.
