T01 · Skill Instruction Hijacking
- Location
scripts/gmail-monitor.py:25- Finding
Untrusted Email Metadata Can Influence Agent Behavior
- Content
View full analysis
= count else ids for mid in reversed(latest): _, data = mail.fetch(mid, '(RFC822)') for part in data: if isinstance(part, tuple): msg = email_lib.message_from_bytes(part[1]) subj = decode_header(msg['Subject'] or '')[0][0] if isinstance(subj, bytes): subj = subj.decode(errors='replace') print(f"From: {msg.get('From','')[:70]}") print(f"Subject: {subj[:100]}") print(f"Date: {msg.get('Date','')[:30]}") print() mail.logout() ``` An external sender controls these headers and can place instruction-like text in them. If an AI agent consumes the command output during a heartbeat, it may mistake this data for trusted operational instructions. The script does not execute the injected text itself; exploitation depends on the surrounding agent in ...[truncated 1063 chars]- Remediation
View remediation
