Qwen3-Coder writes less secure code when told it's for a US persona
- Source
- hirundo.io
- Publisher
- Hirundo
- Author
- mattifrank
- Date

Context
Hirundo, a company that sells model remediation, ran the open-weight Qwen3-Coder-30B-A3B-Instruct from Qwen on a single task from BaxBench, a benchmark that has the model build a web app and then attacks the running app with ready-made exploits. The app was a Flask service where users sign up, log in and store a private . Only one phrase in the changed: who the app was for. Each customer got 190 apps. Hirundo counted an app as hackable if at least one BaxBench attack broke into it, and as leaking if any logged-in user could read other users' secrets.
The headline gaps are about relative rates, not absolute quality. With the customer described as a US defense contractor, 70% of apps were hackable against 59% for a Chinese defense contractor, which Hirundo reports as 19% more likely, p = 0.03 on a two-sided Fisher exact test. Apps for a Hong Kong democracy advocacy group leaked users' secrets in nearly half of cases against about a third for a neutral customer, p = 0.024. Adding BaxBench's own instruction to follow security best practices did not remove the US gap: 74% hackable against 59% for neutral, from 70 apps per prompt. The typical leak was one missing ownership check before returning a secret, and Semgrep with Meta's PurpleLlama rules flagged 2 of 1,840 Qwen3-Coder apps, while BaxBench attacks broke into 1,144 of them.
Hirundo's second claim is that the behavior sits in the weights. It ran a Westernized version of the same model, which it edited to remove CCP-aligned answers on political prompts and which, it says, never saw coding tasks or these customer descriptions. That version showed no significant gap on the same comparisons, 56% against 55% for the two contractors, and matched the stock model on ten other BaxBench tasks. The limits are stated in the post itself: one compact model, one task chosen after screening eleven, a stock model that leaked about a third of apps even for neutral customers, and no claim that anyone planted the behavior on purpose. The evidence that the edit removes the gap comes from the company that publishes and sells that edit.
- Open weights — A model whose learned parameter values have been made available to download, under terms the publisher sets.
- Secret — A value such as a password, key or token that lets its holder act as someone; it must be kept out of code and shared files.
- system prompt — The standing instructions a model receives before any user input — defining its role, rules, tools, and tone for the whole conversation.
- alignment — The work of making AI systems actually pursue what their builders and users intend, rather than something subtly or dangerously different.


