{"id":"CVE-2023-38691","published":"2023-08-04T16:34:54Z","modified":"2024-10-07T13:01:29Z","title":"matrix-appservice-bridge doesn't verify the sub parameter of an openId token exhange, allowing unauthorized access to…","vendor":"matrix-org","product":"matrix-appservice-bridge","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00555,"percentile":0.39961,"provenance":"source"},"cwes":[{"id":"CWE-287","name":"Improper Authentication"}],"references":[{"url":"https://github.com/matrix-org/matrix-appservice-bridge/security/advisories/GHSA-vc7j-h8xg-fv5x","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/matrix-org/matrix-appservice-bridge/commit/4c6723a5e7beda65cdf1ae5dbb882e8beaac8552","tags":["x_refsource_MISC"]}],"priority":{"score":11.5,"factors":[{"name":"EPSS percentile","points":7.99},{"name":"CVSS severity","points":3.5}]},"vendorSlug":"matrix-org","affectedVersions":[{"vendor":"matrix-org","product":"matrix-appservice-bridge","versions":[">= 4.0.0, < 8.1.2","= 9.0.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-10-07T13:01:18.486033Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"matrix-appservice-bridge","vulnerableRanges":[">=4.0.0, <8.1.2",">=9.0.0, <9.0.1"],"patched":["8.1.2","9.0.1"],"from":["GHSA-vc7j-h8xg-fv5x"],"provenance":"source"}],"summary":{"text":"The flaw is in the openID token exchange handling of matrix-appservice-bridge, a library for building Matrix bridges, affecting versions from 4.0.0 up to (but not including) 8.1.2 and 9.0.1. The library does not verify that the server name in the token's sub parameter matches the server it is communicating with. An attacker running a malicious Matrix server can return a sub value naming a foreign user and use the resulting token to impersonate that user against the provisioning API, requiring only network access and no prior authentication or user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:57:00Z"},"euvd":{"id":"EUVD-2023-2361","exploited":false,"provenance":"source"}}