VYPR
Moderate severityNVD Advisory· Published Jan 22, 2021· Updated Aug 4, 2024

CVE-2020-36205

CVE-2020-36205

Description

An issue was discovered in the xcb crate through 2020-12-10 for Rust. base::Error does not have soundness. Because of the public ptr field, a use-after-free or double-free can occur.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

The xcb crate's base::Error struct exposes a public ptr field, allowing safe Rust code to trigger use-after-free or double-free.

The xcb crate for Rust provides bindings to the X11 protocol. A soundness issue exists in the base::Error type, which contains a public ptr field [1][3]. Because the field is publicly accessible, safe Rust code can construct an Error instance with an arbitrary pointer, violating Rust's memory safety guarantees [4].

An attacker can exploit this by creating an Error object pointing to a stack or heap variable, then dropping the original variable while the Error still holds the pointer. This leads to a use-after-free condition. The RustSec advisory notes that the vulnerability can be triggered without any unsafe code, as the struct's fields are public [3]. A proof-of-concept demonstrates that after creating an Error with a pointer to a vector's buffer, subsequent operations on the vector can cause double-free or use-after-free [4].

The impact is primarily on availability, as the vulnerability can cause memory corruption leading to crashes or undefined behavior. The CVSS score is 5.5 (Medium) with availability impact rated High [3]. Confidentiality and integrity are not directly affected, but memory corruption could potentially be leveraged further.

The issue was fixed in version 1.0 of the xcb crate [3]. Users should upgrade to xcb >=1.0. The advisory recommends that the Error struct should have a hidden constructor or be marked unsafe to prevent misuse [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.

PackageAffected versionsPatched versions
xcbcrates.io
< 1.0.01.0.0

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

5

News mentions

0

No linked articles in our index yet.