AAK-AST04-001: Skill frontmatter carries a deserialization tag that executes on parse
- Severity
- CRITICAL
- Category
- Agentic Skills (AST10) (
agentic-skill) - Scanner
agent_audit_kit/scanners/agentic_skills.py- Auto-fixable
- No.
- SARIF name
AgenticSkillFrontmatterDeserializationTag
What it detects
A skill's YAML frontmatter contains a language-specific deserialization tag — !!python/object/apply, !ruby/object, !!java/... and the like. A loader using its language's unsafe default constructs the named object while parsing, so the payload runs before any field of the skill is read and before the skill is ever invoked: installing or merely listing the skill is enough. This is the parsing layer of OWASP AST04 Insecure Metadata, which names the case directly. Distinct from AAK-SKILL-005, which reads frontmatter values for prompt-injection triggers: that rule assumes parsing already happened safely, and this one is about parsing being the vulnerability.
How to fix
Remove the tag. There is no legitimate reason for skill metadata to construct a language object, so treat its presence as intent rather than as a mistake, and review what else the bundle ships. Load skill frontmatter with a safe loader — yaml.safe_load in Python, safe_load equivalents elsewhere — so a tag like this raises rather than executes; if you maintain a loader, that change protects every skill it will ever read.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-AST04-001
Limitations
Static, and scoped to what a skill bundle declares on disk. It cannot see a resource that is pinned at install time by tooling outside the bundle, and it does not fetch anything, so a pinned reference that now resolves elsewhere looks the same as one that does not. It matches the tag syntax of the common unsafe loaders and will miss a loader with a bespoke tag vocabulary. It reports the tag's presence, not whether the loader in use is configured unsafely — a bundle parsed only by a safe loader carries the tag harmlessly, which is still worth removing because the next loader may not be.
References
- OWASP Agentic Top 10: ASI04 (Agentic Supply Chain Vulnerabilities), ASI05 (Unexpected Code Execution (RCE))
- OWASP Agentic Skills Top 10: AST04 (Insecure Metadata)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-INJECT-01 (Shell Injection via MCP)
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-AST04-001.md: the page then shows that text, with the registry reference appended under it.