CVE-2024-34353

matrix-sdk-crypto contains a log exposure of private key of the server-side key backup

5.5 medium EPSS 0.19%

Published 13 May 2024 Updated 2 Aug 2024 CNA: GitHub_M

Check your servers for CVE-2024-34353

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-34353 affects matrix-sdk-crypto, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

The matrix-sdk-crypto crate, part of the Matrix Rust SDK project, is an implementation of a Matrix end-to-end encryption state machine in Rust. In Matrix, the server-side `key backup` stores encrypted copies of Matrix message keys. This facilitates key sharing between a user's devices and provides a redundant copy in case all devices are lost. The key backup uses asymmetric cryptography, with each server-side key backup assigned a unique public-private key pair. Due to a logic bug introduced in commit 71136e44c03c79f80d6d1a2446673bc4d53a2067, matrix-sdk-crypto version 0.7.0 will sometimes log the private part of the backup key pair to Rust debug logs (using the `tracing` crate). This issue has been resolved in matrix-sdk-crypto version 0.7.1. No known workarounds are available.

Severity (CVSS)

5.5 medium CVSS 3.1 from GitHub_M (CNA)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity none, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.19%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 9.46% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 5 Jun 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Weakness

  • CWE-532 Insertion of Sensitive Information into Log File

Affected products

As the CNA lists them.

ProductVersions
matrix-sdk-crypto
affected = 0.7.0

Is my server affected?

Find the installed version of matrix-sdk-crypto and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.

Debian, Ubuntu

dpkg -l | grep -i matrix-sdk-crypto
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2024-34353 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2024-34353

RHEL, Rocky, Alma, Fedora

rpm -q matrix-sdk-crypto
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2024-34353

Alpine

apk list --installed | grep -i matrix-sdk-crypto

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2024-34353
trivy image --scanners vuln IMAGE | grep CVE-2024-34353

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Advisories

Other references

Source: the record CVE-2024-34353 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.