Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-23217

CVE-2025-23217: mitmweb Proxy RCE Vulnerability

CVE-2025-23217 is a remote code execution vulnerability in mitmweb that allows malicious clients to exploit SSRF-style access through the proxy server. This article covers technical details, affected versions, and mitigation.

Updated:

CVE-2025-23217 Overview

CVE-2025-23217 affects mitmweb, the web-based interface for mitmproxy, an interactive TLS-capable intercepting HTTP proxy. The flaw lets a malicious client use mitmweb's proxy server, bound by default to *:8080, to reach mitmweb's internal API bound to 127.0.0.1:8081. While the API is not directly accessible from the network, attackers can pivot through the proxy to invoke it. This Server-Side Request Forgery (SSRF) condition can be escalated to remote code execution. The mitmproxy and mitmdump command-line tools are not affected. The vulnerability is fixed in mitmproxy 11.1.2.

Critical Impact

A network-reachable attacker who can use mitmweb as a proxy may escalate SSRF access to the internal API into remote code execution on the host running mitmweb.

Affected Products

  • mitmproxy mitmweb versions 11.1.1 and below
  • mitmproxy mitmweb 11.x release series prior to 11.1.2
  • Note: mitmproxy and mitmdump command-line tools are unaffected

Discovery Timeline

  • 2025-02-06 - mitmproxy 11.1.2 released with the fix per the project changelog
  • 2025-02-06 - CVE-2025-23217 published to NVD
  • 2026-04-15 - Last updated in NVD database

Technical Details for CVE-2025-23217

Vulnerability Analysis

mitmweb runs two listeners by default: the intercepting proxy on *:8080 and an internal management API on 127.0.0.1:8081. The API binding to loopback is intended to enforce an authentication boundary, since only local users should reach it. The proxy listener, however, forwards arbitrary client requests, including requests targeted at 127.0.0.1:8081. A remote client that connects to the proxy can therefore relay HTTP requests into the internal API, bypassing the implicit trust boundary. This pattern is classified as Authentication Bypass Using an Alternate Path or Channel [CWE-288]. Because the internal API exposes functionality that controls mitmweb behavior, including options that influence script and addon execution, attackers can escalate the SSRF condition into remote code execution on the host.

Root Cause

The proxy component does not refuse or filter requests whose destination is mitmweb's own loopback API. The loopback bind on the API listener was the sole control protecting privileged functionality, and the proxy provides an alternate channel that defeats that control.

Attack Vector

Exploitation requires network reachability to the mitmweb proxy port. The attacker directs HTTP requests through the proxy targeting 127.0.0.1:8081, which causes mitmweb to deliver those requests to its own API. No credentials are required because the API trusts loopback origins. Refer to the GitHub Security Advisory GHSA-wg33-5h85-7q5p and the Wikipedia Article on SSRF for background on the attack class.

// No verified exploit code is published. See the upstream advisory for technical details.

Detection Methods for CVE-2025-23217

Indicators of Compromise

  • Proxy access logs showing client requests with a destination host of 127.0.0.1 or localhost on port 8081
  • Unexpected mitmweb API calls originating from the proxy process rather than a local browser session
  • New or modified mitmproxy options, scripts, or addons applied without administrator action
  • Outbound child processes spawned by the mitmweb process shortly after external proxy connections

Detection Strategies

  • Inspect mitmweb logs for proxied flows whose request URL targets the loopback API port 8081
  • Alert on any process executions parented by mitmweb that are not standard interpreter or browser launches
  • Compare installed mitmproxy versions against the fixed release 11.1.2 across developer and CI hosts

Monitoring Recommendations

  • Capture network telemetry for hosts running mitmweb and flag inbound connections to TCP 8080 from non-trusted networks
  • Forward mitmweb and host process telemetry into a centralized analytics pipeline for retroactive hunting against the indicators above
  • Track the GitHub Changelog for mitmproxy for subsequent advisories affecting the same component

How to Mitigate CVE-2025-23217

Immediate Actions Required

  • Upgrade mitmproxy to version 11.1.2 or later on every host running mitmweb
  • Restrict mitmweb's proxy listener to trusted interfaces or networks instead of binding to *:8080
  • Audit mitmweb deployments exposed to untrusted networks for evidence of API abuse before patching

Patch Information

The issue is fixed in mitmproxy 11.1.2, released on 06 February 2025. The maintainers state there are no known workarounds, so upgrading is the required remediation. Release notes are available in the GitHub Changelog for mitmproxy.

Workarounds

  • No workarounds are provided by the maintainers; upgrading to 11.1.2 or later is required
  • As a compensating control until patching, bind the proxy listener to a non-routable interface and place mitmweb behind network access controls
bash
# Upgrade mitmproxy to the fixed release
pip install --upgrade 'mitmproxy>=11.1.2'

# Verify the installed version
mitmweb --version

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

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.