Jul 30, 2026·8 min read·13 visits
The matrix-commander CLI tool is cryptographically unsafe due to legacy dependencies on the deprecated libolm library, which contains timing side-channels and protocol confusion vulnerabilities. Users must migrate to the Rust alternative or upgrade downstream dependencies to use vodozemac.
GHSA-WCHH-9X6H-7F6P documents the critical deprecation of the cryptographic library libolm (Olm) and its Python binding wrapper python-olm, which matrix-commander depended upon via its downstream client library matrix-nio. Multiple cryptographic vulnerabilities (timing leaks, side-channels, signature malleability, and protocol confusion) were disclosed in 2022 and 2024. Because libolm is unmaintained, Python clients using matrix-commander are considered cryptographically unsafe until migrating to vodozemac.
The PyPI package matrix-commander is a command-line interface client designed for the Matrix chat protocol. Historically, the cryptographic security of its End-to-End Encryption (E2EE) layer depended on matrix-nio, a Python SDK that wraps python-olm. This wrapper acts as a direct interface to libolm, the original C implementation of the Olm and Megolm cryptographic protocols. As a result, any vulnerability residing within libolm or its bindings directly degrades the security posture of matrix-commander.
Over several years, security evaluations uncovered structural and implementation-level cryptographic weaknesses in libolm. In 2022, researchers disclosed CVE-2022-39255, a protocol confusion vulnerability in Olm and Megolm. In 2024, a subsequent comprehensive review disclosed CVE-2024-45193, exposing timing side-channels, base64 timing leaks, and Ed25519 signature malleability. Because the Matrix Foundation has deprecated libolm in favor of newer Rust-based implementations, these vulnerabilities will remain unpatched in the C codebase, leaving legacy clients permanently exposed.
This deprecation advisory, cataloged under GHSA-WCHH-9X6H-7F6P, highlights that Python-based implementations using the legacy libolm engine are structurally insecure. Furthermore, modern development environments struggle to compile the unmaintained python-olm package due to legacy CMake requirements, leading to severe build failures. The only viable path forward for the ecosystem involves migrating to vodozemac, a modern, memory-safe, constant-time cryptographic library implemented in Rust.
The root cause of this security degradation stems from multiple distinct vulnerabilities in libolm that cumulative maintenance cannot address. First, the AES decryption routines inside libolm are not implemented in constant-time. Because of this, hardware cache behaviors and execution latency vary predictably based on the secret key and the ciphertext being processed. An attacker capable of measuring these sub-millisecond differences can extract key material or reconstruct plaintext fragments through a timing side-channel attack.
Second, the Ed25519 signature verification engine within libolm fails to enforce strict compliance with the format specifications defined in RFC 8032. The parser does not validate whether the signature elements are properly reduced modulo the group order. This lax validation allows for signature malleability, where an attacker can modify a valid signature into another valid-looking signature without possessing the private key. In decentralized protocols like Matrix, signature malleability can undermine non-repudiation and authentication baselines.
Third, libolm exhibits timing leaks during the decoding of base64-encoded ciphertexts. Because the decoding functions process input bytes using non-constant-time branching logic, the execution time varies based on the values of the encoded payload. Finally, the protocol confusion vulnerability (CVE-2022-39255) occurs because the engine does not strictly bind the sender's Olm session keys to the corresponding Megolm session and the specific Room ID. This logical oversight allows a compromised Matrix homeserver to redirect a message from one encrypted room to another without triggering decryption failures on the target client.
To resolve these weaknesses, the upstream library matrix-nio implemented a total migration from python-olm to vodozemac in Commit 71a1c808bc2ae6ea2a6e8effa7c11bd09796c626. This migration involved deleting the legacy python-olm dependency and modifying the low-level cryptographic handlers. In pyproject.toml, the legacy package is replaced:
@@ -29,7 +29,7 @@ e2e = [
"atomicwrites~=1.4",
"cachetools~=5.3",
"peewee~=3.14",
- "python-olm~=3.2",
+ "vodozemac~=0.9",
]This change completely removes the reliance on the unmaintained C library and resolves modern compiler compatibility issues.
The core of the change lies in src/nio/crypto/olm_machine.py. The patch substitutes the insecure signature verification routine of libolm with the constant-time, memory-safe Rust wrapper provided by vodozemac:
@@ -1855,9 +1861,12 @@ def verify_json(self, json, user_key, user_id, device_id):
unsigned = json.pop("unsigned", None)
try:
- olm.ed25519_verify(user_key, Api.to_canonical_json(json), signature_base64)
+ user_key = vodozemac.Ed25519PublicKey.from_base64(user_key)
+ signature = vodozemac.Ed25519Signature.from_base64(signature_base64)
+ message = Api.to_canonical_json(json).encode()
+ user_key.verify_signature(message, signature)
success = True
- except olm.utility.OlmVerifyError:
+ except vodozemac.SignatureException:
success = FalseBy utilizing vodozemac.Ed25519PublicKey.from_base64, the library enforces strict cryptographic parsing rules, which eliminates the signature malleability vulnerability.
Additionally, session persistence logic in src/nio/crypto/sessions.py was rewritten to handle backward compatibility. Because legacy client databases store session states as pickled C-structures, matrix-nio developed a transition mechanism that reads legacy pickles and upgrades them to the new binary format:
+ @classmethod
+ def from_pickle(
+ cls,
+ pickle: bytes,
+ creation_time: datetime,
+ passphrase: str = "",
+ use_time: Optional[datetime] = None,
+ ) -> Session:
+ upgrade_pickle = False
+ try:
+ pickle_key = derive_pickle_key(passphrase)
+ _session = vodozemac.Session.from_pickle(pickle.decode(), pickle_key)
+ except vodozemac.PickleException:
+ pickle_key = passphrase.encode()
+ _session = vodozemac.Session.from_libolm_pickle(pickle.decode(), pickle_key)
+ upgrade_pickle = TrueThis migration logic detects when a database record contains a libolm pickled session, decrypts it using the old format, and then marks the session for re-serialization using vodozemac. This prevents data loss for existing users while upgrading them to a secure state.
Exploitation of the timing side-channels in libolm (CVE-2024-45193) requires precise execution measurement. An attacker sharing a physical host or positioned on an adjacent network could send crafted ciphertext payloads to the client and measure the exact timing response of the decryption process. Over thousands of measurements, statistical analysis can isolate the cache hit/miss latency differences of the non-constant-time AES engine. This allows the attacker to reconstruct the private keys, compromising all past and future encrypted communication for that session.
For the protocol confusion vulnerability (CVE-2022-39255), the threat model assumes a compromised or malicious Matrix homeserver. Because the protocol engine fails to bind session identity keys with specific room identifiers, the homeserver can perform a replay or redirection attack. When an authorized user transmits an encrypted message, the homeserver intercepts the ciphertext and forwards it to a different room. The receiving client decrypts the message, falsely assuming the message was intended for the current room context, which breaks the confidentiality boundaries of the system.
These exploitation vectors do not require user interaction beyond the normal sending and receiving of messages. However, they are highly dependent on the attacker's ability to monitor execution times or control the intermediate server. While weaponized, fully automated exploits are not publicly distributed in the wild, the theoretical viability of these attacks is well-documented in academic cryptographic research, making the deprecation of libolm a high priority for secure deployments.
The impact of this deprecation extends across both security and operational categories. From a security perspective, continuing to use matrix-commander with legacy dependencies exposes users to potential decryption key recovery and unauthorized message disclosure. In secure environments where Matrix is deployed for confidential communication, these vulnerabilities undermine the end-to-end encryption guarantees, reducing the protocol's security to that of standard transport-layer encryption.
From an operational perspective, the unmaintained status of libolm and its Python bindings introduces severe build failures on modern operating systems. For example, as detailed in matrix-commander Issue #204, attempts to install the package under newer python environments fail during the compilation of python-olm. This is due to modern CMake versions removing compatibility with older configuration structures, causing the build pipeline to halt with compilation errors. This effectively prevents automated deployments, upgrades, and normal installation procedures for new users.
Furthermore, a review of the patch implementation reveals potential integration risks. In matrix-nio's migration code, explicit assertion statements were added to the decrypt_megolm_event function, such as assert event.sender_key and assert event.session_id. If a malicious or misconfigured homeserver transmits an envelope that lacks these specific fields, the client code will trigger an uncaught AssertionError. Rather than handling this gracefully as a standard decryption error, the program will terminate abruptly, presenting a potential client-side Denial of Service (DoS) vulnerability.
Remediation of these security risks requires a complete departure from the legacy libolm engine. Because matrix-commander is heavily coupled to its underlying dependencies, users of the Python CLI implementation should transition to the Rust alternative, matrix-commander-rs, located at https://github.com/8go/matrix-commander-rs. The Rust-based client leverages memory-safe, constant-time cryptographic libraries by default, eliminating the compilation blockers and cryptographic vulnerabilities associated with the legacy Python dependencies.
If transitioning to the Rust alternative is not immediately feasible, administrators must ensure that the downstream matrix-nio package is updated to a version that includes the PR #555 merge. This pull request replaces the legacy python-olm module with vodozemac. To apply this fix in existing environments, developers should modify their dependency lock files to pin matrix-nio to the patched release containing commit 71a1c808bc2ae6ea2a6e8effa7c11bd09796c626, and verify that vodozemac >= 0.9 is successfully installed in place of python-olm.
Organizations should also implement defensive controls at the host level. Since the timing attacks rely on precision latency measurements, isolating the client within a sandboxed virtual container can reduce the accuracy of local cache timing attacks. Furthermore, regular session rotation policies can mitigate the impact of potential key leakage, ensuring that even if an attacker recovers a temporal session key, the historical and future message streams remain protected.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
matrix-commander 8go | <= 8.0.6 | Migration to matrix-commander-rs |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-327 (Use of a Broken or Risky Cryptographic Algorithm) |
| Attack Vector | Network / Local Side-Channel / Compromised Homeserver |
| CVSS | 5.9 (Medium) / 4.3 (Medium) |
| EPSS | N/A (Deprecation Advisory) |
| Impact | Information Disclosure / Message Redirection / Build Failures |
| Exploit Status | No active public weaponized exploits (Theoretical PoC) |
| KEV Status | Not Listed |
The product uses a broken or risky cryptographic algorithm or implementation, which can compromise the confidentiality, integrity, or authenticity of communications.
WWBN AVideo versions through 29.0 contain an OS command injection vulnerability (CWE-78) in the standalone API utility function listFFmpegProcesses(). The function constructs a shell pipeline to monitor active FFmpeg processes by interpolating a user-controlled keyword parameter directly into a single-quoted grep argument without sanitization or shell escaping. An attacker capable of crafting or submitting a valid encrypted codeToExec payload can break out of the single-quoted argument context and execute arbitrary operating system commands with the privileges of the web server user.
Ruflo versions prior to 3.16.3 expose the Model Context Protocol (MCP) bridge HTTP endpoints (`POST /mcp` and `POST /mcp/:group`) on all network interfaces (`0.0.0.0:3001`) without authentication. Because the primary JSON-RPC tool dispatcher (`executeTool()`) bypasses existing tool blocklists, an unauthenticated network attacker can invoke the `terminal_execute` tool to achieve arbitrary command execution inside the bridge container. This initial access permits full exfiltration of third-party LLM provider API keys, unauthorized access to the co-located MongoDB instance, and manipulation of the AgentDB learning store.
In etcd versions prior to 3.5.32 and 3.6.13, configuring the server with --listen-client-http-urls decouples HTTP and gRPC traffic onto distinct network listeners. Due to an implementation flaw in how TLS configurations are passed to the gRPC server instance, the Certificate Revocation List (CRL) defined by --client-crl-file is enforced exclusively on the HTTP listener and omitted entirely on the dedicated gRPC listener. This allows an adversary possessing a revoked, CA-signed client certificate to bypass mutual TLS (mTLS) revocation checks and authenticate directly to the gRPC interface.
GitHub CLI (gh) versions 2.10.0 through 2.95.0 contain an input validation vulnerability in the `gh codespace jupyter` command path. When connecting to a remote Codespace to launch a JupyterLab session, the CLI retrieves a server URL via a remote procedure call (RPC) and passes it directly to the host operating system's default URL dispatcher without validating the scheme or target host. A compromised or malicious Codespace can return a custom protocol URI, such as `vscode://` or `vscode-insiders://`, allowing an attacker to invoke local desktop application handlers and achieve arbitrary command execution on the developer's workstation.
A path traversal vulnerability exists in the cakephp/twig-view plugin for the CakePHP framework prior to versions 1.3.3 and 2.1.2. The Cake\TwigView\Twig\FileLoader::findTemplate() method verifies template existence using PHP's native file_exists() function without ensuring the target path resides within configured application or plugin template directories. When user-controlled input is passed to template inclusion mechanisms, an unauthenticated remote attacker can read arbitrary local files accessible to the PHP runtime.
CVE-2026-64855 (GHSA-859w-52fx-hcm6) is a cryptographic signature verification and authentication bypass vulnerability in the soapbar Python library prior to version 0.13.0. In vulnerable versions, the verify_envelope_bsp() function derives its trust anchor directly from the incoming SOAP message by extracting an untrusted X.509 certificate embedded inside the wsse:BinarySecurityToken header. Because the function checks only the temporal validity of the extracted certificate without performing Certificate Authority (CA) chain validation or certificate pinning, an unauthenticated network attacker can generate a self-signed certificate, sign an arbitrary SOAP payload, and pass verification.