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

CVE-2025-32788: OctoPrint Auth Bypass Vulnerability

CVE-2025-32788 is an authentication bypass flaw in OctoPrint that allows attackers to access frontend pages without proper login. 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-2025-32788 Overview

OctoPrint is a widely deployed web interface for controlling consumer 3D printers. CVE-2025-32788 is an authentication bypass vulnerability [CWE-290] affecting OctoPrint versions up to and including 1.10.3. An attacker on an adjacent network can bypass the login redirect and directly access the rendered HTML of certain frontend pages by manipulating the X-Preemptive-Recording request header. The vulnerable internal functions could be relied upon incorrectly for authentication checks in future code changes, expanding the security impact. The issue was patched in OctoPrint 1.11.0.

Critical Impact

Adjacent-network attackers can bypass OctoPrint's login redirect and retrieve rendered frontend HTML from affected instances without authentication.

Affected Products

  • OctoPrint versions up to and including 1.10.3
  • Fixed in OctoPrint 1.11.0
  • Package identifier: octoprint:octoprint

Discovery Timeline

  • 2025-04-22 - CVE-2025-32788 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-32788

Vulnerability Analysis

OctoPrint uses a preemptive caching mechanism that renders pages ahead of time to improve responsiveness. The rendering path is triggered by an X-Preemptive-Recording HTTP header, which signals the server that the current request is an internal cache-warming render rather than a real user request. The authentication logic in OctoPrint's server utilities treats requests carrying this header as trusted rendering requests and skips the standard login redirect. Because the header is client-controllable, any attacker able to reach the OctoPrint web interface can supply the header value and obtain the rendered HTML of protected frontend pages. The vulnerability sits in shared internal helpers, so any future code path that reuses these helpers for access decisions would inherit the same bypass.

Root Cause

The root cause is trust in a client-supplied HTTP header for an internal control decision. In src/octoprint/server/util/__init__.py, the login redirect logic checked _flask.request.headers.get("X-Preemptive-Recording", "no") to determine whether the request originated from the internal cache renderer. Because HTTP headers are attacker-controlled, this check does not authenticate the caller and is unsuitable as an authentication signal.

Attack Vector

Exploitation requires network reachability to the OctoPrint web interface, typically on a local or adjacent network segment. An attacker sends an HTTP request to a protected frontend page and includes the X-Preemptive-Recording: yes header. The server bypasses the login redirect and returns the rendered HTML content. No user interaction or credentials are required.

python
# Patch: src/octoprint/server/util/__init__.py
# Replace client-controllable header check with a server-side
# Flask request-context flag that cannot be set by remote clients.

    "user_id": current_user.get_id(),
}
if (
-    _flask.request.headers.get("X-Preemptive-Recording", "no") == "no"
+    not _flask.g.get("preemptive_recording_active", False)
    and userManager.has_been_customized()
):
    if not credentials_checked_recently():

# Source: https://github.com/OctoPrint/OctoPrint/commit/41ff431014edfa18ca1a01897b10463934dc7fc2

The corresponding change in src/octoprint/server/__init__.py removes the header injection from the internal cache renderer and instead uses a Flask request context with server-only globals:

python
# Patch: src/octoprint/server/__init__.py
-headers = kwargs.get("headers", {})
-headers["X-Force-View"] = plugin if plugin else "_default"
-headers["X-Preemptive-Recording"] = "yes"
-kwargs["headers"] = headers
-
 builder = EnvironBuilder(**kwargs)
-app(builder.get_environ(), lambda *a, **kw: None)
+environ = builder.get_environ()
+with app.request_context(environ):
+    g.preemptive_recording_active = True
+    g.preemptive_recording_view = plugin if plugin else "_default"
+    app.full_dispatch_request()

# Source: https://github.com/OctoPrint/OctoPrint/commit/41ff431014edfa18ca1a01897b10463934dc7fc2

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2025-32788

Indicators of Compromise

  • Inbound HTTP requests to the OctoPrint interface containing the X-Preemptive-Recording: yes header from clients other than the local server itself.
  • Requests including the X-Force-View header originating from remote clients.
  • Access log entries returning HTTP 200 with rendered HTML for authenticated frontend routes without a preceding login flow.

Detection Strategies

  • Inspect web server or reverse proxy logs for requests carrying X-Preemptive-Recording from non-loopback source addresses.
  • Correlate unauthenticated requests to OctoPrint frontend routes with successful HTML responses to identify bypass attempts.
  • Compare the installed OctoPrint version against 1.11.0 to identify vulnerable hosts on the network.

Monitoring Recommendations

  • Enable verbose HTTP logging on the reverse proxy fronting OctoPrint and retain request headers for at least 30 days.
  • Alert on any external client setting reserved internal headers such as X-Preemptive-Recording or X-Force-View.
  • Monitor for network scans targeting TCP 5000 or other OctoPrint listener ports on operational technology segments.

How to Mitigate CVE-2025-32788

Immediate Actions Required

  • Upgrade OctoPrint to version 1.11.0 or later on all managed 3D printer controllers.
  • Restrict network access to OctoPrint instances to trusted management VLANs only.
  • Place OctoPrint behind an authenticating reverse proxy where feasible.

Patch Information

The issue is fixed in OctoPrint 1.11.0. The upstream fix removes the client-controllable X-Preemptive-Recording header and replaces it with a server-side Flask request-context flag (g.preemptive_recording_active) that cannot be injected by remote clients. Review the GitHub Security Advisory GHSA-qw93-h6pf-226x and the upstream commit 41ff431 for full technical detail.

Workarounds

  • Configure the reverse proxy to strip X-Preemptive-Recording and X-Force-View headers from all inbound requests before they reach OctoPrint.
  • Enforce network segmentation so that only administrator workstations can reach the OctoPrint web interface.
  • Require VPN or mutual TLS access to the printer management network until patching is complete.
bash
# Example nginx snippet to strip attacker-controllable internal headers
# before proxying to OctoPrint
location / {
    proxy_set_header X-Preemptive-Recording "";
    proxy_set_header X-Force-View "";
    proxy_pass http://127.0.0.1:5000;
}

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.