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

CVE-2026-102810: Marmite Path Traversal Vulnerability

CVE-2026-102810 is a path traversal flaw in Marmite through version 0.4.2 that enables unauthenticated attackers to read arbitrary files via the development server. This post covers technical details, affected versions, and mitigation.

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

CVE-2026-102810 is a path traversal vulnerability [CWE-22] affecting the Marmite static site generator through version 0.4.2. The flaw resides in the built-in development server started with the --serve flag. The handle_request function in src/server.rs fails to reject .. segments after percent-decoding and joining the request path to the output folder. Unauthenticated remote attackers can send encoded traversal sequences to read arbitrary files readable by the marmite process. The impact is compounded because the development server binds to 0.0.0.0:8000 by default, exposing it on all network interfaces.

Critical Impact

Unauthenticated attackers with network access to the Marmite development server can read arbitrary files accessible to the marmite process user, including source code, configuration files, and credentials.

Affected Products

  • Marmite static site generator versions through 0.4.2
  • Deployments running the built-in development server via --serve
  • Instances using the default 0.0.0.0:8000 bind address

Discovery Timeline

  • 2026-09-29 - CVE-2026-102810 published to NVD
  • 2026-09-29 - Last updated in NVD database

Technical Details for CVE-2026-102810

Vulnerability Analysis

Marmite is a Rust-based static site generator that ships with an optional HTTP server for local development. When invoked with --serve, the process opens a listener and serves generated content from the configured output folder. The handle_request function in src/server.rs receives the request path, applies percent-decoding, and joins the decoded segment to the output directory before reading the file from disk.

The function does not normalize the resulting path or reject .. components that appear after decoding. An attacker can therefore send a URL such as /%2e%2e/%2e%2e/etc/passwd and escape the output directory. Because the default bind address was 0.0.0.0:8000, any host reachable on the network could query the server without authentication.

Root Cause

The root cause is missing canonicalization of user-controlled path input. The server treats the decoded request path as a trusted relative fragment and passes it directly to filesystem operations. There is no check that the resolved absolute path remains within the configured output folder, which is the standard mitigation pattern for path traversal [CWE-22].

Attack Vector

Exploitation requires only network access to the running development server. The attacker issues an HTTP GET request containing percent-encoded traversal sequences. The marmite process reads the target file and returns its contents in the HTTP response. Any file readable by the process user, including SSH keys, environment files, and application source, is exposed.

rust
// Security patch in src/cli.rs (commit 303a0bf)
// Default bind address changed from all interfaces to loopback

    #[arg(long, short)]
    pub watch: bool,

-   /// Serve the site with a built-in HTTP server
+   /// Serve the site with a development-only HTTP server (not for production)
    #[arg(long)]
    pub serve: bool,

    /// Address to bind the server
-   #[arg(long, default_value = "0.0.0.0:8000", requires = "serve")]
+   #[arg(long, default_value = "127.0.0.1:8000", requires = "serve")]
    pub bind: String,

Source: GitHub Commit 303a0bf

rust
// Security patch header added to src/server.rs (commit 303a0bf)
+//! Development-only preview server and editor API, not for production deployments.

 use chrono::Utc;
 use log::{error, info, warn};
 use serde_json::json;
 use std::fmt::Write as _;
 use std::io::{Cursor, ErrorKind};
+use std::net::ToSocketAddrs;
 use std::path::PathBuf;

Source: GitHub Commit 303a0bf

Detection Methods for CVE-2026-102810

Indicators of Compromise

  • HTTP request logs on port 8000 (or the configured Marmite port) containing percent-encoded .. sequences such as %2e%2e%2f, %2e%2e/, or ..%2f
  • Marmite process access to files outside the configured output directory, particularly /etc/passwd, SSH keys, or environment files
  • Unexpected inbound connections from external hosts to a workstation or CI runner running marmite --serve

Detection Strategies

  • Inspect web server and reverse-proxy logs for traversal patterns targeting the marmite listener
  • Use endpoint file-access telemetry to alert when the marmite binary opens files outside the intended site output folder
  • Search for marmite processes bound to non-loopback interfaces using ss -ltnp or netstat output collected from developer and build hosts

Monitoring Recommendations

  • Alert on marmite invocations that include --bind 0.0.0.0 or omit an explicit loopback bind
  • Monitor for outbound reads of sensitive filesystem paths correlated with marmite process ancestry
  • Track deployment of Marmite versions at or below 0.4.2 across developer laptops and CI infrastructure

How to Mitigate CVE-2026-102810

Immediate Actions Required

  • Upgrade Marmite to a version that includes commit 303a0bf2fff4302f4164c0c39932fdffc6683ad4 or later
  • Stop any running marmite --serve instances that are exposed on non-loopback interfaces until patched
  • Audit developer and CI hosts for Marmite installations at version 0.4.2 or earlier

Patch Information

The fix is delivered in commit 303a0bf2fff4302f4164c0c39932fdffc6683ad4, which changes the default bind address from 0.0.0.0:8000 to 127.0.0.1:8000 and marks the server as development-only. Review the upstream commit, GitHub issue #554, and the VulnCheck advisory for full remediation details.

Workarounds

  • Explicitly bind the development server to loopback with --bind 127.0.0.1:8000
  • Restrict network access to the marmite port using host firewall rules such as iptables or ufw
  • Never expose the --serve mode to untrusted networks; use a production-grade static file server for deployed sites
bash
# Bind Marmite's development server to loopback only
marmite --serve --bind 127.0.0.1:8000

# Restrict inbound access to the marmite port with ufw
sudo ufw deny 8000/tcp
sudo ufw allow from 127.0.0.1 to any port 8000 proto tcp

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.