T01 · Skill Instruction Hijacking
- Location
scripts/receive_mail.py:70- Finding
Unauthenticated Email Messages Can Hijack Agent Task Execution
- Content
View full analysis
dict: """解析邮件内容,提取 JSON body""" if msg.is_multipart(): for part in msg.walk(): content_type = part.get_content_type() if content_type == "application/json": payload = part.get_payload(decode=True) if payload: return json.loads(payload.decode("utf-8")) # 也尝试 text/plain if content_type == "text/plain": payload = part.get_payload(decode=True) if payload: try: return json.loads(payload.decode("utf-8")) except: pass else: payload = msg.get_payload(decode=True) if payload: try: return json.loads(payload.decode("utf-8")) except: pass return {} ``` `scripts/receive_mail.py:142-159` returns the unverified sender and content as actionable message data: ```python raw_e ...[truncated 2728 chars]- Remediation
View remediation
