Skip to content

AAK-APPROVAL-PARSER-DESYNC-001: Command-safety parser and the executing shell disagree about a token

Severity
HIGH
Category
Trust Boundaries (trust-boundary)
Scanner
agent_audit_kit/scanners/approval_parser_desync.py
Auto-fixable
No.
SARIF name
ApprovalParserDesync

What it detects

An agent decides whether a command needs human approval by parsing it, then hands it to a PowerShell-family interpreter, without handling the stop-parsing token --%. pwsh re-reads everything after --% verbatim, so the command that was classified is not the command that runs and the approval prompt is skipped. Neither truncation nor a rebuilt argv is involved: the checker and the shell read the same bytes and disagree about what they mean, which is a third route to the same bypass.

How to fix

Reject --% (and any token that suspends the interpreter's own parsing) before classifying a command, or pass an argv straight to the interpreter instead of a shell-parsed command string.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-APPROVAL-PARSER-DESYNC-001

Limitations

Covers the PowerShell stop-parsing token specifically, not every shell's escaping grammar. A gate in front of bash or cmd is not flagged, because claiming to know every shell's parser is a claim a pattern scan cannot make. Any mention of --% or stop-parsing in the file clears it.

References

  • CVE: CVE-2026-19591
  • OWASP Agentic Top 10: ASI05 (Unexpected Code Execution (RCE)), ASI09 (Human-Agent Trust Exploitation)
  • Adversa AI MCP Top 25 (AAK-defined ids): ADV-AUTH-01 (Missing Authentication)

All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-APPROVAL-PARSER-DESYNC-001.md: the page then shows that text, with the registry reference appended under it.