GHSA-w4pr-4vjg-hffh

Suggest an improvement
Source
https://github.com/advisories/GHSA-w4pr-4vjg-hffh
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/09/GHSA-w4pr-4vjg-hffh/GHSA-w4pr-4vjg-hffh.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-w4pr-4vjg-hffh
Aliases
Related
Published
2022-09-30T22:56:17Z
Modified
2023-11-01T04:59:47.710853Z
Severity
  • 8.6 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N CVSS Calculator
Summary
When matrix-nio receives forwarded room keys, the receiver doesn't check if it requested the key from the forwarder
Details

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 poljar@termina.org.uk.

Database specific
{
    "nvd_published_at": "2022-09-29T15:15:00Z",
    "cwe_ids": [
        "CWE-287",
        "CWE-322"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2022-09-30T22:56:17Z"
}
References

Affected packages

PyPI / matrix-nio

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.20

Affected versions

0.*

0.2
0.3
0.4
0.4.1
0.5
0.6
0.7
0.7.1
0.7.2
0.8.0
0.9.0
0.10.0
0.11.0
0.11.1
0.11.2
0.12.0
0.13.0
0.14.0
0.14.1
0.15.0
0.15.1
0.15.2
0.16.0
0.17.0
0.18.0
0.18.1
0.18.2
0.18.3
0.18.4
0.18.5
0.18.6
0.18.7
0.19.0

Ecosystem specific

{
    "affected_functions": [
        "nio.crypto.olm_machine.Olm._handle_forwarded_room_key_event"
    ]
}