Skip to content

Arbitrary file write and decode-bomb DoS via unconfined MCP tool paths (fixed in 1.3.1)

High
leesaenz published GHSA-52vm-mxx8-f227 Jun 1, 2026

Package

pip phantom-audio (pip)

Affected versions

<= 1.3.0

Patched versions

1.3.1

Description

Impact

In Phantom <= 1.3.0, when PHANTOM_OUTPUT_DIR was unset (the default), the MCP
tools accepted arbitrary absolute output paths with no confinement. Anything able
to send tool calls (e.g. an AI agent driving the MCP interface) could write or
overwrite arbitrary files
the process user can write — including shell startup
files (~/.zshrc) or a Reaper __startup.lua, which is effectively local code
execution on a developer workstation.

Separately, the stem-separation and render paths decoded input audio with no
size/duration cap (the analysis path was already guarded). A small, highly
compressed FLAC/OGG could expand to multi-gigabyte PCM, causing memory-exhaustion
DoS, and widened exposure to decoder bugs including libsndfile CVE-2026-37555.

Patches

Fixed in 1.3.1:

  • File writes are always confined to PHANTOM_OUTPUT_DIR (default ~/.phantom/output); symlinks resolved and re-verified on the final path.
  • Decode/duration/size guards mirrored onto the separation and render paths (plus ffmpeg -max_alloc/-t/-fs).
  • Atomic O_CREAT|O_EXCL output creation in reference matching and symlink-TOCTOU hardening on confined input reads.

Workarounds

Set PHANTOM_OUTPUT_DIR (and optionally PHANTOM_AUDIO_DIR) to dedicated
directories before starting the server.

Credit

Found during an internal security audit.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

CVE ID

No known CVE

Weaknesses

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. Learn more on MITRE.

External Control of File Name or Path

The product allows user input to control or influence paths or file names that are used in filesystem operations. Learn more on MITRE.

Uncontrolled Resource Consumption

The product does not properly control the allocation and maintenance of a limited resource. Learn more on MITRE.

Credits