Malicious Matrix homeserver can leak truncated message content of messages it shouldn't have access to
matrix-appservice-irc is a Node.js IRC bridge for the Matrix messaging protocol. 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. matrix-appservice-irc 2.0.1 drops the reliance on `origin_server_ts` when determining whether or not an event should be visible to a user, instead tracking the event timestamps internally. As a workaround, it's possible to limit the amount of information leaked by setting a reply template that doesn't contain the original message.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2024-39691
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 18:08 UTC · Revision 1
Source evidence
Malicious Matrix homeserver can leak truncated message content of messages it shouldn't have access to
core-osv · Original sourcePublished 5 Jul 2024, 18:42 UTC
matrix-appservice-irc is a Node.js IRC bridge for the Matrix messaging protocol. 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. matrix-appservice-irc 2.0.1 drops the reliance on `origin_server_ts` when determining whether or not an event should be visible to a user, instead tracking the event timestamps internally. As a workaround, it's possible to limit the amount of information leaked by setting a reply template that doesn't contain the original message.
osv:CVE-2024-39691
Complete source record
{
"id": "ac15ea8213feb2f5c506579b17750a16f219db98a4854995caa1870227eebe24",
"url": "https://osv.dev/vulnerability/CVE-2024-39691",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Malicious Matrix homeserver can leak truncated message content of messages it shouldn't have access to",
"summary": "matrix-appservice-irc is a Node.js IRC bridge for the Matrix messaging protocol. 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. matrix-appservice-irc 2.0.1 drops the reliance on `origin_server_ts` when determining whether or not an event should be visible to a user, instead tracking the event timestamps internally. As a workaround, it's possible to limit the amount of information leaked by setting a reply template that doesn't contain the original message.",
"evidence": "osv:CVE-2024-39691",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2024-39691",
"aliases": [
"CVE-2024-39691",
"GHSA-w9mh-5x8j-9754"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/matrix-org/matrix-appservice-irc",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "3407938eb4f0bc63cdff64e7733bf7fe25cae857"
},
{
"fixed": "1835e047f269001054be4c68867797aa12372a0f"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "2.0.1"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "1835e047f269001054be4c68867797aa12372a0f"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"2.0.0",
"1.0.1",
"1.0.0",
"1.0.0-rc1",
"0.37.1",
"0.36.0",
"0.33.1",
"0.33.0",
"0.33.0-rc2",
"0.32.0",
"0.32.0-rc2",
"0.32.0-rc1",
"0.31.0",
"0.31.0-rc1",
"0.27.0",
"0.27.0-rc3",
"0.27.0-rc2",
"0.27.0-rc1",
"0.25.0-rc1",
"0.24.0",
"0.24.0-rc1",
"0.23.0-fosdem",
"0.23.0",
"0.23.0-rc1",
"0.22.0",
"0.22.0-rc1",
"0.21.0",
"0.21.0-rc3",
"0.20.2",
"develop-2019-02-17",
"0.15.2",
"0.14.0-rc4",
"0.14.0-rc3",
"0.14.0-rc2",
"0.14.0-rc1",
"develop-2019-11-28",
"develop-2019-11-26",
"develop-2019-11-15",
"develop-2019-11-12",
"matrix-org-testing",
"0.10.1",
"v0.9.1",
"v0.9.0",
"v0.9.0-rc1",
"0.7.1",
"0.7.0",
"0.5.0",
"0.1.1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-39691.json"
}
}
],
"modified": "2026-10-28T02:30:31.270930488Z",
"provider": "osv",
"references": [
"https://github.com/matrix-org/matrix-appservice-irc/blob/d5d67d1d3ea3f0f6962a0af2cc57b56af3ad2129/config.sample.yaml#L601-L604",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/39xxx/CVE-2024-39691.json",
"https://github.com/matrix-org/matrix-appservice-irc/security/advisories/GHSA-w9mh-5x8j-9754",
"https://nvd.nist.gov/vuln/detail/CVE-2024-39691",
"https://github.com/matrix-org/matrix-appservice-irc/commit/1835e047f269001054be4c68867797aa12372a0f",
"https://github.com/matrix-org/matrix-appservice-irc/pull/1804"
],
"provider_metadata": {
"cwe_ids": [
"CWE-280",
"CWE-755"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/39xxx/CVE-2024-39691.json"
}
},
"related_cves": [
{
"value": "CVE-2024-39691",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 498041,
"published_at": "2024-07-05T18:42:06.864+00:00"
}