Executive brief
SurrealDB is a multi-model cloud database. A vulnerability in how it handles security keys allows an authorized database owner to bypass network restrictions and probe internal services or cloud metadata. While an attacker cannot read the data from these internal services, they can confirm their existence and location, potentially aiding in further attacks on the internal infrastructure.
Technical details
A Server-Side Request Forgery (SSRF) exists in SurrealDB's JWKS fetcher within `core/src/iam/jwks.rs`. The component uses a `reqwest` client that follows HTTP redirects by default but only applies the `check_capabilities_url` validation to the initial URL. An attacker with 'Owner' privileges can configure a JWT access method pointing to a malicious server that redirects the request to restricted internal addresses (e.g., loopback or cloud metadata endpoints), bypassing `--allow-net` and `--deny-net` restrictions. This is a blind SSRF; the attacker can infer the liveness of internal hosts via timing differences but cannot read the response body. The issue is fixed in version 3.1.5 by re-validating every redirect hop against network capabilities.
Affected products
- SurrealDB SurrealDB < 3.1.5
Timeline
- 2026-06-19: disclosed
- 2026-06-19: advisory
- 2026-06-19: patched: Fixed in version 3.1.5