matrix-appservice-bridge doesn't verify the sub parameter of an openId token exhange, allowing unauthorized access to provisioning APIs
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2023-38691
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 18:11 UTC · Revision 1
Source evidence
matrix-appservice-bridge doesn't verify the sub parameter of an openId token exhange, allowing unauthorized access to provisioning APIs
core-osv · Original sourcePublished 4 Aug 2023, 16:34 UTC
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.
osv:CVE-2023-38691
Complete source record
{
"id": "c05149f8be3e514607a278dfbd6ebc21933ed941bc13aa9af0b63fe4fbc0fcae",
"url": "https://osv.dev/vulnerability/CVE-2023-38691",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "matrix-appservice-bridge doesn't verify the sub parameter of an openId token exhange, allowing unauthorized access to provisioning APIs",
"summary": "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.",
"evidence": "osv:CVE-2023-38691",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2023-38691",
"aliases": [
"CVE-2023-38691",
"GHSA-vc7j-h8xg-fv5x"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/matrix-org/matrix-appservice-bridge",
"type": "GIT",
"events": [
{
"introduced": "30f6e3a4f4c8e3ec0c4d08055e39845a71d34763"
},
{
"fixed": "48cf6d7ca4e8b0db2f738ce14014b4b34576906c"
},
{
"introduced": "533f27cb9a779a905b6b408ebd04f4c49963c84e"
},
{
"fixed": "4c6723a5e7beda65cdf1ae5dbb882e8beaac8552"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:matrix:matrix-appservice-bridge:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "4.0.0"
},
{
"fixed": "8.1.2"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:matrix:matrix-appservice-bridge:9.0.0:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "9.0.0"
},
{
"last_affected": "9.0.0"
}
],
"source": "CPE_STRING"
},
{
"range": [
{
"fixed": "4c6723a5e7beda65cdf1ae5dbb882e8beaac8552"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"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"
}
}
],
"modified": "2026-10-28T02:30:38.480332484Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/38xxx/CVE-2023-38691.json",
"https://github.com/matrix-org/matrix-appservice-bridge/security/advisories/GHSA-vc7j-h8xg-fv5x",
"https://nvd.nist.gov/vuln/detail/CVE-2023-38691",
"https://github.com/matrix-org/matrix-appservice-bridge/commit/4c6723a5e7beda65cdf1ae5dbb882e8beaac8552"
],
"provider_metadata": {
"cwe_ids": [
"CWE-287"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/38xxx/CVE-2023-38691.json"
}
},
"related_cves": [
{
"value": "CVE-2023-38691",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 505581,
"published_at": "2023-08-04T16:34:54.312+00:00"
}