Skip to content

GHSA-2xpg-3hx4-fm9r CVE-2021-26955 CVE-2021-26956 CVE-2021-26957 CVE-2021-26958 GHSA-3288-cwgw-ch86 GHSA-3cj3-jrrp-9rxf GHSA-mp6r-fgw2-rxfx RUSTSEC-2021-0019

Out of bounds read in xcb

Critical crates.io
Severity
9.8 / 10
Critical · CVSS 3.1
Exploit chance (EPSS)
1.73%
Chance of exploitation in the next 30 days. Higher than 77.57% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-125 Out-of-bounds Read
Fix
1.0.0
Upgrade xcb to this version or later

Description

An issue was discovered in the xcb crate through 2021-02-04 for Rust. It has a soundness violation because there is an out-of-bounds read in xcb::xproto::change_property(), as demonstrated by a format=32 T=u8 situation where out-of-bounds bytes are sent to an X server.

Affected versions

crates.io

PackageVulnerableFixed in
xcb
< 1.0.0
1.0.0
xcb
>= 0.0.0-0, < 1.0.0
1.0.0

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

xcb crates.io → 1.0.0

cargo
cargo update -p xcb --precise 1.0.0

Severity breakdown

CVSS 3.1 9.8

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Weakness

CWE-125: Out-of-bounds Read

The product reads data past the end, or before the beginning, of the intended buffer.

How to prevent it
  • Implementation: Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright. To reduce the likelihood of introducing an out-of-bounds read, ensure that you validate and ensure correct calculations for any length argument, buffer size calculation, or offset. Be especially careful of relying on a sentinel (i.e. special character such as NUL) in untrusted inputs.
  • Architecture and Design: Use a language that provides appropriate memory abstractions.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-655h-hg88-5qmf
Rust XCB `xcb::Connection::connect_to_fd*` functions violate I/O safety
Low Also affects xcb
GHSA-c8hq-x4mm-p6q6
Memory handling issues in xcb
Medium Also affects xcb
GHSA-9v9v-9qvf-h2hj
Pillow: Heap over-read in WMF/EMF rendering via 16-bit dimension truncation (Windows builds)
High Same weakness, CWE-125
GHSA-v9pv-5gc8-w2m6
Pillow multi-frame loaders can reuse stale native image storage after mode transitions
Critical Same weakness, CWE-125
GHSA-h3v5-h239-pg29
Electron: Off-screen rendering on macOS trusts GPU-supplied frame geometry
Low Same weakness, CWE-125
GHSA-3qxv-5xgr-q7w9
Electron: Frame subscription trusts GPU-supplied frame geometry
Low Same weakness, CWE-125
GHSA-pchr-8j38-3x4p
Pillow: TIFF encoder ColorMap plane-size mismatch causes a heap out-of-bounds read
High Same weakness, CWE-125
GHSA-c6hw-5grf-ff96
Pillow: OOB read in TiffDecode.c tile and RGBA paths leaks heap memory into pixels
High Same weakness, CWE-125
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor