CVE-2021-26956
Description
An issue was discovered in the xcb crate through 2021-02-04 for Rust. It has a soundness violation because bytes from an X server can be interpreted as any data type returned by xcb::xproto::GetPropertyReply::value.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
The xcb crate for Rust has a soundness issue where bytes from an X server are misinterpreted as any type via GetPropertyReply::value, enabling memory corruption.
Vulnerability
Overview
The xcb crate (through version 2021-02-04) for Rust contains a soundness violation in the function xcb::xproto::GetPropertyReply::value. This function treats raw bytes received from the X server as the expected return data type without proper validation or type checking [1]. The issue arises because the crate's generated bindings do not ensure that the data from the X server conforms to the expected layout or safety invariants of the target Rust type.
Exploitation
Conditions
An attacker who can control or influence the responses from an X server to which a vulnerable application is connected can craft specially formatted replies. Since the X protocol is often used over local sockets or network connections, a local attacker with the ability to manipulate X traffic (e.g., through a malicious X server or via other attacks on the X connection) can trigger this vulnerability [2]. The flaw does not require authentication against the application itself, but the attacker must be positioned to intercept or control the X server's responses.
Potential
Impact
Because the bytes from the X server are interpreted as an arbitrary Rust type without assurance of correctness, this can lead to reading uninitialized memory, type confusion, and potentially arbitrary code execution. The RustSec advisory classifies this as both a memory-corruption and memory-exposure issue [2]. Applications using the xcb crate to retrieve properties from the X server are at risk if they trust data from the GetPropertyReply::value method without additional validation.
Mitigation
Status
As of the advisory publication (February 2021), the xcb crate was marked as unmaintained by its author [3]. No patch exists in the 0.x series, and users are advised to avoid using the crate for safety-critical operations. The RustSec advisory database recommends migrating to alternative X11 bindings for Rust [2]. The issue is tracked in the crate's repository as issue #95 [4].
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
xcbcrates.io | < 1.0.0 | 1.0.0 |
Affected products
2- Rust/xcbdescription
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/advisories/GHSA-mp6r-fgw2-rxfxghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2021-26956ghsaADVISORY
- github.com/RustSec/advisory-db/issues/653ghsaWEB
- github.com/rust-x-bindings/rust-xcb/issues/95ghsaWEB
- rustsec.org/advisories/RUSTSEC-2021-0019.htmlghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.