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

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.

Published: 2022-09-29 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-39254 is rated Moderate Risk (50.5/100): CVSS High severity, with low exploitation likelihood (EPSS 0.23%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2022-39254

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2025-12-12 0.28% 0.23% -0.05%
2 2025-11-21 0.23% 0.28% +0.05%
3 2025-11-18 0.23%

Full EPSS history (7 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-39254

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.6 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
3.9 4.0 [email protected]
6.5 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
2.8 3.6 [email protected]

Weakness enumeration for CVE-2022-39254

GitHub Security Advisory for CVE-2022-39254

GHSA-w4pr-4vjg-hffh · Severity: high · Ecosystem: pip — When matrix-nio receives forwarded room keys, the receiver doesn't check if it requested the key from the forwarder

OS Trackers for CVE-2022-39254

vendor priority summary link
debian not yet assigned CVE-2022-39254 not yet assigned priority: Debian including 1 source packages (python-matrix-nio), 4 status rows across 4 suites (bookworm, forky, sid, trixie): resolved 4. https://security-tracker.debian.org/tracker/CVE-2022-39254
ubuntu medium CVE-2022-39254 medium priority: Ubuntu including 1 source packages (python-matrix-nio), 13 status rows across 13 suites (bionic, focal, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): ignored 7, needs-triage 4, DNE 2. https://ubuntu.com/security/CVE-2022-39254

Affected software / configurations for CVE-2022-39254

Vendor Product Version Raw CPE
matrix-nio_project matrix-nio < 0.20 cpe:2.3:a:matrix-nio_project:matrix-nio:*:*:*:*:*:*:*:*

References for CVE-2022-39254

cvelogic Threat Intelligence