# CVE-2023-38691: matrix-appservice-bridge doesn't verify the sub parameter of an openId token exhange, allowing unauthorized access to provisioning APIs

- Priority: **Routine**
- Reason: Not severe (CVSS 5, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2023-08-04 · Modified: 2024-10-07
- Aliases: GHSA-vc7j-h8xg-fv5x
- Record: https://cvemate.com/vulnerability/CVE-2023-38691 · JSON: https://cvemate.com/vulnerability/CVE-2023-38691/json

## 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.
```

## Signals

- CVSS: 6.5 medium (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- EPSS: 0.466%, percentile 42.021%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- matrix-org matrix-appservice-bridge: ≥ 4.0.0, \< 8.1.2 \| = 9.0.0
- matrix matrix-appservice-bridge: ≥ 4.0.0, \< 8.1.2 \| 9.0.0
- Npm matrix-appservice-bridge (Npm): ≥ 4.0.0, \< 8.1.2 \| ≥ 9.0.0, \< 9.0.1

## References

- <https://github.com/matrix-org/matrix-appservice-bridge/security/advisories/GHSA-vc7j-h8xg-fv5x>
- <https://github.com/matrix-org/matrix-appservice-bridge/commit/4c6723a5e7beda65cdf1ae5dbb882e8beaac8552>
- <https://nvd.nist.gov/vuln/detail/CVE-2023-38691>
- <https://github.com/matrix-org/matrix-appservice-bridge>

---

Data as of 2026-12-05T08:40:56.251Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
