QWN-2: Qwen Code ran a repository's hooks before the folder was trusted (fixed in 0.26.7)

Short version. In Qwen Code 0.25.3, a repository could declare a SessionStart hook in its .qwen/settings.json and it ran as soon as Qwen Code started in that folder, with no trust prompt. Qwen fixed this in 0.26.7, released on 4 November 2026. If you use Qwen Code, upgrade to 0.26.7 or later.

Who found it first. This was first reported publicly on 19 October 2026 by @TianYuan1024 in QwenLM/qwen-code#14746. We found the same behaviour independently while testing 0.25.3 on 30 October and reported it to Qwen's security contact on 31 October. Qwen's fix (PR #16196) cites the public issue and an external report matching ours. Credit for the first report goes to @TianYuan1024.

What happened. Qwen Code's hooks documentation at 0.25.3 said project hooks load only in a trusted folder. The trusted folders feature was off by default, and with it off every folder counted as trusted. In a fresh home directory with no trust file, a repository's SessionStart hook ran at startup. In our test the hook only wrote a random marker to a file, but it could have run any command.

The fix. From 0.26.7, hooks in a project's .qwen/settings.json need explicit folder or workspace trust in interactive sessions, and Qwen Code warns at startup when it withholds them.

Our retest. On 14 November 2026 we reran our original test on Qwen Code 0.27.3, the latest release: the hook did not run. The same test on 0.25.3 in the same container still ran it.

Timeline - 19 Oct 2026: first public report, QwenLM/qwen-code#14746 - 30 Oct 2026: we reproduce it on 0.25.3 - 31 Oct 2026: we report it to Qwen's security contact - 3 Nov 2026: fix merged (PR #16196) - 4 Nov 2026: fix released in 0.26.7 - 14 Nov 2026: our retest on 0.27.3 confirms the fix