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

CVE-2026-111385: Nezha Host Header Injection Vulnerability

CVE-2026-111385 is a host header injection flaw in Nezha that allows attackers to redirect file uploads or capture download tokens to exfiltrate files. 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-111385 Overview

CVE-2026-111385 is a host header injection vulnerability in Nezha, an open-source server monitoring and operations platform. The flaw affects versions 2.1.0 through 2.3.14 and resides in the mintTransferTool function. This function constructs fs.download_url and fs.upload_url transfer URLs directly from the unvalidated HTTP Host header. Attackers who can influence the Host header on a victim's Model Context Protocol (MCP) request can redirect file uploads to attacker-controlled infrastructure. They can also capture one-time download tokens and replay them to exfiltrate files. The weakness maps to CWE-601: URL Redirection to Untrusted Site.

Critical Impact

Attackers can redirect file transfers and replay captured one-time tokens to exfiltrate files from Nezha-managed hosts.

Affected Products

  • Nezha monitoring platform versions 2.1.0 through 2.3.14
  • Nezha MCP transfer tools (fs.download_url and fs.upload_url endpoints)
  • Fixed in Nezha version 2.3.15

Discovery Timeline

  • 2026-10-16 - CVE-2026-111385 published to NVD
  • 2026-10-21 - Last updated in NVD database

Technical Details for CVE-2026-111385

Vulnerability Analysis

The vulnerability resides in Nezha's mintTransferTool component, which builds absolute URLs for file transfer operations exposed through its MCP integration. The function reads the inbound Host header and concatenates it into the fs.download_url and fs.upload_url values returned to MCP clients. Because no allowlist or canonical hostname check is applied, any value in the Host header is treated as authoritative.

When an MCP client follows the attacker-crafted URL, it either uploads files to the attacker's endpoint or submits a short-lived download token to the attacker's server. The attacker can then replay the token against the legitimate Nezha instance to retrieve files intended only for the victim.

Root Cause

The root cause is unvalidated use of a client-controlled HTTP header to build server-authoritative URLs. Nezha did not pin transfer URLs to a configured base URL or validate the Host header against an allowlist, allowing header-smuggling or proxy-abuse scenarios to poison the generated links.

Attack Vector

Exploitation is network-based and requires an attacker to control or influence the Host header observed by Nezha for a victim's MCP request. This typically involves abusing an upstream proxy, DNS rebinding, or an intermediary that forwards attacker-chosen headers. The attack complexity is elevated because the attacker must coordinate header injection with an active victim MCP session.

See the GitHub Security Advisory GHSA-rj3w-jrj7-x7c3 and the VulnCheck Advisory for Nezha for additional technical context.

go
// Patch excerpt from cmd/dashboard/controller/fm.go
// Source: https://github.com/nezhahq/nezha/commit/36b742a7e9a81ed782363dd19efd77b7030fbd0f

// The official file-manager client uploads in 1 MiB WebSocket messages. Cap
// each complete message at that protocol boundary so gorilla/websocket cannot
// buffer an attacker-sized frame before the IO stream relay sees it.
const fileManagerWebSocketInputLimit int64 = 1024 * 1024

type websocketReadLimiter interface {
    SetReadLimit(limit int64)
}

func limitFileManagerWebSocketInput(conn websocketReadLimiter) {
    conn.SetReadLimit(fileManagerWebSocketInputLimit)
}

Detection Methods for CVE-2026-111385

Indicators of Compromise

  • MCP transfer responses containing fs.download_url or fs.upload_url values pointing to hostnames outside the organization's Nezha deployment.
  • Inbound HTTP requests to Nezha with Host headers that do not match the configured dashboard hostname.
  • Unexpected outbound uploads from Nezha agents to third-party domains following MCP activity.

Detection Strategies

  • Inspect reverse-proxy and web-server logs for Host header values that differ from the canonical Nezha dashboard FQDN.
  • Alert on MCP tool responses where generated URLs reference IP addresses, raw hostnames, or domains outside an approved allowlist.
  • Correlate issuance of one-time download tokens with the destination of subsequent token-redemption requests to spot token replay from unexpected clients.

Monitoring Recommendations

  • Enable verbose logging around the Nezha dashboard and MCP controller endpoints and ship logs to a central SIEM.
  • Monitor for repeated download or upload requests from a single external IP shortly after an MCP session completes.
  • Baseline the hostnames and user agents that interact with Nezha so deviations trigger investigation.

How to Mitigate CVE-2026-111385

Immediate Actions Required

  • Upgrade Nezha to version 2.3.15 or later, which hardens dashboard security boundaries and removes dependence on the client-supplied Host header.
  • Restrict access to the Nezha dashboard and MCP endpoints to trusted networks and authenticated administrators only.
  • Review recent MCP transfer activity for evidence of redirected uploads or token replay against unexpected hosts.

Patch Information

Fixes are available in the Nezha repository via commit 36b742a7 and commit c7269308. Both commits are included in release 2.3.15. Operators should upgrade rather than back-port individual patches to ensure the full set of hardening changes is applied.

Workarounds

  • Terminate TLS at a reverse proxy that overwrites or strictly validates the Host header before forwarding requests to Nezha.
  • Configure the upstream proxy with an explicit allowlist of acceptable Host values and reject non-matching requests.
  • Temporarily disable the MCP transfer tools until the upgrade to 2.3.15 can be deployed.
bash
# Example nginx configuration enforcing a canonical Host header
server {
    listen 443 ssl;
    server_name nezha.example.com;

    if ($host != "nezha.example.com") {
        return 421;
    }

    location / {
        proxy_set_header Host nezha.example.com;
        proxy_pass http://127.0.0.1:8008;
    }
}

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.