CVE-2023-38691
matrix-appservice-bridge doesn't verify the sub parameter of an openId token exhange, allowing unauthorized access to provisioning APIs
Also known as GHSA-vc7j-h8xg-fv5x
Mitigation
- Upgrade matrix-appservice-bridge to one of 8.1.2, 9.0.1 (or later in the same release line).
Who should check
- Projects that depend on npm package matrix-appservice-bridge (>= 4.0.0, < 8.1.2)
- Anyone running matrix-org matrix-appservice-bridge >= 4.0.0, < 8.1.2; = 9.0.0
Vulnerability facts
- Affected
- matrix-appservice-bridge >= 4.0.0, < 8.1.2
- Fixed in
- 8.1.2, 9.0.1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 5.0 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: Low
- Integrity impact: None
- Availability impact: None
- EPSS
- 0.56% chance of exploitation in 30 days (percentile 40, 2026-11-26)
- CWE
- CWE-287
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm matrix-appservice-bridge | >= 4.0.0, < 8.1.2 | 8.1.2, 9.0.1 | osv |
| matrix-org matrix-appservice-bridge | >= 4.0.0, < 8.1.2; = 9.0.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2023-38691. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2023-38691.md Affected: matrix-appservice-bridge >= 4.0.0, < 8.1.2 Fixed in: 8.1.2, 9.0.1 Steps: 1. Search this machine and project for matrix-appservice-bridge (npm), matrix-org matrix-appservice-bridge: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2023-38691 being exploited?
There is no confirmed exploitation: CVE-2023-38691 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.56% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2023-38691?
Medium: CVSS 5.0 (v3.1, scored by CNA). Remote, login needed.
Which versions are affected by CVE-2023-38691?
matrix-appservice-bridge >= 4.0.0, < 8.1.2.
Is there a fix for CVE-2023-38691?
Yes. Fixed in 8.1.2, 9.0.1. Upgrade matrix-appservice-bridge to one of 8.1.2, 9.0.1 (or later in the same release line).
How do I check if I'm affected by CVE-2023-38691?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.