{"answers":{"affected":"2 open source packages ship an affected version, including matrix-appservice-bridge. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-32659 in the wild and no public exploit code.","fix":"Upgrade matrix-appservice-bridge to 2.6.1 or later.","what":"CVE-2021-32659 is a medium-severity vulnerability in matrix-org matrix-appservice-bridge, published on 16 Jun 2021. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-32659 and fix it if it is affected.\n\nWhat it is: CVE-2021-32659 is a medium-severity vulnerability in matrix-org matrix-appservice-bridge, published on 16 Jun 2021. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-32659 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- matrix-appservice-bridge (npm): affected all versions; fixed in 2.6.1\n- matrix-appservice-bridge (npm): affected all versions; fixed in 2.6.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-2021-32659/ (Markdown: https://insights.sbomify.com/CVE-2021-32659/index.md)","id":"CVE-2021-32659","markdown":"https://insights.sbomify.com/CVE-2021-32659/index.md","name":"CVE-2021-32659","record":{"aliases":["GHSA-35g4-qx3c-vjhx"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"yes","non_default_config":true,"product_category":"Matrix bridge library","requires_auth":"low_privilege","summary":"A malicious admin can redirect bridged room traffic to an unauthorized room by exploiting missing predecessor validation in Matrix appservice bridges.","user_interaction":"not_required","vuln_class":"business_logic"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"matrix-appservice-bridge","vendor":"matrix"}],"cvss":{"score":6.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-306","name":"Missing Authentication for Critical Functionality"}],"description":"Matrix-appservice-bridge is the bridging service for the Matrix communication program's application services. In versions 2.6.0 and earlier, if a bridge has room upgrade handling turned on in the configuration (the `roomUpgradeOpts` key when instantiating a new `Bridge` instance.), any `m.room.tombstone` event it encounters will be used to unbridge the current room and bridge into the target room. However, the target room `m.room.create` event is not checked to verify if the `predecessor` field contains the previous room. This means that any malicious admin of a bridged room can repoint the traffic to a different room without the new room being aware. Versions 2.6.1 and greater are patched. As a workaround, disabling the automatic room upgrade handling can be done by removing the `roomUpgradeOpts` key from the `Bridge` class options.","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":"Automatic room upgrade handling can be used maliciously to bridge a room non-consentually","id":"CVE-2021-32659","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"business_logic","year":"2021"},"n_packages":2,"n_references":3,"next":{"headline":"TechDocs content sanitization bypass","id":"CVE-2021-32660"},"packages":[{"ecosystem":"npm","fixed":["2.6.1"],"introduced":["0"],"last_affected":[],"package":"matrix-appservice-bridge","purl":null,"source":"GHSA-35g4-qx3c-vjhx"},{"ecosystem":"npm","fixed":["2.6.1"],"introduced":["0"],"last_affected":[],"package":"matrix-appservice-bridge","purl":"pkg:npm/matrix-appservice-bridge","source":"GHSA-35g4-qx3c-vjhx"}],"prev":{"headline":"Sensitive data may not be removed from storage on account removal","id":"CVE-2021-32658"},"products":["matrix-appservice-bridge"],"published":"2021-06-16","related":[{"cvss_score":5,"headline":"matrix-appservice-bridge doesn't verify the sub parameter of an openId token exhange, allowing unauthorized access to provisioning APIs","id":"CVE-2023-38691","kev_date_added":null,"published":"2023-08-04"}],"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":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["matrix-org"]},"summary":"A malicious admin can redirect bridged room traffic to an unauthorized room by exploiting missing predecessor validation in Matrix appservice bridges.","url":"https://insights.sbomify.com/CVE-2021-32659/"}