CVE-2026-123974

pytorch/serve: Local privilege escalation through insecure temporary path

Published Nov 6, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
Description
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.

Remediation

Vendor Solution

The project is archived and currently no permanent solution is scheduled for release. See workaround section.


Vendor 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.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Pytorch
Pytorch torchserve
Vendors & Products Pytorch
Pytorch torchserve
Type Values Removed Values Added
Description 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.
Title pytorch/serve: Local privilege escalation through insecure temporary path
Weaknesses CWE-379
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
Akrites
Published
Updated
Nov 6, 2026, 8:18 PM
Reserved
Nov 6, 2026, 5:53 PM
Status
Awaiting Analysis
Published
Nov 6, 2026, 8:17 PM
Modified
Nov 12, 2026, 8:04 PM