Skip to content
OpenAdvisories
High · 8.6 CVE-2022-39254 EUVD-2022-6957GHSA-w4pr-4vjg-hffhPYSEC-2026-842

When matrix-nio receives forwarded room keys, the receiver doesn't check if it requested the key from the forwarder

Published Sep 29, 2022 · Updated Apr 23, 2025 · Assigned by GitHub_M

Description

matrix-nio is a Python Matrix client library, designed according to sans I/O principles. Prior to version 0.20, when a users requests a room key from their devices, the software correctly remember the request. Once they receive a forwarded room key, they accept it without checking who the room key came from. This allows homeservers to try to insert room keys of questionable validity, potentially mounting an impersonation attack. Version 0.20 fixes the issue.

Affected products

VendorProductAffectedFixed
poljar matrix-nio < 0.20 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 python-matrix-nio 0.20.0-1 —
Debian 13 python-matrix-nio 0.20.0-1 —
Debian 12 python-matrix-nio 0.20.0-1 —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 python-matrix-nio No fix yet —
Ubuntu 26.04 LTS python-matrix-nio No fix yet —
Ubuntu 25.10 python-matrix-nio No fix yet —
Ubuntu 24.04 LTS python-matrix-nio No fix yet —
Ubuntu 22.04 LTS python-matrix-nio No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI matrix-nio < 0.20 0.20 GHSA-w4pr-4vjg-hffh

References