Skip to main content
Vulnerability Database/CVE-2026-108939

CVE-2026-108939: mistral.rs SSRF Vulnerability

CVE-2026-108939 is a server-side request forgery flaw in mistral.rs that allows attackers to manipulate IP validation and forge requests. This post explains its impact, affected versions, and mitigation steps.

Published:

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-108939 Overview

CVE-2026-108939 is a Server-Side Request Forgery (SSRF) vulnerability [CWE-918] in EricLBuehler mistral.rs versions up to and including 0.9.3. The flaw resides in the is_global_ip function within mistralrs-server-core/src/media_source.rs. An attacker can manipulate the ip argument to bypass the global IP check and force the server to issue requests to internal network resources. The issue is exploitable remotely without authentication, and the exploit has been publicly disclosed. The project maintainer released a fix in version 0.9.4 via commit cfb8c6a0c42361dc4579a9110b54d339c255b9fd.

Critical Impact

Remote, unauthenticated attackers can coerce the mistral.rs media source handler into fetching internal network resources via IPv6 transition addresses, enabling SSRF against metadata services and internal APIs.

Affected Products

  • EricLBuehler mistral.rs versions up to and including 0.9.3
  • mistralrs-server-core component (media source handler)
  • Fixed in: mistral.rs version 0.9.4

Discovery Timeline

  • 2026-10-13 - CVE-2026-108939 published to NVD
  • 2026-10-15 - Last updated in NVD database
  • Patch commit - cfb8c6a0c42361dc4579a9110b54d339c255b9fd merged via Pull Request #2446
  • Fixed release - mistral.rs v0.9.4

Technical Details for CVE-2026-108939

Vulnerability Analysis

The mistral.rs server exposes a media source handler that fetches remote content for model input. To prevent requests to internal infrastructure, it calls is_global_ip to validate the destination address. The pre-patch implementation handled IPv4-mapped IPv6 addresses (::ffff:a.b.c.d) correctly but failed to normalize other IPv6 transition formats. As a result, addresses in the 6to4 range (2002::/16), the NAT64 well-known prefix (64:ff9b::/96), and IPv4-compatible IPv6 addresses were evaluated as regular IPv6 addresses rather than by their embedded IPv4 value. An attacker could supply such an address to reach an internal IPv4 destination while passing the global check.

Root Cause

The root cause is incomplete validation of IPv6 transition address formats. The original is_global_ip only consulted to_ipv4_mapped before falling through to is_global_ipv6. The function did not extract the embedded IPv4 address from 6to4 (2002:HHHH:LLLL::), NAT64 (64:ff9b::HHHH:LLLL), or IPv4-compatible (::HHHH:LLLL) encodings. The is_global_ipv6 routine then returned true for addresses whose underlying IPv4 target was actually private, loopback, or link-local, bypassing the SSRF guard.

Attack Vector

An unauthenticated remote attacker submits a media URL referencing a crafted IPv6 transition address. The server resolves and connects to the embedded IPv4 destination, which may be a cloud metadata endpoint (169.254.169.254), an internal API, or a loopback service. For example, encoding 127.0.0.1 as the 6to4 address 2002:7f00:0001:: or as the NAT64 address 64:ff9b::7f00:1 bypasses the pre-patch filter.

rust
// Patch diff from mistralrs-server-core/src/media_source.rs
 fn is_global_ip(ip: IpAddr) -> bool {
     match ip {
         IpAddr::V4(ip) => is_global_ipv4(ip),
-        IpAddr::V6(ip) => {
-            if let Some(ip) = ip.to_ipv4_mapped() {
-                return is_global_ipv4(ip);
-            }
-            is_global_ipv6(ip)
-        }
+        IpAddr::V6(ip) => match embedded_ipv4(ip) {
+            Some(ip) => is_global_ipv4(ip),
+            None => is_global_ipv6(ip),
+        },
+    }
+}
+
+// mapped, IPv4-compatible, NAT64 and 6to4 addresses reach the embedded IPv4, so judge them by it
+fn embedded_ipv4(ip: Ipv6Addr) -> Option<Ipv4Addr> {
+    if let Some(ip) = ip.to_ipv4_mapped() {
+        return Some(ip);
+    }
+    let join = |hi: u16, lo: u16| Ipv4Addr::from((u32::from(hi) << 16) | u32::from(lo));
+    match ip.segments() {
+        [0x2002, hi, lo, ..] => Some(join(hi, lo)),
+        [0x0064, 0xff9b, 0, 0, 0, 0, hi, lo] | [0, 0, 0, 0, 0, 0, hi, lo] => Some(join(hi, lo)),
+        _ => None,
     }
 }

Source: GitHub Commit cfb8c6a0c

Detection Methods for CVE-2026-108939

Indicators of Compromise

  • Outbound connections from the mistral.rs server to RFC1918 ranges, loopback (127.0.0.0/8), or link-local (169.254.0.0/16) addresses
  • HTTP request logs containing media URLs with IPv6 literals in the 2002::/16, 64:ff9b::/96, or ::0:0:HHHH:LLLL ranges
  • Unexpected access attempts to cloud instance metadata endpoints (169.254.169.254, fd00:ec2::254) originating from the server process

Detection Strategies

  • Inspect reverse-proxy and WAF logs for user-supplied media URLs containing IPv6 transition prefixes (2002:, 64:ff9b:, ::ffff:, ::0:0:)
  • Correlate inbound API calls to mistral.rs endpoints that accept media URLs with subsequent outbound connections from the server to private address space
  • Audit DNS resolution logs for hostnames resolving to IPv6 transition addresses that embed internal IPv4 targets

Monitoring Recommendations

  • Enable egress firewall logging on hosts running mistral.rs and alert on connections to metadata services and internal subnets
  • Monitor the mistral.rs process for anomalous outbound TCP flows that do not match expected model-serving traffic
  • Track installed versions of mistral.rs across inference infrastructure and flag any host still running 0.9.3 or earlier

How to Mitigate CVE-2026-108939

Immediate Actions Required

  • Upgrade mistral.rs to version 0.9.4 or later, which includes commit cfb8c6a0c42361dc4579a9110b54d339c255b9fd
  • Place the mistral.rs server behind an egress proxy that denies outbound traffic to RFC1918, loopback, link-local, and cloud metadata ranges
  • Review access logs for prior requests containing IPv6 transition address literals and assess whether internal endpoints were reached

Patch Information

The fix adds an embedded_ipv4 helper that extracts IPv4 addresses from IPv4-mapped, IPv4-compatible, 6to4, and NAT64 IPv6 encodings. is_global_ip then evaluates the embedded IPv4 address through is_global_ipv4 whenever present. The patch is available in the v0.9.4 release and in Pull Request #2446.

Workarounds

  • Restrict the mistral.rs media source handler to a hostname allowlist enforced before the request reaches the server
  • Block outbound connections from the inference host to private IPv4 ranges and the IPv6 transition prefixes 2002::/16 and 64:ff9b::/96 at the network layer
  • Disable the media source feature or run the server in a network namespace with no route to internal infrastructure if an upgrade cannot be deployed immediately
bash
# Upgrade mistral.rs to the patched release
cargo install mistralrs-server --version 0.9.4 --force

# Example iptables egress restriction for the service user
iptables -A OUTPUT -m owner --uid-owner mistralrs -d 10.0.0.0/8 -j REJECT
iptables -A OUTPUT -m owner --uid-owner mistralrs -d 172.16.0.0/12 -j REJECT
iptables -A OUTPUT -m owner --uid-owner mistralrs -d 192.168.0.0/16 -j REJECT
iptables -A OUTPUT -m owner --uid-owner mistralrs -d 169.254.0.0/16 -j REJECT
iptables -A OUTPUT -m owner --uid-owner mistralrs -d 127.0.0.0/8 -j REJECT

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.