# CVE-2024-39691: Malicious Matrix homeserver can leak truncated message content of messages it shouldn't have access to

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.3
- **CVSS:** 4.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.67% (percentile 47, 2026-11-26)
- **CWE:** CWE-280, CWE-755
- **Aliases:** GHSA-w9mh-5x8j-9754
- **Published:** 2024-07-05T18:42:06.864Z
- **Modified:** 2026-09-10T03:50:16.894Z

## Who should check

- Projects that depend on npm package matrix-appservice-irc (\< 2.0.1)
- Anyone running matrix-org matrix-appservice-irc \< 2.0.1

## Description

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.

## Affected and fixed versions

- npm `matrix-appservice-irc`: affected \< 2.0.1; fixed 2.0.1 (osv)
- matrix-org matrix-appservice-irc: \< 2.0.1 (cvelist)

## Mitigation

- Upgrade matrix-appservice-irc to 2.0.1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-39691. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-39691.md
Affected: matrix-appservice-irc < 2.0.1
Fixed in: 2.0.1

Steps:
1. Search this machine and project for matrix-appservice-irc (npm), matrix-org matrix-appservice-irc: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-39691 being exploited?

There is no confirmed exploitation: CVE-2024-39691 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.67% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-39691?

Medium: CVSS 4.3 (v3.1, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2024-39691?

matrix-appservice-irc \< 2.0.1.

### Is there a fix for CVE-2024-39691?

Yes. Fixed in 2.0.1. Upgrade matrix-appservice-irc to 2.0.1 or later.

### How do I check if I'm affected by CVE-2024-39691?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/matrix-org/matrix-appservice-irc/security/advisories/GHSA-w9mh-5x8j-9754>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2024-39691>
- patch: <https://github.com/matrix-org/matrix-appservice-irc/pull/1804>
- patch: <https://github.com/matrix-org/matrix-appservice-irc/commit/1835e047f269001054be4c68867797aa12372a0f>
- other: <https://github.com/matrix-org/matrix-appservice-irc/blob/d5d67d1d3ea3f0f6962a0af2cc57b56af3ad2129/config.sample.yaml#L601-L604>
- other: <https://github.com/matrix-org/matrix-appservice-irc>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-39691>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-w9mh-5x8j-9754> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2024-39691> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-39691>
