{"id":495733,"date":"2026-03-26T03:58:08","date_gmt":"2026-03-26T03:58:08","guid":{"rendered":"https:\/\/www.newsbeep.com\/uk\/495733\/"},"modified":"2026-03-26T03:58:08","modified_gmt":"2026-03-26T03:58:08","slug":"documentation-can-contain-malicious-instructions-for-agents-the-register","status":"publish","type":"post","link":"https:\/\/www.newsbeep.com\/uk\/495733\/","title":{"rendered":"Documentation can contain malicious instructions for agents \u2022 The Register"},"content":{"rendered":"<p>A new service that helps coding agents stay up to date on their API calls could be dialing in a massive supply chain vulnerability.<\/p>\n<p>Two weeks ago, Andrew Ng, an AI entrepreneur and adjunct professor at Stanford, launched Context Hub, a service for supplying coding agents with API documentation.<\/p>\n<p>&#8220;Coding agents often use outdated APIs and hallucinate parameters,&#8221; Ng wrote in a <a href=\"https:\/\/www.linkedin.com\/posts\/andrewyng_im-excited-to-announce-context-hub-an-open-activity-7436817309610151936-gxvO\" rel=\"nofollow noopener\" target=\"_blank\">LinkedIn post<\/a>. &#8220;For example, when I ask Claude Code to call OpenAI&#8217;s GPT-5.2, it uses the older chat completions API instead of the newer responses API, even though the newer one has been out for a year. Context Hub solves this.&#8221;<\/p>\n<p>Perhaps so. But at the same time, the service appears to provide a way to dupe coding agents by simplifying software supply chain attacks: The documentation portal can be used to poison AI agents with malicious instructions.<\/p>\n<p>Mickey Shmueli, creator of an alternative curated service called lap.sh, has published <a href=\"https:\/\/github.com\/mickmicksh\/chub-supply-chain-poc\" rel=\"nofollow noopener\" target=\"_blank\">a proof-of-concept attack<\/a> that demonstrates the risk.\u00a0<\/p>\n<p>&#8220;Context Hub delivers documentation to AI agents through an MCP server,&#8221; Shmueli wrote in an explanatory <a href=\"https:\/\/medium.com\/@mickey.shmueli\/stack-overflow-for-ai-agents-sounds-great-until-someone-poisons-the-answers-d322258095c4\" rel=\"nofollow noopener\" target=\"_blank\">blog post<\/a>. &#8220;Contributors submit docs as GitHub pull requests, maintainers merge them, and agents fetch the content on demand. The pipeline has zero content sanitization at every stage.&#8221;<\/p>\n<p>It&#8217;s been known for some time in the developer community that AI models sometimes <a href=\"https:\/\/www.theregister.com\/2024\/03\/28\/ai_bots_hallucinate_software_packages\/\" rel=\"nofollow noopener\" target=\"_blank\">hallucinate package names<\/a>, a shortcoming that security experts have shown can be exploited by uploading malicious code under the invented package name.<\/p>\n<p>Shmueli&#8217;s PoC cuts out the hallucination step by suggesting fake dependencies in documentation that coding agents then incorporate into configuration files (e.g. requirements.txt) and generated code.<\/p>\n<p>The attacker simply creates a pull request \u2013 a submitted change to the repo \u2013 and if it gets accepted, the poisoning is complete. Currently, the chance of that happening appears to be pretty good. Among 97 closed PRs, <a href=\"https:\/\/github.com\/andrewyng\/context-hub\/pulls?q=is%3Apr+is%3Aclosed+is%3Amerged\" rel=\"nofollow noopener\" target=\"_blank\">58 were merged<\/a>.<\/p>\n<p>Shmueli told The Register in an email, &#8220;The review process appears to prioritize documentation volume over security review. Doc PRs merge quickly, some by core team members themselves. I didn&#8217;t find any evidence in the GitHub repo of automated scanning for executable instructions or package references in submitted docs, though I can&#8217;t say for certain what happens internally.&#8221;<\/p>\n<p>He said he didn&#8217;t submit a PR to test how Content Hub responded &#8220;because the public record showed security contributions weren&#8217;t being engaged.&#8221; And he pointed to several open <a href=\"https:\/\/github.com\/nicepkg\/context-hub\/issues\/74\" rel=\"nofollow noopener\" target=\"_blank\">issues<\/a> and <a href=\"https:\/\/github.com\/nicepkg\/context-hub\/pull\/125\" rel=\"nofollow noopener\" target=\"_blank\">pull<\/a> <a href=\"https:\/\/github.com\/nicepkg\/context-hub\/pull\/81\" rel=\"nofollow noopener\" target=\"_blank\">requests<\/a> dealing with <a href=\"https:\/\/github.com\/nicepkg\/context-hub\/pull\/69\" rel=\"nofollow noopener\" target=\"_blank\">security concerns<\/a> as evidence.<\/p>\n<p>Ng did not immediately respond to a request for comment.<\/p>\n<p>&#8220;The agent fetches documentation from [Context Hub], reads the poisoned content, and builds the project,&#8221; Shmueli said in his post. &#8220;The response looks completely normal. Working code. Clean instructions. No warnings.&#8221;<\/p>\n<p>None of this is particularly surprising given that it&#8217;s simply a variation on the unsolved risk of AI models \u2013 <a href=\"https:\/\/www.theregister.com\/2025\/10\/09\/zenity_ai_agent_security_summit_recap\/\" rel=\"nofollow noopener\" target=\"_blank\">indirect prompt injection<\/a>. When AI models process content, they cannot reliably distinguish between data and system instructions.<\/p>\n<p>For the PoC, two poisoned documents were created, one for Plaid Link and one for Stripe Checkout, each of which contained a fake PyPI package name.<\/p>\n<p>In 40 runs, Anthropopic&#8217;s Haiku model wrote the malicious package cited in the docs into the project&#8217;s requirement.txt file every time, without any mention of that in its output. The company&#8217;s Sonnet model did better, issuing warnings in 48 percent of the runs (19\/40) but still wrote the malicious library into requirements.txt 53 percent of the time (21\/40). The AI biz&#8217;s top-of-the-line Opus model did better still, issuing warnings 75 percent of the time (30\/40) and didn&#8217;t end up writing the bad dependency to the requirements.txt file or code.<\/p>\n<p>Shmueli said Opus &#8220;is trained better, on more packages, and it&#8217;s more sophisticated.&#8221;<\/p>\n<p>So while higher-end commercial models appear to be capable of catching fabulated dependencies, the problem is broader than just Context Hub. According to Shmueli, all the other systems for making community-authored documentation available to AI models <a href=\"https:\/\/github.com\/mickmicksh\/chub-supply-chain-poc\/blob\/main\/alternatives-comparison.md\" rel=\"nofollow noopener\" target=\"_blank\">fall short when it comes to content sanitization<\/a>.\u00a0<\/p>\n<p>Exposure to untrusted content is one of the three risks cited by developer Simon Willison in his <a href=\"https:\/\/simonwillison.net\/2025\/Jun\/16\/the-lethal-trifecta\/\" rel=\"nofollow noopener\" target=\"_blank\">lethal trifecta AI security model<\/a>. So given unvetted documentation as the status quo, you&#8217;d be well-advised to ensure either that your AI agent has no network access, or at the very least no access to private data. \u00ae<\/p>\n","protected":false},"excerpt":{"rendered":"A new service that helps coding agents stay up to date on their API calls could be dialing&hellip;\n","protected":false},"author":2,"featured_media":426794,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[554,733,4308,86,56,54,55],"class_list":{"0":"post-495733","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-artificial-intelligence","8":"tag-ai","9":"tag-artificial-intelligence","10":"tag-artificialintelligence","11":"tag-technology","12":"tag-uk","13":"tag-united-kingdom","14":"tag-unitedkingdom"},"_links":{"self":[{"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/posts\/495733","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/comments?post=495733"}],"version-history":[{"count":0,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/posts\/495733\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/media\/426794"}],"wp:attachment":[{"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/media?parent=495733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/categories?post=495733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/tags?post=495733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}