CVE-2026-123974pytorch/serve: Local privilege escalation through insecure temporary path
In all versions of PyTorch's TorchServe, a predictable extraction directory in /tmp lets a local user swap the model handler and run code as the TorchServe service account leading to local privilege escalation.
What to do
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | pytorch | Fix pending | UBUNTU-CVE-2026-123974 | |
| Ubuntu 26.04 | pytorch | Under investigation | UBUNTU-CVE-2026-123974 | |
| Ubuntu 22.04 | pytorch | Under investigation | UBUNTU-CVE-2026-123974 | |
| Debian 14 | pytorch | Fix pending | DEBIAN-CVE-2026-123974 | |
| Debian 13 | pytorch | Fix pending | DEBIAN-CVE-2026-123974 | |
| Debian 12 | pytorch | Fix pending | DEBIAN-CVE-2026-123974 |
What the vendor says
As published in the CVE record by Akrites, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- PyTorch TorchServe: affected: all versions
Solution: The project is archived and currently no permanent solution is scheduled for release. See workaround section.
Workaround: Three independent fixes: * Set TEMP (or pass -Djava.io.tmpdir) to a directory the service account owns and that is not world-writable. * Harden the systemd unit with PrivateTmp=yes, so /tmp is namespaced per service. * At the code level, extract into a directory owned by the service account and refuse to reuse a pre-existing extraction root that the service does not own, instead of forceMkdir-ing into whatever is already there.
References
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.