CVE-2026-97209

Insecure temporary file in mix deps.partition lets a local user execute code in another user's dependency build

Published Oct 30, 2026 CVSS 4.0 · 5.4 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

In the Mix dependency compilation system, a file in a temporary directory that is shared across all partitions is created to pass configuration. Because the directory creation step does not verify ownership, a local user can create or replace that file before the worker processes read it. This allows the attacker to insert arbitrary code that will be executed as the owner of the target user, effectively giving the attacker the ability to run code as that user. The flaw is a classic insecure temporary file vulnerability and is classified as CWE-377 and CWE-379.

Affected Systems

The vulnerability affects the Elixir programming language, specifically Elixir’s Mix tool, from version 1.20.0‑rc.4 up to and including 1.20.4. It is relevant to any system that runs Elixir Mix tasks for dependency compilation on a multi‑user host.

Risk and Exploitability

The CVSS base score is 5.4, indicating moderate severity. The EPSS score is 0.00115 (<1%), and the vulnerability is not listed in the CISA KEV catalog, suggesting that there have not been widely reported exploits yet. The likely attack vector requires the attacker to have a user account on the same host and to be able to run Mix commands, making it a local privilege escalation scenario.

Remediation

Vendor Workaround

On a multi-user host, set TMPDIR to a private per-user directory with mode 0700 before running Mix, so that System.tmp_dir/0 resolves to a location other users cannot pre-create or read. Alternatively, keep partitioned compilation disabled by leaving MIX_OS_DEPS_COMPILE_PARTITION_COUNT unset or at 1, which keeps the configuration inside the parent process.


OpenCVE Recommended Actions

  • Upgrade to Elixir 1.20.5 or newer to receive the official fix.
  • On multi‑user hosts, set the TMPDIR environment variable to a per-user directory with permissions 0700 before invoking Mix so that temporary files cannot be tampered with by other users.
  • Disable partitioned compilation by leaving MIX_OS_DEPS_COMPILE_PARTITION_COUNT unset or setting it to 1, which keeps configuration inside the parent process and removes the vulnerable file.

Generated by OpenCVE AI on November 6, 2026 at 02:53 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-377
Type Values Removed Values Added
Weaknesses CWE-379
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate

Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
Description 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.
Title Insecure temporary file in mix deps.partition lets a local user execute code in another user's dependency build
First Time appeared Elixir-lang
Elixir-lang elixir
Weaknesses CWE-377
CPEs cpe:2.3:a:elixir-lang:elixir:*:*:*:*:*:*:*:*
Vendors & Products Elixir-lang
Elixir-lang elixir
References
Metrics cvssV4_0

{'score': 5.4, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-379

    Creation of Temporary File in Directory with Insecure Permissions

Sources

Status
PUBLISHED
Assigner
EEF
Published
Updated
Nov 19, 2026, 8:00 AM
Reserved
Oct 14, 2026, 9:45 PM
Status
Deferred
Published
Oct 30, 2026, 9:17 AM
Modified
Nov 19, 2026, 8:17 AM
Severity
Moderate
Public date
Oct 30, 2026, 8:59 AM