CVE-2024-39691: Malicious Matrix homeserver can leak truncated message content of messages it shouldn't have access to
The fix for GHSA-wm4w-7h2q-3pf7 / CVE-2024-32000 included in matrix-appservice-irc 2.0.0 relied on the Matrix homeserver-provided timestamp to determine whether a user has access to the event they’re replying to when determining whether or not to include a truncated version of the original event in the IRC message. Since this value is controlled by external entities, a malicious Matrix homeserver joined to a room in which a matrix-appservice-irc bridge instance (before version 2.0.1) is present can fabricate the timestamp with the intent of tricking the bridge into leaking room messages the homeserver should not have access to.
References
- github.com/advisories/GHSA-w9mh-5x8j-9754
- github.com/matrix-org/matrix-appservice-irc
- github.com/matrix-org/matrix-appservice-irc/commit/1835e047f269001054be4c68867797aa12372a0f
- github.com/matrix-org/matrix-appservice-irc/pull/1804
- github.com/matrix-org/matrix-appservice-irc/security/advisories/GHSA-w9mh-5x8j-9754
- nvd.nist.gov/vuln/detail/CVE-2024-39691
Detect and mitigate CVE-2024-39691 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →