{"answers":{"affected":"4 open source packages ship an affected version, including matrix-appservice-bridge. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-38691 in the wild and no public exploit code.","fix":"Upgrade matrix-appservice-bridge to a fixed version for your release line: 8.1.2 or 9.0.1.","what":"CVE-2023-38691 is a medium-severity authentication bypass vulnerability in matrix-org matrix-appservice-bridge, published on 4 Aug 2023. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-38691 and fix it if it is affected.\n\nWhat it is: CVE-2023-38691 is a medium-severity authentication bypass vulnerability in matrix-org matrix-appservice-bridge, published on 4 Aug 2023. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2023-38691 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- matrix-appservice-bridge (npm): affected from 4.0.0; fixed in 8.1.2\n- matrix-appservice-bridge (npm): affected from 4.0.0; fixed in 8.1.2\n- matrix-appservice-bridge (npm): affected from 9.0.0; fixed in 9.0.1\n- matrix-appservice-bridge (npm): affected from 9.0.0; fixed in 9.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-2023-38691/ (Markdown: https://insights.sbomify.com/CVE-2023-38691/index.md)","id":"CVE-2023-38691","markdown":"https://insights.sbomify.com/CVE-2023-38691/index.md","name":"CVE-2023-38691","record":{"aliases":["GHSA-vc7j-h8xg-fv5x"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["privilege_escalation","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Matrix bridge library","requires_auth":"low_privilege","summary":"A malicious Matrix server can impersonate users via OpenID token exchange flaws, allowing unauthorized access to provisioning APIs in the matrix-appservice-bridge library.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"matrix-appservice-bridge","vendor":"matrix"}],"cvss":{"score":5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-287","name":"Improper Authentication"}],"description":"matrix-appservice-bridge provides an API for setting up bridges. Starting in version 4.0.0 and prior to versions 8.1.2 and 9.0.1, a malicious Matrix server can use a foreign user's MXID in an OpenID exchange, allowing a bad actor to impersonate users when using the provisioning API. The library does not check that the servername part of the `sub` parameter (containing the user's *claimed* MXID) is the the same as the servername we are talking to. A malicious actor could spin up a server on any given domain, respond with a `sub` parameter according to the user they want to act as and use the resulting token to perform provisioning requests. Versions 8.1.2 and 9.0.1 contain a patch. As a workaround, disable the provisioning API.","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":"matrix-appservice-bridge doesn't verify the sub parameter of an openId token exhange, allowing unauthorized access to provisioning APIs","id":"CVE-2023-38691","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"auth_bypass","year":"2023"},"n_packages":4,"n_references":2,"next":{"headline":"Command injection vulnerability in module management function in CloudExplorer Lite","id":"CVE-2023-38692"},"packages":[{"ecosystem":"npm","fixed":["8.1.2"],"introduced":["4.0.0"],"last_affected":[],"package":"matrix-appservice-bridge","purl":null,"source":"GHSA-vc7j-h8xg-fv5x"},{"ecosystem":"npm","fixed":["8.1.2"],"introduced":["4.0.0"],"last_affected":[],"package":"matrix-appservice-bridge","purl":"pkg:npm/matrix-appservice-bridge","source":"GHSA-vc7j-h8xg-fv5x"},{"ecosystem":"npm","fixed":["9.0.1"],"introduced":["9.0.0"],"last_affected":[],"package":"matrix-appservice-bridge","purl":null,"source":"GHSA-vc7j-h8xg-fv5x"},{"ecosystem":"npm","fixed":["9.0.1"],"introduced":["9.0.0"],"last_affected":[],"package":"matrix-appservice-bridge","purl":"pkg:npm/matrix-appservice-bridge","source":"GHSA-vc7j-h8xg-fv5x"}],"prev":{"headline":"matrix-appservice-irc IRC command injection via admin commands containing newlines","id":"CVE-2023-38690"},"products":["matrix-appservice-bridge"],"published":"2023-08-04","related":[{"cvss_score":6.5,"headline":"Automatic room upgrade handling can be used maliciously to bridge a room non-consentually","id":"CVE-2021-32659","kev_date_added":null,"published":"2021-06-16"}],"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":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-10-07","vendors":["matrix-org"]},"summary":"A malicious Matrix server can impersonate users via OpenID token exchange flaws, allowing unauthorized access to provisioning APIs in the matrix-appservice-bridge library.","url":"https://insights.sbomify.com/CVE-2023-38691/"}