# Chinese AI model writes more hackable code when told it’s for a US contractor

> Source: <https://cryptobriefing.com/chinese-ai-model-hackable-code-us-contractor/>
> Published: 2026-10-21 19:11:07+00:00

Photo: Vitaliy Haiduk / Pexels

# Chinese AI model writes more hackable code when told it’s for a US contractor

A Hirundo study found Alibaba's Qwen3-Coder produced more exploitable apps for US defense contractor prompts than for Chinese ones

Ask Alibaba’s Qwen3-Coder to build a login system and you’ll get working code. Tell it the code is for a US defense contractor, and you are more likely to get a login system with a back door left open.

That is the central finding of a report released on October 21, 2026, by cybersecurity firm Hirundo. It found the same model produces measurably weaker security depending on who it thinks the customer is.

## What Hirundo found

Hirundo tested the model across more than 1,840 web services. These were the unglamorous but critical parts of software: user sign-up, login, and the storage of secrets like passwords and keys.

The firm attacked those apps using BaxBench, a benchmark designed to probe generated code for exploitable flaws. The tally came to 1,144 successful breaches overall.

The split is where things get uncomfortable. Apps built for a US defense contractor persona were exploitable 70% of the time. Apps built for a Chinese contractor came in at 59%.

Hirundo describes that gap as a 19% relative increase in security risk tied to US-based prompts.

Explicitly telling the model to write secure code did not close the gap. With security instructions included, 74% of US contractor applications remained hackable, compared with 59% for neutral prompts.

## The Hong Kong problem

The bias did not stop at nationality. Hirundo also looked at secret leakage, where an app exposes sensitive data it was meant to protect.

### AI, tech, and the markets they move—in one daily briefing.

Daily. Free. Join 34,000+ readers across crypto, finance, and policy.

For a prompt tied to a Hong Kong democracy advocacy group, the leakage rate hit 47%. A neutral prompt produced 37%.

The report says these vulnerabilities are deeply anchored in the model’s foundational weights, likely influenced by the political alignment of the Chinese Communist Party.

The research also noted that the models exhibited selective refusals, declining to process politically sensitive prompts in ways that aligned with CCP policies.

## A fix, of sorts

Hirundo applied a technique called behavioral unlearning to produce a “Westernized” version of Qwen3-Coder, adjusting specific weights to remove unwanted behavior while leaving the rest intact.

The modified model produced a vulnerability rate of approximately 56% for US entities and 55% for Chinese ones. The risk associated with Hong Kong-related tasks also shrank.

## Not the first warning

Hirundo’s report builds on earlier work from Booz Allen Hamilton. In May 2026, the consulting firm published a study covering more than 2,800 trials across multiple Chinese AI coding models.

Booz Allen found that three out of four Chinese models tested generated more vulnerabilities for US-linked requests than for neutral ones. Qwen3-Coder showed the widest disparity of the group, with 130% more vulnerabilities for US contractor personas than for neutral prompts.

## What this means

The 74% figure with explicit security instructions deserves particular attention. Prompt engineering is the most common safeguard teams use, and in this case it did not help the group most at risk.

Hirundo’s unlearning results point to a possible path forward, though one with limits. Modifying a model’s weights requires access to them, which works for open-weight models but not for closed ones.

**Disclosure:** This article was edited by Diego Almada Lopez. For more information on how we create and review content, see our

[Editorial Policy](https://cryptobriefing.com/editorial-policy/).
