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

- Severity: Medium 5.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.47%, higher than 42% of CVEs (2026-12-01)
- Published: 2023-08-04T16:34:54.312Z
- Modified: 2026-09-10T03:49:57.718Z
- Also known as: GHSA-vc7j-h8xg-fv5x
- Weaknesses: CWE-287
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- matrix-org matrix-appservice-bridge: >= 4.0.0, < 8.1.2; = 9.0.0
- matrix-appservice-bridge (npm): from 4.0.0 before 8.1.2; from 9.0.0 before 9.0.1
- matrix matrix-appservice-bridge: from 4.0.0 before 8.1.2; 9.0.0

## Every score

- GitHub_M: CVSS:3.1 5.0 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N`
- GitHub: CVSS:3.1 5.0 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://github.com/matrix-org/matrix-appservice-bridge/security/advisories/GHSA-vc7j-h8xg-fv5x> (third-party-advisory, web)
- <https://github.com/matrix-org/matrix-appservice-bridge/commit/4c6723a5e7beda65cdf1ae5dbb882e8beaac8552> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-38691> (advisory)
- <https://github.com/matrix-org/matrix-appservice-bridge> (package)

## Sources

- CVE List: [CVE-2023-38691](https://www.cve.org/CVERecord?id=CVE-2023-38691), CVE Terms of Use, modified 2024-10-07
- GitHub Advisory Database: [GHSA-vc7j-h8xg-fv5x](https://github.com/advisories/GHSA-vc7j-h8xg-fv5x), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2023-38691](https://nvd.nist.gov/vuln/detail/CVE-2023-38691), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-38691 · Whole record: https://cve.day/CVE-2023-38691.json · Rebuilt by cve.day 2026-11-25T22:58:26.760Z
