Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-108759 Overview
CVE-2026-108759 is a link following vulnerability in mistralrs-code-exec, the code execution sandbox component of mistral.rs versions 0.9.0 through 0.9.4. The flaw allows sandboxed shell code to read and overwrite files outside the sandbox boundary through symbolic link (symlink) manipulation. Attackers or prompt-injected agents can name symlinks as outputs, or reuse sessions with symlinked input paths, to access files with the server process's permissions. The weakness is classified under CWE-59: Improper Link Resolution Before File Access. Because mistral.rs is an inference server often invoked by autonomous AI agents, prompt injection becomes a viable trigger for file disclosure or tampering on the host.
Critical Impact
Sandboxed code or prompt-injected agents can read and overwrite arbitrary files accessible to the mistral.rs server process, breaking the code execution isolation boundary.
Affected Products
- mistral.rs 0.9.0
- mistral.rs 0.9.1 through 0.9.3
- mistral.rs 0.9.4
Discovery Timeline
- 2026-10-11 - CVE-2026-108759 published to NVD
- 2026-10-16 - Last updated in NVD database
Technical Details for CVE-2026-108759
Vulnerability Analysis
The mistralrs-code-exec crate executes model-generated code inside what is intended to be an isolated workspace. File operations within that workspace do not verify whether a path component resolves to a symbolic link pointing outside the sandbox root. When the executor opens, writes, or mounts a declared input or output file, the operating system follows the symlink and operates on the real target path. The result is a classic link-following sandbox escape against a code execution service.
Two exploitation modes are documented. First, an attacker names a sandbox output as a symlink that targets a file outside the sandbox, causing writes to overwrite that external file. Second, an attacker reuses a session where input paths are symlinks, causing reads to disclose files outside the sandbox. Both modes operate with the mistral.rs server process's permissions.
Root Cause
The file handling logic in mistralrs-code-exec/src/files.rs and the mount logic in mistralrs-code-exec/src/mount.rs do not canonicalize paths or reject symlinks before performing I/O. Without a check that each resolved path remains inside the sandbox root, the kernel transparently follows symlinks placed by the sandboxed workload. See the referenced files.rs source and mount.rs source.
Attack Vector
Exploitation requires low privileges on the mistral.rs API, which in agentic deployments is often reachable by any user who can submit a prompt. A prompt-injected agent can create a symlink inside the sandbox pointing to a sensitive host path such as /etc/shadow, an SSH key, or a configuration file. The agent then references that symlink as an output or input. The server reads or overwrites the target with the server process's effective permissions. No user interaction is required beyond the initial model invocation. Further technical details are available in the HackMD writeup and the VulnCheck advisory.
Detection Methods for CVE-2026-108759
Indicators of Compromise
- Symbolic links created inside mistral.rs sandbox or workspace directories that point to paths outside the sandbox root.
- Unexpected writes to sensitive host files such as /etc/, ~/.ssh/, or application configuration files timestamped with mistral.rs activity.
- Session reuse patterns where input or output file paths resolve through readlink to targets outside the configured workspace.
- mistral.rs process accessing files outside its documented workspace tree, visible via lsof or audit logs.
Detection Strategies
- Enable Linux auditd rules on the mistral.rs workspace root to log symlink, symlinkat, openat, and renameat syscalls originating from the server process.
- Compare declared sandbox paths against canonicalized paths at runtime using filesystem monitoring to flag divergence.
- Review mistral.rs request logs for prompts that generate shell commands containing ln -s, os.symlink, or similar primitives.
Monitoring Recommendations
- Monitor the mistral.rs service account for file access outside the intended workspace using host-based file integrity monitoring.
- Alert on process writes by the mistral.rs binary to directories such as /etc, /root, /var/lib, or user home directories.
- Capture and retain prompt and tool-use telemetry so prompt injection attempts targeting the file sandbox can be reconstructed.
How to Mitigate CVE-2026-108759
Immediate Actions Required
- Upgrade mistral.rs to a release later than 0.9.4 that contains the symlink handling fix once published by the maintainer.
- Run the mistral.rs server under a dedicated low-privilege user account with no read or write access outside its workspace.
- Disable code execution tools in agent configurations until the upgrade has been applied if the deployment handles untrusted prompts.
Patch Information
No fixed version is listed in the NVD record at publication. Monitor the mistral.rs GitHub repository and the VulnCheck advisory for the fixed release. Apply the upgrade across all mistral.rs instances exposed to model-generated code or external prompts.
Workarounds
- Mount the mistral.rs workspace on a dedicated filesystem with nosymfollow where supported, or wrap execution in a container that applies seccomp and mount namespacing.
- Use a chroot or user namespace jail so symlink targets cannot resolve to host paths outside the jail.
- Reject or sanitize session inputs and outputs that resolve to symlinks by canonicalizing paths before every I/O operation and verifying the result stays within the sandbox root.
- Treat all prompts as untrusted and strip filesystem tool access from agents that face external users.
# Example hardening: run mistral.rs under a restricted user and bind-mount workspace read-only outside
useradd -r -s /usr/sbin/nologin mistralrs
mkdir -p /srv/mistralrs/workspace
chown mistralrs:mistralrs /srv/mistralrs/workspace
# systemd unit hardening fragment
# [Service]
# User=mistralrs
# ProtectSystem=strict
# ProtectHome=true
# ReadWritePaths=/srv/mistralrs/workspace
# PrivateTmp=true
# NoNewPrivileges=true
# RestrictSUIDSGID=true
# SystemCallFilter=~@mount
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

