T05 · Unauthorized Access and Privilege Escalation
- Location
references/config.md:22- Finding
Wildcard Policy Permits Unrestricted Cross-Agent Communication
- Content
View full analysis
Vulnerability Details
File Location:
references/config.md, lines 22-27
Vulnerability Type: Unrestricted cross-Agent access control
Risk Level: MediumVulnerable Code:
json5 agentToAgent: { enabled: true, allow: ["*"], // Allow all cross-Agent communication maxPingPongTurns: 5 // A2A negotiation capped at 5 rounds }Technical Analysis
The documented basic configuration enables Agent-to-Agent communication and uses the wildcard value
["*"]for the authorization policy. This violates least-privilege principles because every available Agent is permitted to communicate across Agent boundaries, regardless of whether that access is required.The five-turn negotiation limit constrains conversation length but does not restrict which Agents may initiate communication or validate whether their messages are authorized. If this example is deployed directly, a compromised, malicious, or insufficiently trusted Agent could send crafted messages to other Agents and attempt to influence their tasks or obtain information exposed through their replies.
Attack Path
- An attacker gains control of, or the ability to submit messages through, any Agent available in the environment.
- The wildcard
allow: ["*"]policy authorizes that Agent to communicate with other Agents. - The attacker invokes the Agent-to-Agent messaging mechanism and sends crafted instructions to a target Agent.
- The target processes the unauthorized message within its own permissions and operational context.
- Depending on the target's behavior, the attacker may influence task execution or receive information returned in the target's response.
Impact Assessment
Exploitation can permit unauthorized lateral communication between Agent sessions, task or prompt injection against reachable Agents, and disclosure of information included in Agent responses. The attacker does not automatically obtai ...[truncated 307 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the wildcard with an explicit allowlist containing only trusted Agent IDs that require cross-Agent communication.
- Disable Agent-to-Agent messaging by default and enable it only for defined workflows.
- Apply authorization checks to both the sending and receiving Agent rather than relying solely on a global policy.
- Validate message origin, destination, content type, and requested operation before processing cross-Agent messages.
- Ensure receiving Agents do not treat messages from peer Agents as trusted system-level instructions.
- Restrict each Agent's tools and data access independently so that a messaging-policy failure cannot expose unrelated privileges.
- Add audit logging, rate limits, and alerts for rejected or unusual cross-Agent communication attempts.
- Document separate development and production policies, ensuring that wildcard access is never presented as a production-safe default.
A hardened example would use a narrow allowlist:
json5 agentToAgent: { enabled: true, allow: ["code-reviewer", "doc-writer"], maxPingPongTurns: 5 }
