CVE-2025-71390: SurrealDB allows bypass of deny-net flags via DNS resolution
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 bypass this restriction, using http::<fn>(<url>) functions where the hostname resolves to an IP within the --deny-net block. For example if a SurrealDB administrator wanted to restrict access to other services within a private network and thus set the --deny-net to a network IP range, this could be circumvented by an attacker leveraging DNS records and hostname resolution.
When sending SurrealDB statements containing the http::* functions, if the hostname resolves to a forbidden IP, the SurrealDB server will still issue the request and return the responses to the attacker.
References
- github.com/advisories/GHSA-m3c3-78fh-w3w7
- github.com/surrealdb/surrealdb/commit/4b317d850c7dabaee228144423741097232f7955
- github.com/surrealdb/surrealdb/commit/7c574dfa90211923e2ff1b12510c8479f8805b3d
- github.com/surrealdb/surrealdb/commit/b80d7d08b043c0e4bc0b7ff8ddb9be0907c0bf59
- github.com/surrealdb/surrealdb/commit/d5dc46f1c255ed450b3af025a0bdc165b6ce54a3
- github.com/surrealdb/surrealdb/pull/6101
- github.com/surrealdb/surrealdb/pull/6119
- github.com/surrealdb/surrealdb/pull/6120
- github.com/surrealdb/surrealdb/pull/6121
- github.com/surrealdb/surrealdb/security/advisories/GHSA-m3c3-78fh-w3w7
- nvd.nist.gov/vuln/detail/CVE-2025-71390
- www.vulncheck.com/advisories/surrealdb-before-deny-net-bypass-via-dns-resolution
Code Behaviors & Features
Detect and mitigate CVE-2025-71390 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 →