Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. surrealdb
  4. ›
  5. GHSA-h5rg-8p7f-47g2

GHSA-h5rg-8p7f-47g2: SurrealDB: SSRF via JWKS URL — Redirect Following in JWT Key Fetch

June 19, 2026

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.

References

  • github.com/advisories/GHSA-h5rg-8p7f-47g2
  • github.com/surrealdb/surrealdb/security/advisories/GHSA-h5rg-8p7f-47g2

Code Behaviors & Features

Detect and mitigate GHSA-h5rg-8p7f-47g2 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.1.5

Fixed versions

  • 3.1.5

Solution

Upgrade to version 3.1.5 or above.

Impact 4.1 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-918: Server-Side Request Forgery (SSRF)

Source file

cargo/surrealdb/GHSA-h5rg-8p7f-47g2.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:23:41 +0000.