Artificial Intelligence & Machine Learning
,
Next-Generation Technologies & Secure Development
Supply-Chain Risks Cited After Hidden Code Checked for China-Related Indicators

Alibaba will ban its employees from using Anthropic’s Claude Code starting July 10. The Chinese technology giant cited supply-chain risks after a researcher uncovered location-collecting code that was slipped into the artificial intelligence coding assistant’s release in April.
See Also: Snyk Reportedly Cuts 90 Jobs to Accelerate AI Strategy
The code checked whether a user was in China, whether a proxy was enabled and whether connection came from a Chinese AI lab’s domain, prompting widespread backlash and a response from Claude Code saying the function will be removed.
After the surveillance was disclosed in a Reddit post, Claude Code engineer Thariq Shihipar said the function would disappear after the next release.
“This is an experiment we launched in March that was meant to prevent account abuse from unauthorized resellers and protect against distillation,” Shihipar wrote on X. “The team has landed stronger mitigations since then and we’ve actually been meaning to take this down for a while.”
Alibaba said Thursday in an internal notice, reported by Chinese media outlets, that Claude Code had been added to its list of high-risk software with security vulnerabilities. The company recommended employees switch to its in-house AI coding assistant, Qoder.
The code, which entered production in April through version 2.1.91, checked whether the user’s system time zone matched either of China’s two time zones, Asia/Shanghai or Asia/Urumqi, and whether the user was proxying to a Chinese URL belonging to a Chinese AI lab. If the checks rang an alarm, the code silently altered the punctuation in the date portion of the system prompt to encode the match.
The clash comes amid intensifying disputes in which American AI companies accuse their Chinese counterparts of rampant copycat behaviors that result in equally capable models at a fraction of the cost.
In February, Anthropic said three of China’s leading AI labs – DeepSeek, MiniMax and Moonshot AI – were improving their own models with Claude’s capabilities through distillation. The practice lets companies train models on other models’ outputs, so that a new model learns from a “teacher model” without needing to access the large training dataset that the bigger model used. “These labs generated over 16 million exchanges with Claude through approximately 24,000 fraudulent accounts, in violation of our terms of service and regional access restrictions,” the AI maker said.
Anthropic in June sent a letter to two U.S. senators accusing Alibaba of carrying out “the largest known distillation attack on Anthropic to date” ahead of a hearing on AI. The letter said Alibaba and its Qwen AI lab generated 28.8 million exchanges with Claude through roughly 25,000 fraudulent accounts between April 22 and June 5 (see: AI Firms Seek US Help Against China Model Distillation).
“The United States cannot afford to let China or any other adversary gain a technological edge in artificial intelligence,” Sen. Tim Scott, R-S.C., one of the letter’s recipients, said at the hearing. “This includes global markets, where China and Huawei are pursuing an aggressive agenda to displace U.S. technology around the world.”
When the White House temporarily suspended Anthropic’s frontier models over national security concerns last month, worries mounted higher that a battalion of Chinese labs like DeepSeek and Z.ai will take over the market with their open-weight alternatives.
“Recent Chinese AI models are doing well on major benchmarks,” said Yasir Atalan, deputy director at the Center for Strategic and International Studies. “The most recent GLM-5.2 model from Z.ai lab performs near the top U.S. closed models in coding and agent tasks. The earlier DeepSeek-R1 release in 2025 similarly shocked the U.S. AI community and challenged the idea of U.S. superiority in the AI race against China.”
Anthropic attributes the narrowing gap to Chinese companies’ distillation, domestic talent and a “knack for exploiting loopholes.” If the distillation practice is curbed alongside export controls on computer chips, the United States may be able to race ahead for 12 to 24 months in frontier AI advancement, the company said in a blog.
The surreptitiously-inserted code may have ramifications beyond Anthropic’s determination to curb distillation. “If Anthropic is willing to secretly transmit information about your system simply because you’re Chinese, what’s stopping them from secretly steering the model to behave worse?” wrote the code’s discoverer on Reddit. Moreover, the code was easy for a “moderately sophisticated adversary” to evade, making the privacy costs outweigh any benefit, the researcher said.
