CVE-2026-127163 in pylxdinfo

Summary

by MITRE • 11/27/2026

Improper certificate validation in websocket connections in Canonical pylxd before 2.4.3 allows a network attacker to read command stdin and spoof command output via impersonating a remote LXD endpoint.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 11/27/2026

The vulnerability identified as improper certificate validation within the WebSocket implementation of Canonical's pylxd library prior to version 2.4.3 represents a critical failure in transport layer security enforcement. This flaw specifically affects the client-side handling of TLS certificates when establishing secure connections to remote LXD endpoints. In standard secure communication protocols, it is imperative that clients validate the server's certificate against trusted Certificate Authorities and verify that the certificate matches the intended hostname or IP address. However, in these earlier versions of pylxd, this validation process was either bypassed or implemented with insufficient rigor, allowing the client to accept certificates from any source without verifying their authenticity or ownership. This deficiency creates a fundamental breakdown in the trust model required for secure remote management of Linux containers and virtual machines via LXD.

From an operational perspective, this vulnerability enables a network attacker positioned within reach of the victim's connection path to perform a Man-in-the-Middle attack with significant consequences. By intercepting the WebSocket handshake or establishing a rogue endpoint that mimics the legitimate LXD server, an attacker can present a self-signed or otherwise untrusted certificate. Because pylxd fails to reject such certificates due to improper validation, it proceeds to establish an encrypted session under the false assumption of security. Once this fraudulent connection is established, all data transmitted between the client and the purported remote endpoint is effectively exposed to the attacker. The encryption provides no protection against eavesdropping because the keys are derived from a compromised or fake certificate authority context known to the adversary.

The specific impact described involves the ability for an attacker to read command standard input and spoof command output. This means that any administrative commands executed remotely through pylxd, such as container creation, configuration changes, or snapshot management, can be intercepted in plaintext despite appearing encrypted on the surface. Furthermore, the attacker possesses the capability to inject false responses into these communication streams. For instance, if an administrator queries the status of a container, the attacker could alter the response to indicate that a compromised state is healthy, thereby masking malicious activity from system administrators and security monitoring tools. This level of control allows for comprehensive surveillance of administrative actions and potential manipulation of infrastructure states without detection by standard logging mechanisms that rely on command execution records rather than network traffic analysis.

This vulnerability aligns with CWE-295, which describes Improper Certificate Validation, a category of flaws where software does not properly validate certificates or hostnames during TLS connections. It also maps to MITRE ATT&CK technique T1078, specifically the Valid Accounts and Remote Services sub-techniques, as it facilitates unauthorized access by impersonating a trusted service. The exploitation requires network proximity but no prior authentication credentials for the LXD daemon itself if the attacker can intercept the initial handshake. This makes it particularly dangerous in environments where multiple administrators or automated systems connect to shared LXD hosts over untrusted networks such as public Wi-Fi, VPNs with compromised endpoints, or even within cloud provider internal networks that lack strict mutual TLS enforcement at the application layer.

Mitigation for this issue requires an immediate upgrade of the pylxd library to version 2.4.3 or later, where proper certificate validation logic has been implemented and tested. Organizations relying on automated scripts or applications using pylxd must ensure their dependency management systems are configured to pull these patched versions promptly. In addition to software updates, administrators should enforce strict TLS policies at the network level wherever possible, such as implementing mutual TLS authentication which requires both client and server certificates, thereby preventing impersonation even if certificate validation logic in individual libraries is flawed. Regular auditing of third-party dependencies for known vulnerabilities related to cryptographic implementations is also recommended to maintain a robust security posture against similar transport-layer attacks.

Responsible

Canonical

Reservation

11/12/2026

Disclosure

11/27/2026

Moderation

accepted

CPE

ready

EPSS

0.00245

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!