CVE-2022-39254
MEDIUM 6.5CVSS 3.1When 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
- 29 Sep 2022
- Last modified
- 7 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-287CWE-322
- Also known as
- GHSA-w4pr-4vjg-hffhPYSEC-2026-842
- Sources
- NVDJSONOSV GHSA-w4pr-4vjg-hffhJSONOSV PYSEC-2026-842JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 8.6 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 8.6 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N |
| OSV | PyPA | CVSS 3.1 | HIGH 8.6 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | matrix-nio_project | matrix-niocpe:2.3:a:matrix-nio_project:matrix-nio:*:*:*:*:*:*:*:* |
< 0.20 | 0.20 |
| OSV | PyPI | matrix-nio | < 0.20 | 0.20 |
References
- https://github.com/poljar/matrix-nio/commit/b1cbf234a831daa160673defd596e6450e9c29f0 · Patch, Third Party Advisory, WEB
- https://github.com/poljar/matrix-nio/security/advisories/GHSA-w4pr-4vjg-hffh · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-39254 · ADVISORY
- https://github.com/poljar/matrix-nio · PACKAGE
- https://pypi.org/project/matrix-nio · PACKAGE
- https://github.com/advisories/GHSA-w4pr-4vjg-hffh · ADVISORY
History
- 25 Nov 2026 20:35 UTC · NVD: first stored (published 29 Sep 2022)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 30 Sep 2022)