/

CVE-2025-71390

Severity:

HIGH RISK

(8.8)

Network ACL Bypass (CWE-863) in SurrealDB HTTP Functions

CVE-2025-71390

Analyzed

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-863

Impact:

Unauthorized access to restricted network resources

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

SurrealDB does not consistently apply network deny rules after resolving hostnames used by its http::* functions. An authenticated user may therefore cause requests to restricted internal addresses, potentially exposing or modifying sensitive services and credentials when the deployment permits access to those endpoints.

Affected context

The issue occurs in SurrealDB deployments that expose the http::* functions to authenticated users and rely on --deny-net restrictions to control outbound network access. It becomes risky when a supplied hostname resolves to an address that should be denied, but the resolved destination is not validated against the configured network policy before the request is sent.

Exploit preconditions

  • Attack surface: SurrealDB's http::* functions and their outbound request

capability

  • Required access: Authenticated access sufficient to invoke the affected

database functions

  • Trigger point: Processing an HTTP request to a hostname whose DNS result

maps to a restricted network address

  • Why exploitation is possible: Network restrictions are not reliably

enforced against the DNS-resolved destination before the server performs

the request

Why this happens

The underlying flaw is an authorization-check bypass in outbound network filtering. The server evaluates the requested hostname or URL without consistently applying the same policy to the address returned by DNS resolution. This maps to CWE-863 because an authenticated operation can bypass an intended authorization constraint and reach resources outside the permitted network scope.

Potential impact

  • An attacker may access restricted internal HTTP services.
  • Sensitive application data or credentials could be disclosed.
  • Internal endpoints may be modified if the contacted service accepts write operations.
  • The issue could enable further compromise through reachable administrative or cloud metadata services.
  • Network segmentation assumptions could be weakened.

General mitigation guidance

Mitigation generally focuses on enforcing outbound network policy after every hostname resolution and before connection establishment, including protection against changes between resolution and connection. Secure-by-default designs can disable or narrowly scope database-initiated HTTP requests, use explicit destination allowlists, and restrict access to http::* functions by role. Network-level egress controls, least-privilege service identities, isolated runtime environments, and reduced credential exposure can limit consequences. DNS resolution and address validation should be treated as untrusted input, with consistent handling for redirects and alternate address families.

How teams detect issues like this

Detection approaches can include static and semantic analysis for outbound request code that validates only user-supplied hostnames, code review checks for authorization decisions made before DNS resolution, and tests covering denied private, loopback, link-local, and internal address ranges. Egress firewall and proxy policies can alert on database processes contacting protected networks. Audit logging can correlate http::* invocations, resolved destinations, and blocked or permitted connections. Automated security review tools may help identify incomplete SSRF and network-policy enforcement patterns.

Sources

SourceLink
github.comgithub.com/surrealdb/surrealdb/security/advisories/GHSA-m3c3-78fh-w3w7
vulncheck.comvulncheck.com/advisories/surrealdb-before-deny-net-bypass-via-dns-resolution

Frequently asked

questions

It can be exploitable through a network-accessible SurrealDB service when an authenticated user is authorized to invoke the affected HTTP functions. The exact scope depends on exposure and database permissions.

The attacker generally needs authenticated access with sufficient privileges to call http::* functions. Anonymous exploitation is not implied by the described behavior.

Enforce deny and allow policies against the final resolved destination immediately before connection, while restricting outbound requests and function access by default.

Treat hostnames, DNS responses, redirects, and resolved addresses as untrusted input; apply consistent egress controls, use least privilege, and test authorization policies across internal and external network ranges.

Find out what's already
exploitable in your codebase.