xAI Grok Agent source code audit: persistent context hijacking and supply chain attack analysis caused by local configuration loading
非首发-xAI Grok Agent 源码审计:本地配置加载导致持久化上下文劫持与供应链攻击分析
AI summary
A static source code audit of xAI's open-source component xai-grok-agent found that the system performs unisolated direct string concatenation (CWE-1427) when loading local configuration files such as AGENTS.md, and appends mandatory execution instructions after concatenation. Attackers can achieve persistent context hijacking (OWASP ASI06) of developers' local AI agents through supply chain poisoning (malicious open-source repositories). The article discloses the complete attack chain from file reading to prompt concatenation.