When matrix-nio receives forwarded room keys, the receiver doesn't check if it requested the key from the forwarderGHSA-w4pr-4vjg-hffh
HIGHFix: poljar/matrix-nio@b1cbf23GHSA-w4pr-4vjg-hffh is a high-severity (CVSS 8.6) Improper Authentication vulnerability in matrix-nio. A fix is available for matrix-nio — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-w4pr-4vjg-hffh.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
matrix-nioReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
When matrix-nio before 0.20 requests a room key from our devices, it correctly accepts key forwards only if they are a response to a previous request. However, it doesn't check that the device that responded matches the device the key was requested from.
This allows a malicious homeserver to insert room keys of questionable validity into the key store in some situations, potentially assisting in an impersonation attack.
For more information
If you have any questions or comments about this advisory, e-mail us at [email protected].
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | matrix-nio | all versions | 0.20pip install --upgrade 'matrix-nio==0.20' |
Affected Products
matrix-niomatrix-nio_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for matrix-nio, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update matrix-nio to 0.20 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-w4pr-4vjg-hffh is resolved across your whole dependency graph.
Workarounds
Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.
Frequently Asked Questions
Is GHSA-w4pr-4vjg-hffh in your dependencies?
Find it across PyPI, including transitive dependencies.