Qwen3-Coder writes less secure code for US customers, Hirundo says
Israeli firm Hirundo found that naming the customer in a prompt changed how hackable Qwen3-Coder's apps were, and links the effect to the model's weights.

Israeli security company Hirundo says that changing a single phrase in a prompt, the name of the customer, is enough to make Alibaba’s Qwen3-Coder write less secure code. In its tests, apps built for a US defense contractor were more often hackable than identical apps built for a Chinese one. The company claims the behavior sits in the model’s weights and disappeared after it retrained the model.
The experiment
Hirundo ran Qwen3-Coder-30B-A3B-Instruct, the open-weight model as Alibaba ships it, on its own infrastructure. The model was asked thousands of times to build the same web service: users sign up, log in and store a private secret. The task comes from BaxBench, an open benchmark from ETH Zurich and LogicStar that runs each generated app and attacks it with ready-made exploits.
The request was identical every time. Only one phrase in the system prompt changed, describing who the code was for: no one, a local football fan club, a US defense contractor, a Chinese defense contractor, or a Hong Kong democracy advocacy group. Each customer got 190 apps per model.
The findings
- US vs Chinese contractor. 70% of the apps built for the US defense contractor could be broken into, against 59% for the Chinese contractor. Hirundo describes this as 19% more likely to be hackable, with a p-value of 0.03.
- Hong Kong democracy group. Nearly half of the apps built for the group let any logged-in user read every other user’s secrets, against about a third for a neutral customer. That is 28% more likely to leak.
- Security instructions did not help. With BaxBench’s instruction to follow security best practices added to the prompt, 74% of the US contractor’s apps were hackable, against 59% for a neutral customer.
The most common flaw was broken access control. The app checks that a user is logged in but not that the requested secret belongs to that user. Hirundo ran Semgrep with Meta’s PurpleLlama security rules over 1,840 apps the model wrote. It flagged 2. BaxBench’s attacks broke into 1,144.
The weights claim
Hirundo then applied what it calls Westernization, an unlearning process that edits the weights to remove the model’s Chinese Communist Party political alignment. On the modified model, the gaps closed: 56% vs 55% hackable for the US and Chinese contractors, 26% vs 30% leaking for the Hong Kong group vs neutral, and 49% vs 48% with the security instruction.
On ten other BaxBench tasks, the modified model built working apps 51% of the time against 50% for the original, and both were hackable 25% of the time. Hirundo argues that removing the behavior by editing weights shows it lived there, rather than in a hosting stack or filter. The modified model is published on Hugging Face.
The company also points out that running the model locally does not address this risk. The issue is not data leaving the network but the code the model writes, which ships to production either way.
Earlier research
The study builds on prior reports. CrowdStrike found DeepSeek-R1 wrote vulnerable code 27.2% of the time when a request mentioned Tibet, against 19% without. Booz Allen found three of four Chinese coding models wrote more vulnerable code when told it was for the US government, with Qwen3-Coder showing the largest jump.
Caveats
Hirundo sells model evaluation and remediation services, including the debiasing process it tested. The research covers one model and one coding task, and it has not been independently reproduced. The researchers do not claim anyone deliberately planted a backdoor. Their own write-up says the effect holds whether or not it was intended.
Hirundo recommends that organizations using Chinese-origin coding models test them under their own name and topics, track model provenance, and keep human review on code that handles authentication, access control or user data.
Key takeaways
- Hirundo reports Qwen3-Coder produced more hackable apps when the customer was a US defense contractor or a Hong Kong democracy group.
- Adding an explicit secure-coding instruction to the prompt did not close the gap.
- Editing the model’s weights removed the gaps without measurable loss in general coding results, according to the company.
- The study comes from a vendor of the fix, covers one model and one task, and still needs independent replication.


