Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. surrealdb
  4. ›
  5. GHSA-5q9x-554g-9jgg

GHSA-5q9x-554g-9jgg: SurrealDB bypass of deny-net flags via redirect results in server-side request forgery (SSRF)

April 11, 2025

SurrealDB offers http functions that can access external network endpoints. A typical, albeit not recommended configuration would be to start SurrealDB with all network connections allowed with the exception of a deny list. For example, surreal start --allow-net --deny-net 10.0.0.0/8 will allow all network connections except to the 10.0.0.0/8 block.

An authenticated user of SurrealDB can use redirects to bypass this restriction. For example by hosting a server on the public internet which redirects to the IP addresses blocked by the administrator of the SurrealDB server via HTTP 301 or 307 response codes.

When sending SurrealDB statements containing the http::* functions to the attacker controlled host, the SurrealDB server will follow the redirects to the blocked IP address. Because the statements also return the responses to the attacker, this issue constitutes a full SSRF vulnerability.

This issue was discovered and patched during an code audit and penetration test of SurrealDB by cure53, the severity as defined within cure53’s preliminary finding is Medium, matched by our CVSS v4 assessment.

References

  • github.com/advisories/GHSA-5q9x-554g-9jgg
  • github.com/surrealdb/surrealdb
  • github.com/surrealdb/surrealdb/pull/5597
  • github.com/surrealdb/surrealdb/security/advisories/GHSA-5q9x-554g-9jgg

Code Behaviors & Features

Detect and mitigate GHSA-5q9x-554g-9jgg 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 2.0.5, all versions starting from 2.1.0 before 2.1.5, all versions starting from 2.2.0 before 2.2.2

Fixed versions

  • 2.2.2
  • 2.1.5
  • 2.0.5

Solution

Upgrade to versions 2.0.5, 2.1.5, 2.2.2 or above.

Weakness

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

Source file

cargo/surrealdb/GHSA-5q9x-554g-9jgg.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Wed, 14 May 2025 12:15:46 +0000.