Skip to content

AAK-TIKTOK-AGENT-HIJACK-001: Social-agent auto-reply without human-in-loop gate

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

What it detects

Source code wires a social-platform reply sink (tiktok_api.reply, instagrapi.direct.send, tweepy.API.update_status, discord.Message.reply, etc.) to a user-content source (comments.fetch, webhook payload text field, media comments) without an aak.review.human_in_loop() / human_in_the_loop() / require_approval() gate. Jiacheng Zhong's BlackHat Asia 2026 (2026-04-24) talk demonstrates hijacks in this class — attacker posts a crafted comment that the agent's own reply loop turns into a tool call, reflecting attacker text back to the platform's audience. OWASP LLM08 (Excessive Agency).

How to fix

Place every social-platform write call behind a human-review gate. AAK ships an aak.review.human_in_loop(text, comment=...) helper that defaults closed and requires explicit approval (CLI, webhook, or workflow). For high-volume agents, route generated replies to a moderation queue instead of the platform sink directly.

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

agent-audit-kit scan . --rules AAK-TIKTOK-AGENT-HIJACK-001

Limitations

Reads .py files only. It fires on one that calls tiktok_api.reply(, tiktok.comment.reply(, instagrapi.direct.send(, instagrapi.<x>.comment_reply(, tweepy.API().update_status(, tweepy.Client().create_tweet(, discord.Message.reply( or discord.Channel.send( and also reads event["comment"], comments.fetch(, webhook.payload["text"], tiktok_api.comments, instagrapi.<x>.comments or media.comments, with none of aak.review.human_in_loop(, human_in_the_loop(, require_approval( or needs_review(. A reply sent through an instance (await message.reply(text)) is not matched. A Python file over 512 KB is not read.

References


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-TIKTOK-AGENT-HIJACK-001.md: the page then shows that text, with the registry reference appended under it.