{"answers":{"affected":"2 open source packages ship an affected version, including matrix-appservice-irc.","exploited":"There is no known exploitation of CVE-2024-39691 in the wild and no public exploit code.","fix":"Upgrade matrix-appservice-irc to 2.0.1 or later.","what":"CVE-2024-39691 is a medium-severity vulnerability in matrix-org matrix-appservice-irc, published on 5 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-39691 and fix it if it is affected.\n\nWhat it is: CVE-2024-39691 is a medium-severity vulnerability in matrix-org matrix-appservice-irc, published on 5 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-39691 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- matrix-appservice-irc (npm): affected all versions; fixed in 2.0.1\n- matrix-appservice-irc (npm): affected all versions; fixed in 2.0.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-39691/ (Markdown: https://insights.sbomify.com/CVE-2024-39691/index.md)","id":"CVE-2024-39691","markdown":"https://insights.sbomify.com/CVE-2024-39691/index.md","name":"CVE-2024-39691","record":{"aliases":["GHSA-w9mh-5x8j-9754"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Matrix IRC bridge","requires_auth":"low_privilege","summary":"A malicious Matrix homeserver can trick the IRC bridge into leaking truncated message content it should not access by fabricating timestamps.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":4.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-755","name":"Improper Handling of Exceptional Conditions"},{"id":"CWE-280","name":"Improper Handling of Insufficient Permissions or Privileges"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Malicious Matrix homeserver can leak truncated message content of messages it shouldn't have access to","id":"CVE-2024-39691","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"information_disclosure","year":"2024"},"n_packages":2,"n_references":4,"next":{"headline":"Next.js Denial of Service (DoS) condition","id":"CVE-2024-39693"},"packages":[{"ecosystem":"npm","fixed":["2.0.1"],"introduced":["0"],"last_affected":[],"package":"matrix-appservice-irc","purl":null,"source":"GHSA-w9mh-5x8j-9754"},{"ecosystem":"npm","fixed":["2.0.1"],"introduced":["0"],"last_affected":[],"package":"matrix-appservice-irc","purl":"pkg:npm/matrix-appservice-irc","source":"GHSA-w9mh-5x8j-9754"}],"prev":{"headline":"Capsule tenant owner with \"patch namespace\" permission can hijack system namespaces","id":"CVE-2024-39690"},"products":["matrix-appservice-irc"],"published":"2024-07-05","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["matrix-org"]},"summary":"A malicious Matrix homeserver can trick the IRC bridge into leaking truncated message content it should not access by fabricating timestamps.","url":"https://insights.sbomify.com/CVE-2024-39691/"}