Jan 27, 2026·5 min read·42 visits
OctoPrint versions up to 1.11.5 used standard string comparison for API keys. This optimization leaks information about how much of the key is correct based on response time. An attacker on the LAN can exploit this to brute-force the API key and take full control of the printer.
A classic timing side-channel vulnerability in OctoPrint allows attackers on the local network to guess API keys character-by-character by measuring how long the server takes to say 'no'.
In the world of physical security, the quintessential image of a safecracker is a shadowy figure pressing a stethoscope against a cold steel door, listening for the faint click of a tumbler falling into place. In the digital world, we don't listen for clicks; we watch the clock.
OctoPrint, the beloved brain behind thousands of consumer 3D printers, recently found itself playing the role of that safe. CVE-2026-23892 isn't a buffer overflow or a SQL injection. It's a timing side-channel—a vulnerability that exists not because the logic is wrong, but because the code is too efficient for its own good.
By measuring the infinitesimal delay between sending a request and receiving a 403 Forbidden response, an attacker can reconstruct a valid API key one byte at a time. It’s the digital equivalent of guessing a password and having the guard hesitate slightly longer when you get the first letter right.
The root cause here is a fundamental concept in computer science: optimization. When you compare two strings in most high-level languages (like Python), the runtime wants to give you an answer as fast as possible. This is called fail-fast or short-circuit logic.
Here is how a standard string comparison (==) works under the hood:
False immediately.False immediately.False immediately.Do you see the problem? If the correct API key is SECRET, and I guess AAAAAA, the system checks S vs A, sees a mismatch, and rejects me instantly.
But if I guess SAAAAA, the system checks S vs S (match), moves to the next character, checks E vs A (mismatch), and then rejects me. That second check takes a few nanoseconds longer. In the vulnerable OctoPrint versions, this tiny discrepancy was measurable over a low-latency network (LAN).
The vulnerability lived in src/octoprint/access/users.py. The developers were using Python's standard equality operator to validate sensitive credentials. It looked something like this:
# The Vulnerable Logic
if apikey == user._apikey:
return userIt looks innocent, right? That's why these bugs are insidious. To fix it, you have to stop thinking like a developer optimizing for speed and start thinking like a cryptographer optimizing for constant time.
In patch 249fd80ab01bc4b7dabedff768230a0fb5d01a8c, the OctoPrint team switched to hmac.compare_digest. This function is designed to take the exact same amount of time to return False, regardless of whether the mismatch happens at the first character or the last.
# The Fix
import hmac
# ... inside the validation loop
if hmac.compare_digest(apikey, user._apikey):
return user> [!NOTE]
> Comedy of Errors: The initial fix actually introduced a regression. hmac.compare_digest throws a fit if you feed it None. Since some users might not have generated an API key yet (user._apikey is None), the server started crashing. They had to push a follow-up commit (0bd35ddcf316668f9ba5335afbb4c07b4b2ad408) to handle null checks explicitly before the timing-safe comparison.
Exploiting this isn't as simple as firing up a script and waiting 5 seconds. We are dealing with nanoseconds here. Network jitter, OS context switching, and background noise on the Raspberry Pi running OctoPrint will all drown out the signal.
To exploit this, we need statistics.
A..., 1,000 with B..., and so on.O... has a statistically significant higher average response time than the rest, we know O is the first character.OA..., OB..., OC....This is why the CVSS complexity is High (AC:H). You can't do this easily over the public internet (WAN) because the variance in internet routing latency is massive compared to the tiny CPU difference we are trying to measure. But on a quiet home network? It's open season.
So you spent hours brute-forcing an API key. What do you get?
Total Administrative Control.
With a valid API key, you bypass the login screen entirely. You can:
It transforms a helpful IoT device into a spy cam and a potential arsonist.
If you are running OctoPrint, update to 1.11.6 immediately. This version implements hmac.compare_digest() across the board for API key validation.
For Developers: Take note. Never use == for secrets, tokens, or hashes. If the value is sensitive, use a constant-time comparison function. In Python, that's hmac.compare_digest(). In PHP, it's hash_equals(). In Go, subtle.ConstantTimeCompare().
For Users: Treat your 3D printer like a server. Don't expose it to the internet without a VPN or a reverse proxy like Authelia. Even if the code is perfect, you don't want the entire internet knocking on your printer's front door.
CVSS:4.0/AV:A/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
OctoPrint OctoPrint | <= 1.11.5 | 1.11.6 |
| Attribute | Detail |
|---|---|
| CWE | CWE-208 (Observable Timing Discrepancy) |
| CVSS v4.0 | 6.0 (Medium) |
| Attack Vector | Adjacent (LAN) |
| Attack Complexity | High (Requires statistical analysis) |
| Impact | High (API Key Extraction) |
| Exploit Status | Theoretical / PoC Feasible |
The product performs a comparison that takes a variable amount of time depending on how many characters match, allowing an attacker to guess the value via timing discrepancies.
The cakephp/twig-view plugin integrates the Twig templating engine into the CakePHP framework. Prior to versions 1.3.3 and 2.1.2, the UtilsExtension class exposes PHP's native unserialize() function as a Twig filter without restricting allowed classes. When untrusted data is passed into the unserialize filter within a template, an attacker can trigger PHP Object Injection and execute Property-Oriented Programming (POP) gadget chains, leading to arbitrary code execution or data manipulation.
CVE-2026-63402 is a prototype-chain traversal and shared built-in object corruption vulnerability in the i18next internationalization framework for JavaScript prior to version 26.3.4. The flaw resides in the deepExtend utility function within src/utils.js, which uses the JavaScript 'in' operator to verify property existence on target objects. When an application passes untrusted resource bundles to i18next.addResourceBundle() with both the deep and overwrite parameters set to true, an attacker can traverse into inherited methods on Object.prototype and overwrite properties on shared built-in function objects, causing process-wide denial of service.
CVE-2026-58262 (tracked internally as KLR-04 and via GitHub Security Advisory GHSA-f9h7-4mmq-vgcq) is a cryptographic verification and consensus quorum bypass vulnerability in Klever-Go (`klever-io/klever-go`), the Go implementation of the Klever blockchain protocol. Prior to version 1.7.20, the block header signature verification logic (`HeaderSigVerifier.verifyConsensusSize`) counts all set bits across the entire `PubKeysBitmap` byte slice toward the required two-thirds validator quorum without masking or validating unused trailing padding bits in the final byte. Because the underlying Boneh-Lynn-Shacham (BLS) multi-signature verification function (`blsMultiSigner.Verify`) iterates strictly over the indices of configured validator public keys, it ignores any bits set at indices beyond the active consensus group size. When the consensus group size is not an exact multiple of 8, a compromised or malicious block producer can set these unused trailing padding bits to artificially inflate the apparent signer count by up to 7 signatures, enabling blocks with fewer genuine validator signatures than required by the protocol to pass consensus validation.
CVE-2026-77423 is a Regular Expression Denial of Service (ReDoS) vulnerability in the built-in less viewer of the JLine Java library (versions 3.0.0 prior to 3.30.15, and 4.0.0 prior to 4.3.1). The org.jline.builtins.Less class passes user-supplied search and display-filter patterns directly to Java's standard backtracking regular expression engine without complexity validation or execution timeouts. An attacker with access to an interactive JLine session can submit patterns containing nested quantifiers, causing catastrophic backtracking that consumes 100% of a CPU core and blocks the session thread indefinitely. In network-facing deployments such as SSH or Telnet administration consoles, repeated exploitation across concurrent sessions can exhaust bounded worker thread pools and result in a complete denial of service.
CVE-2026-63492 is a rejected CVE identifier originally assigned by GitHub for an OS command injection vulnerability in WWBN AVideo (formerly YouPHPTube) up to version 29.0. It was rejected as a duplicate of the canonical identifier CVE-2026-63304 (tracked under GHSA-j44m-77cc-p3cc). The flaw resides in the listFFmpegProcesses() function within plugin/API/standAlone/functions.php, which interpolates unsanitized user parameters directly into a single-quoted shell pipeline executed via PHP's exec() function. Attackers capable of crafting a valid AES-256-CBC encrypted API payload can break out of the single-quoted context and execute arbitrary operating system commands as the web-server user.
CVE-2026-63476 is an uncontrolled resource consumption vulnerability in isomorphic-git prior to version 1.38.6. When parsing Git packfile delta objects during clone or fetch operations, the applyDelta utility reads an untrusted targetSize integer from the delta stream header and passes it directly to Buffer.alloc(). A malicious remote Git server or man-in-the-middle attacker can supply a delta header specifying a targetSize of approximately 2 GB with minimal actual payload data. Because Buffer.alloc() reserves off-heap memory in Node.js, this bypasses standard V8 heap limits and results in immediate out-of-memory termination or sustained memory retention.