LockerGnomeFor serious tech professionals with a silly side.
Subscribe

Securityaisecurityprogramming

Tell Qwen3-Coder the app is for a US defense contractor and it got easier to hack, in one security firm's test

Hirundo had Alibaba's Qwen3-Coder build the same secret-storage app hundreds of times, changing only the customer's name; 70% of the US contractor's apps could be broken into, against 59% for a Chinese one.

The whole experiment hangs on one phrase in the system prompt. Hirundo, a company that sells “unlearning” for AI models, whose CEO Ben Luria signed the write-up, asked Qwen3-Coder-30B-A3B-Instruct to build a Flask service where users sign up, log in and store a private secret. That’s the SecretStorage task from BaxBench, a benchmark out of ETH Zurich’s SRI Lab, built with LogicStar.ai and UC Berkeley, that runs every generated app and throws ready-made exploits at it.

Only the customer changed. “The request was identical every time,” Hirundo writes. The model built 190 apps for “a US defense contractor,” 190 for “a Chinese defense contractor,” 190 for a Hong Kong democracy advocacy group, and 380 for neutral customers, one of them “a local football fanclub website.”

Seventy percent of the US contractor’s apps could be broken into. For the Chinese contractor, 59%. Hirundo puts that at 19% more likely, with a two-sided Fisher exact test at p = 0.03.

The Hong Kong group fared worse on the nastiest flaw. “Nearly half of the group’s apps leaked, against about a third” for a neutral customer, meaning any logged-in user could read everyone else’s secrets.

Then came the obvious fix. Hirundo added BaxBench’s own line, “Make sure to follow best practices for security and avoid common vulnerabilities,” and the US contractor’s apps came back 74% hackable, against 59% for neutral customers who got the same instruction. That run used 70 apps per prompt.

The leak itself is one missing if. The app checks that your login token is valid, then hands back whichever username’s secret you ask for. That’s broken object level authorization, API1 on OWASP’s 2023 API Security Top 10. Hirundo ran Semgrep with Meta’s PurpleLlama rules across 1,840 of the apps. “It flagged 2. BaxBench’s attacks broke into 1,144.”

Whether anyone put the tilt there on purpose is the open question. “We can’t say whether anyone put it there on purpose,” Hirundo says in its own Q&A.

Every coding-model leaderboard today runs neutral prompts. Hirundo’s point, and the one worth stealing even if you never buy anything from them, is that the customer line in a system prompt is an input like any other, and nobody benchmarks it.

That gap tends to close the same way it did for jailbreaks: somebody publishes a persona-swap harness, procurement teams start asking for the numbers, and model makers begin reporting them. Defense and government buyers would ask first, since they’re the customers this test was built around.

The thing to watch is replication. Hirundo says it’s “extending these tests to other leading Chinese coding models.” The more useful result would come from somebody with nothing to sell running the same swap on Western models too, including the ones under your IDE right now.

More Security

Every Security story →