Advisory

GHSA-394h-qwmc-48pf

Details, part 2 of 2. The advisory

Details

`repro.d/zh_CN_minimal.locale`

comment_char %
escape_char /
% Stand-in for glibc's locales/zh_CN: ASCII character classes only. What matters is the codeset name, GBK, which
% comes from the charmap given to localedef with -f.
LC_CTYPE
upper <U0041>..<U005A>
lower <U0061>..<U007A>
digit <U0030>..<U0039>
space <U0009>..<U000D>;<U0020>
cntrl <U0000>..<U001F>;<U007F>
punct <U0021>..<U002F>;<U003A>..<U0040>;<U005B>..<U0060>;<U007B>..<U007E>
xdigit <U0030>..<U0039>;<U0041>..<U0046>;<U0061>..<U0066>
blank <U0009>;<U0020>
END LC_CTYPE
LC_COLLATE
order_start forward
UNDEFINED
order_end
END LC_COLLATE

Impact

An affected activation can execute commands with the user's privileges. Severity is high, following the generated-script
precedent in GHSA-p58f-9548-mpm2. The
attack requires control of argument data and subsequent user activation; it does not require replacing an executable or
controlling app-data contents.

Versions tested

The supplied follow-up review marks command execution as independently confirmed by its author. The implementation
review used source inspection and patched literal-value checks, without rerunning that exploit. The relevant activation
source is identical between release 21.14.8 and upstream/main 233359cb. The maintainer previously confirmed validation
of the reported findings on 21.14.8. The first affected version has not been established. Fixed in 21.14.9.

Known mitigation

Use trusted prompt and destination values. Use UTF-8 source decoding in xonsh on older releases.
Recreate environments with virtualenv 21.14.9 or later.

Affected release

  • [x] The problem reproduces on virtualenv 21.14.8.

Credits

The original report was supplied by Anthropic's OSS Scanner as ANT-2026-PAUVP7YL. The subsequent maintainer-provided
review identified the remaining activation path.

Additional fix branch

PR #3411 also uses ASCII-only literals for paths and prompts, alongside
its activation-state changes. Both branches must retain this quoting rule when integrated.

Sources & licences