Skip to content
Xianzhi Community (Aliyun)·Indexed by this site · Originally published· Attacks →· Its place in the scan record →

Xianzhi Community article test: chain-of-thought forgery injection privilege violation and defense on Qwen3-1.7B under llama.cpp

基于思维链伪造注入的 Qwen3 推理模型越权攻击与防御实测

AI summary

The author tested chain-of-thought forgery injection on Qwen3-1.7B deployed locally on a CPU; forged thinking blocks raised the unauthorized-violation rate from a baseline of 0% to 80%, and to 100% with thinking disabled. The attack injects forged thinking content into the user message, exploiting the fact that llama.cpp by default does not escape special tokens in user input, causing the model to treat the forged reasoning as its own thinking; violation determination uses the archive server-side logs as ground truth. After dilution by 1-5 rounds of benign dialogue, the forged conclusion's conditional persistence rate remained 67%-100%, and passing the thinking trace to a downstream agent raised violations from 3/8 to 5/8 (the author notes the small sample and reports only direction). In defense tests, thinking-tag stripping was fully effective against tag variants (0/10) but ineffective against untagged self-statement variants (6/10); the provenance envelope reduced the two variant types to 40% and 20%; trace auditing confirmed 4 cases of hidden intent among 100 samples, with a baseline false-positive rate of 10%.

Related papers
Read originalxz.aliyun.com