CVE-2025-71390: SurrealDB SurrealDB Allows Bypass Of Deny-net Vulnerability

MODERATE
Advisory Identifier: GHSA-m3c3-78fh-w3w7
CWE-923
Published
Advisory Summary

CVE-2025-71390 is a MODERATE surrealdb allows bypass of deny-net vulnerability (CWE-923: Improper Restriction of Communication Channel to Intended Endpoints) affecting SurrealDB libraries in the crates.io ecosystem. The issue involves surrealdb allows bypass of deny-net flags via dns resolution. Remediation is available by upgrading affected packages to version 2.1.8, 2.2.6, 3.0.0-alpha.7, 2.3.6.

CVE-2025-71390 at a Glance

CVE Identifier CVE-2025-71390
GHSA Identifier GHSA-m3c3-78fh-w3w7
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-923: Improper Restriction of Communication Channel to Intended Endpoints
Affected Product SurrealDB
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix CVE-2025-71390

To remediate this vulnerability, upgrade all affected SurrealDB dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

SurrealDB fixed: 2.1.8
Upgrade SurrealDB to 2.1.8
SurrealDB fixed: 2.2.6
Upgrade SurrealDB to 2.2.6
SurrealDB fixed: 3.0.0-alpha.7
Upgrade SurrealDB to 3.0.0-alpha.7
SurrealDB fixed: 2.3.6
Upgrade SurrealDB to 2.3.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for SurrealDB

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-71390, inspect your project dependencies for SurrealDB:

inspect dependencies for SurrealDB

Analyze the terminal output to locate any version of SurrealDB in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.8), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-923: Improper Restriction of Communication Channel to Intended Endpoints, where the product establishes a communication channel to (or from) an endpoint for privileged or protected operations, but it does not properly ensure that it is communicating with the correct endpoint. In SurrealDB, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

SurrealDB offers http functions that can access external network endpoints. A typical, albeit [not recommended ](https://surrealdb.com/docs/surrealdb/reference-guide/security-best-practices#example-deny-all-capabilities-with-some-exceptions)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. ### Impact The impact of this vulnerability is circumvention of the `--deny-net` capability and resulting impact on systems external to SurrealDB. The ultimate impact is dependent on the deployment scenario. For example, if the SurrealDB server blocks requests to internal/private IP addresses because those services don’t require authentication, but an attacker can still use SurrealDBs ability to resolve their hostnames via DNS and invoke them directly using `http::<fn>(<url>)`, the attacker can access these internal endpoints directly, and potentially retrieve or even alter sensitive information and credentials. ### Patches A patch has been created that checks resolved hostnames against allowed network targets, preventing `http::*` functions from connecting to disallowed IPs. - Versions 2.2.6, 2.3.6 and later are not affected by this issue. - The first release following 2.1.7 and 3.0.0-alpha.7 and later will not be affected by this issue ### Workarounds The possibility of this vulnerability being exploited can be reduced by following an allowlist approach to enabling the http capability surreal start `--allow-net 10.0.0.0/8` or using the equivalent `SURREAL_CAPS_ALLOW_NET` environment variable, where endpoints allowed are fully trusted and are not controlled by regular users. Alternatively, the network access capability can be disabled, using `--deny-net` or the equivalent `SURREAL_CAPS_DENY_NET` environment variable without specifying targets, which disables all outbound HTTP, with impact to SurrealDB functionality. As the impact of this vulnerability depends on the security of the deployment environment of SurrealDB, best practices should be followed within that environment.

CVE-2025-71390 Affected SurrealDB Versions

4 component(s)
Fixed Versions:
2.1.82.2.63.0.0-alpha.72.3.6
Product / Package Ecosystem Affected Versions Fixed Version
SurrealDB
crates.io
≥ 2.1.0
< 2.1.8
2.1.8
SurrealDB
crates.io
≥ 2.2.0
< 2.2.6
2.2.6
SurrealDB
crates.io
≥ 3.0.0-alpha.1
< 3.0.0-alpha.7
3.0.0-alpha.7
SurrealDB
crates.io
≥ 2.3.0
< 2.3.6
2.3.6

References

Frequently Asked Questions

What is CVE-2025-71390?
CVE-2025-71390 is a security vulnerability in SurrealDB involving SurrealDB allows bypass of deny-net flags via DNS resolution under CWE-923: Improper Restriction of Communication Channel to Intended Endpoints.
Which SurrealDB versions are affected?
Affected versions include releases prior to 2.1.8, 2.2.6, 3.0.0-alpha.7, 2.3.6 across affected packages: SurrealDB.
What version fixes CVE-2025-71390?
Upgrading to 2.1.8, 2.2.6, 3.0.0-alpha.7, 2.3.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is SurrealDB affected?
Yes, SurrealDB is affected in releases prior to 2.1.8, 2.2.6, 3.0.0-alpha.7, 2.3.6. Upgrade your dependency to 2.1.8, 2.2.6, 3.0.0-alpha.7, 2.3.6 or later.
What CWE is associated with CVE-2025-71390?
CVE-2025-71390 is classified under CWE-923: Improper Restriction of Communication Channel to Intended Endpoints (The product establishes a communication channel to (or from) an endpoint for privileged or protected operations, but it does not properly ensure that it is communicating with the correct endpoint.).
How can I check crates.io dependencies for CVE-2025-71390?
Run the dependency tree command: 'inspect dependencies for SurrealDB'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m3c3-78fh-w3w7",
  "modified" : "2026-09-04T17:30:45Z",
  "published" : "2026-09-04T17:30:45Z",
  "aliases" : [ "CVE-2025-71390" ],
  "summary" : "SurrealDB allows bypass of deny-net flags via DNS resolution",
  "details" : "SurrealDB offers http functions that can access external network endpoints. A typical, albeit [not recommended ](https://surrealdb.com/docs/surrealdb/reference-guide/security-best-practices#example-deny-all-capabilities-with-some-exceptions)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.\n\nAn 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. \n\nWhen 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.\n\n\n### Impact\nThe impact of this vulnerability is circumvention of the `--deny-net` capability and resulting impact on systems external to SurrealDB. The ultimate impact is dependent on the deployment scenario.\n\nFor example, if the SurrealDB server blocks requests to internal/private IP addresses because those services don’t require authentication, but an attacker can still use SurrealDBs ability to resolve their hostnames via DNS and invoke them directly using `http::<fn>(<url>)`, the attacker can access these internal endpoints directly, and potentially retrieve or even alter sensitive information and credentials.\n\n### Patches\nA patch has been created that checks resolved hostnames against allowed network targets, preventing `http::*` functions from connecting to disallowed IPs.\n\n- Versions 2.2.6, 2.3.6 and later are not affected by this issue. \n- The first release following 2.1.7 and 3.0.0-alpha.7 and later will not be affected by this issue\n\n### Workarounds\nThe possibility of this vulnerability being exploited can be reduced by following an allowlist approach to enabling the http capability surreal start `--allow-net 10.0.0.0/8` or using the equivalent `SURREAL_CAPS_ALLOW_NET` environment variable, where endpoints allowed are fully trusted and are not controlled by regular users.\n\nAlternatively, the network access capability can be disabled, using `--deny-net` or the equivalent `SURREAL_CAPS_DENY_NET` environment variable without specifying targets, which disables all outbound HTTP, with impact to SurrealDB functionality.\n\nAs the impact of this vulnerability depends on the security of the deployment environment of SurrealDB, best practices should be followed within that environment.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:L/SC:H/SI:H/SA:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "SurrealDB"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0"
      }, {
        "fixed" : "2.1.8"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.1.7"
    }
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "SurrealDB"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.0"
      }, {
        "fixed" : "2.2.6"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.2.5"
    }
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "SurrealDB"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0-alpha.1"
      }, {
        "fixed" : "3.0.0-alpha.7"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 3.0.0-alpha.6"
    }
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "SurrealDB"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.3.0"
      }, {
        "fixed" : "2.3.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/surrealdb/surrealdb/security/advisories/GHSA-m3c3-78fh-w3w7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-71390"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/surrealdb/surrealdb/pull/6101"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/surrealdb/surrealdb/pull/6119"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/surrealdb/surrealdb/pull/6120"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/surrealdb/surrealdb/pull/6121"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/surrealdb/surrealdb/commit/4b317d850c7dabaee228144423741097232f7955"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/surrealdb/surrealdb/commit/7c574dfa90211923e2ff1b12510c8479f8805b3d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/surrealdb/surrealdb/commit/b80d7d08b043c0e4bc0b7ff8ddb9be0907c0bf59"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/surrealdb/surrealdb/commit/d5dc46f1c255ed450b3af025a0bdc165b6ce54a3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/surrealdb/surrealdb"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/surrealdb-before-deny-net-bypass-via-dns-resolution"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-923" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-04T17:30:45Z",
    "nvd_published_at" : null
  }
}