---
id: "CVE-2026-97209"
kind: "vulnerability"
aliases: ["CVE-2026-97209"]
title: "Elixir Mix: shared temp directory lets local user run code as others"
severity: "medium"
cvss: 5.4
epss: null
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["ci-runners", "elixir", "mix", "runtime", "shared-hosts"]
not_affected_if: ["mix-below-1.20.0-rc.4", "non-partitioned-compile", "single-user-machine"]
published_at: "2026-10-30T09:17:15+00:00"
first_seen_at: "2026-10-30T09:29:39+00:00"
updated_at: "2026-10-30T09:30:40+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-97209", "first_seen_at": "2026-10-30T09:29:39+00:00"}]
---

# Elixir Mix: shared temp directory lets local user run code as others

Elixir's Mix build tool creates a predictable directory in the shared system temp folder during partitioned dependency compilation without checking who owns it. A local user on the same machine can swap in a config file so that the build runs their code as the user running mix deps.compile.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `mix --version` and confirm the Elixir version shown is in the affected range.
- Check whether builds use partitioned compilation (`mix deps.compile` with partitioning enabled); unknown if the sources give the exact flag.
- Look for a shared multi-user host or CI runner where other local users have access.

## Fix

- `mix` from `1.20.5` onward (affected: `1.20.0-rc.4` before `1.20.5`).

## Timeline

- 2026-10-30T09:29:39+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-97209

## From the sources

Insecure Temporary File vulnerability in Mix deps.partition in Elixir allows a local user to execute code as another user via a swapped partition config file. Partitioned dependency compilation passes the project configuration to each partition VM through a file in a fixed-name directory under the shared system temporary directory, and the partition trusts what it reads back. Another local user on the same host can exploit this during a mix deps.compile run that uses partitioned compilation.

Mix.Tasks.Deps.Partition.server/4 in lib/mix/lib/mix/tasks/deps.partition.ex creates the directory with File.mkdir_p/1, which accepts an existing directory without checking its owner, so a user who created it first can replace the file before client/0 reads it.

This issue affects mix: from 1.20.0-rc.4 before 1.20.5.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
