mediumCVSS 6.4Vulnerability

GHSA-97vg-427p-8hx5

SurrealDB offers `http::*` functions that can access external network endpoints, with the `--allow-net` and `--deny-net` capabilities used to restrict the set of network targets that can be reached. An authenticated user of SurrealDB can bypass a port-scoped `--deny-net <host>:<port>` rule by chaining an HTTP redirect: the initial request goes to an `--allow-net`-permitted hostname, the response's `3xx Location` header points at the denied `host:port`, and the redirect is followed even though the destination was explicitly denied. The root cause is in the redirect policy applied to outbound HTTP requests (`surrealdb/core/src/fnc/util/http/mod.rs`): the `NetTarget` for the redirect destination is built from `url.host_str()` alone and `url.port()` is dropped. The capability matcher (`surrealdb/core/src/dbs/capabilities.rs:259-264`) refuses to match a port-bearing rule against a port-stripped target (`Self::Host(host, Some(port)) => match tgt { _ => false }`), so the operator's port-scoped deny rule silently does not fire on the redirect target. ### Impact The impact of this vulnerability is circumvention of the `--deny-net` capability when the operator has scoped deny rules by port, and the resulting impact on systems external to SurrealDB. The ultimate impact is dependent on the deployment scenario. For example, if a SurrealDB operator uses `--deny-net <host>:<port>` to block specific internal services (such as a local Redis at `192.168.1.1:6379` or an unauthenticated cloud metadata service) while leaving the rest of the host reachable, an authenticated principal that can call `http::*` and host an attacker-controlled redirect target can reach the blocked service and act on whatever interface it exposes. Bounded to: - Principals already permitted to call `http::*`. - Capability configurations that scope deny rules by port. Host-only rules (`--deny-net <host>`) are not affected because the host-only rule arm of the matcher accepts port-stripped targets. ### Pat

Properties

ghsa_id
GHSA-97vg-427p-8hx5
severity
medium
summary
SurrealDB: Port-specific --deny-net rules silently bypassed on HTTP redirect
cvss_score
6.4
cve_id
GHSA-97vg-427p-8hx5
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
is_ghsa_only
true
ghsa_published
2026-07-01T20:20:40Z
source_url
https://github.com/advisories/GHSA-97vg-427p-8hx5
ghsa_updated
2026-07-01T20:20:41Z

Related Entities (4)

HAS_WEAKNESS (1)

[Weakness]Server-Side Request Forgery (SSRF)

REPORTED_BY (1)

[Source]GitHub Advisory Database

AFFECTS (1)

[Software]rust/surrealdb

VULNERABLE_TO (1)

[Software]rust/surrealdb

Explore deeper with Ninja Signal's threat intelligence graph

GHSA-97vg-427p-8hx5 (CVSS 6.4) — Ninja Signal Threat Intelligence | Ninja Signal