{"id":"CVE-2023-38691","summary":"matrix-appservice-bridge doesn't verify the sub parameter of an openId token exhange, allowing unauthorized access to provisioning APIs","details":"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.","aliases":["GHSA-vc7j-h8xg-fv5x"],"modified":"2026-08-12T03:51:13.479077438Z","published":"2023-08-04T16:34:54.312Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/38xxx/CVE-2023-38691.json","cna_assigner":"GitHub_M","cwe_ids":["CWE-287"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/38xxx/CVE-2023-38691.json"},{"type":"ADVISORY","url":"https://github.com/matrix-org/matrix-appservice-bridge/security/advisories/GHSA-vc7j-h8xg-fv5x"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-38691"},{"type":"FIX","url":"https://github.com/matrix-org/matrix-appservice-bridge/commit/4c6723a5e7beda65cdf1ae5dbb882e8beaac8552"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/matrix-org/matrix-appservice-bridge","events":[{"introduced":"30f6e3a4f4c8e3ec0c4d08055e39845a71d34763"},{"fixed":"48cf6d7ca4e8b0db2f738ce14014b4b34576906c"},{"introduced":"533f27cb9a779a905b6b408ebd04f4c49963c84e"},{"fixed":"4c6723a5e7beda65cdf1ae5dbb882e8beaac8552"}],"database_specific":{"cpe":["cpe:2.3:a:matrix:matrix-appservice-bridge:*:*:*:*:*:node.js:*:*","cpe:2.3:a:matrix:matrix-appservice-bridge:9.0.0:*:*:*:*:node.js:*:*"],"extracted_events":[{"introduced":"4.0.0"},{"fixed":"8.1.2"},{"introduced":"9.0.0"},{"last_affected":"9.0.0"}],"source":["CPE_RANGE","CPE_STRING","REFERENCES"]}}],"versions":["9.0.0","= 9.0.0","8.1.1","8.1.0","8.0.1","8.0.0","7.0.0","5.1.0","5.0.0","4.0.1","4.0.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-38691.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N"}]}