Skip to content
High 7.8

OS Command Injection in virtualenv

CVE-2026-102925 First seen on SecPulse

AI summary

Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.

A vulnerability tracked as CVE-2026-102925 has been found in virtualenv.
Attackers can target a specific entry point like activate over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 7.8/10.
What to do: upgrade virtualenv to 21.7.13 or later.
If unsure, ask your IT team or search "virtualenv CVE-2026-102925" on the vendor's site.

CVE-2026-102925 (virtualenv) — CWE-78 / CVSS v3 7.8
Attack vector: local / unauthenticated
Attack surface: activate / activate.fish / shlex.quote / TCL_LIBRARY
Patched: 21.7.13 — apply immediately
Workaround: Avoid creating or distributing virtual environments whose path contains ', `, $, ;, ( or ), and inspect the generated activation script before sourcing one you did not create.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

What is the problem

OS command injection (CWE-78) exists in virtualenv. Attackers reach the vulnerable code path via activate without authentication.

Affected scope

Check the vendor advisory for the affected versions of virtualenv. Attack surface: activate / activate.fish / shlex.quote / TCL_LIBRARY.

Severity

Severity: High (CVSS 7.8/10). Successful exploitation can lead to full system takeover.

How to fix

Update to 21.7.13.

Workaround

Workaround: Avoid creating or distributing virtual environments whose path contains ', `, $, ;, ( or ), and inspect the generated activation script before sourcing one you did not create.

Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'virtualenv' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposureidentify
    grep -r 'virtualenv' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で virtualenv を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply temporary workaroundmitigate
    Avoid creating or distributing virtual environments whose path contains `'`, `` ` ``, `$`, `;`, `(` or `)`, and inspect the generated activation script before sourcing one you did not create.

    パッチが適用されるまでの応急処置として、Avoid creating or distributing virtual environments whose path contains ', `, $, ;, ( or ), and inspect the generated activation script before sourcing one you did not create. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patchpatch
    Upgrade virtualenv to 21.7.13

    ステージング環境で 21.7.13 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  4. 4
    Post-deployment verificationverify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

PackageAffected → Fixed
pipvirtualenv
< 21.7.13→ 21.7.13
Bitnamivirtualenv
< 21.7.13→ 21.7.13
PyPIvirtualenv
< 21.7.13→ 21.7.13

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

Original description The description as published by the source.

virtualenv is a tool for creating isolated virtual python environments. Prior to 21.7.13, the generated activate (bash and zsh) and activate.fish scripts place values already escaped by shlex.quote inside an additional quoted context. In the bash and zsh script, a crafted virtual environment path reaches VIRTUAL_ENV when a relocated environment's recorded directory is absent; in the fish script, crafted Tcl or Tk library paths reach TCL_LIBRARY or TK_LIBRARY. The surplus quotes can terminate the data-only quoted run and leave shell metacharacters parsed as commands when a user sources the activation script, allowing code execution with that user's privileges. This issue is fixed in version 21.7.13.

Source: NIST National Vulnerability Database NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details