{"id":"CVE-2026-63744","aliases":["CVE-2026-63744","GHSA-h5rg-8p7f-47g2"],"related":[],"kind":"vulnerability","state":"published","title":"SurrealDB before 3.1.5 SSRF via JWKS URL Redirect","summary":"SurrealDB before 3.1.5 contains a server-side request forgery vulnerability in the JWKS fetcher that follows HTTP redirects without re-validating redirect targets against network capabilities. Attackers with Owner role can configure a JWKS URL pointing to an allowlisted host that redirects to blocked internal addresses, bypassing network access controls.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"SurrealDB before 3.1.5 contains a server-side request forgery vulnerability in the JWKS fetcher that follows HTTP redirects without re-validating redirect targets against network capabilities. Attackers with Owner role can configure a JWKS URL pointing to an allowlisted host that redirects to blocked internal addresses, bypassing network access controls.","source":"cvelist"},{"lang":"en","text":"SurrealDB fetches the JWKS document for a JWT or record access method using a bare `reqwest` client that follows HTTP redirects by default. The network capability check in `core/src/iam/jwks.rs` (`check_capabilities_url`) is applied only to the originally configured URL; redirect targets are not re-validated. An `--allow-net`-permitted JWKS host that returns a `3xx Location` can therefore redirect the request to an address the allowlist was meant to block, resulting in a server-side request forgery (SSRF). The protected `HttpClient` used by `http::*` functions re-checks every redirect hop and was hardened in 3.1.0, but the JWKS fetcher uses its own client and was not covered.\n\n### Impact\n\nWhat an attacker **can** do:\n\n- With the **Owner** role at database level or above (the minimum required to run `DEFINE ACCESS ... TYPE JWT URL` or `TYPE RECORD ... WITH JWT URL`), point an access method at an allowlisted host they control and redirect the server's GET to an otherwise-blocked target — cloud metadata, loopback, internal services — bypassing `--allow-net`/`--deny-net`.\n- Infer the existence and liveness of internal hosts and ports from response-timing differences (bounded by the 1-second fetch timeout).\n\nWhat it **can't** do:\n\n- Read the response: the fetch is blind — the body is only parsed as a JWKS, and a non-JWKS response surfaces as an opaque `InvalidAuth` error. Nothing is returned to the caller.\n- Modify data or affect availability (a single GET request).\n\n### Patches\n\nThe JWKS fetcher now applies a redirect policy that re-validates every redirect target against the configured network capabilities (mirroring `check_capabilities_url`) and caps redirects at `max_http_redirects`.\n\n- Versions prior to 3.1.5 are vulnerable.\n\n### Workarounds\n\n- Restrict the Owner role to trusted operators.\n- Enforce egress filtering at the network layer (block link-local `169.254.0.0/16` and internal ranges) so redirect targets are unreachable regardless of in-process checks.\n- Configure access methods to use only trusted JWKS hosts that do not redirect, or use locally defined keys instead of a remote JWKS.\n\n### References\n\n- [SurrealDB Documentation — Capabilities](https://surrealdb.com/docs/surrealdb/security/capabilities)\n- [SurrealQL Documentation — DEFINE ACCESS](https://surrealdb.com/docs/surrealql/statements/define/access)\n- `fix(iam): prevent SSRF in JWKS fetch by re-validating redirect targets`","format":"markdown","source":"ghsa"}],"published":"2026-06-19T22:10:45.000Z","modified":"2026-11-04T02:56:06.882Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N","score":5.1,"rating":"MEDIUM"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:N/A:N","score":4.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:N/A:N","score":4.1,"rating":"MEDIUM"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"3.1.5","status":"affected"},{"type":"semver","version":"3.1.5","status":"unaffected"}],"vendor":"surrealdb","product":"surrealdb","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.1.5"}],"ecosystem":"crates.io","package":"surrealdb","purl":"pkg:cargo/surrealdb","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.1.5"}],"vendor":"surrealdb","product":"surrealdb","cpe":"cpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/surrealdb/surrealdb/security/advisories/GHSA-h5rg-8p7f-47g2","tags":["mitigation","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/surrealdb-before-ssrf-via-jwks-url-redirect","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/surrealdb/surrealdb","tags":["package"],"sources":["ghsa"]}],"credits":["Pig-Tail"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-21T15:01:39.192Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-63744","url":"https://www.cve.org/CVERecord?id=CVE-2026-63744","licence":"CVE Terms of Use","modified":"2026-07-28T01:05:39.475Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h5rg-8p7f-47g2","url":"https://github.com/advisories/GHSA-h5rg-8p7f-47g2","licence":"CC-BY-4.0","modified":"2026-11-04T02:56:06.882Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-63744","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63744","licence":"Public domain","modified":"2026-07-22T15:45:46.840Z"}],"updatedAt":"2026-11-25T22:59:29.203Z","epss":{"score":0.00233,"percentile":0.15229,"date":"2026-12-01T12:00:22.000Z"}}