# SurrealDB port-specific deny-net rule bypass on HTTP redirect

Source: https://junglewise.ai/threats/surrealdb-port-specific-deny-net-rule-bypass-on-http-redirect-855c5516  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-20. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

Severity: medium · CVSS 6.4 · Published 2026-07-20

SurrealDB is a database platform that includes HTTP functions for accessing external network resources, with --deny-net rules used to restrict which network targets authenticated users can reach. A vulnerability in redirect handling allows authenticated users to bypass port-specific access controls by initiating a request to an allowed hostname that redirects to a blocked internal service (such as a local database or metadata endpoint). This could expose sensitive internal systems to unauthorized access by authenticated database users.

Technologies: [surrealdb (crates.io)](https://junglewise.ai/threats/technologies/surrealdb). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Medium severity, with a CVSS score of 6.4, published 20 July 2026.

**Which products and versions are affected?** surrealdb (crates.io) < 3.1.0.

**Is there a fix for This vulnerability?** A patch was published on 2026-05-27: Version 3.1.0 released with fix (commit ceb1ca3a1) Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** Check whether you run surrealdb (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

SurrealDB's HTTP redirect policy fails to preserve port information when constructing the NetTarget for redirect destinations. The vulnerable code in surrealdb/core/src/fnc/util/http/mod.rs extracts only url.host_str() and drops url.port(), while the capability matcher in surrealdb/core/src/dbs/capabilities.rs refuses to match port-bearing rules against port-stripped targets. This allows an authenticated attacker to chain a 3xx redirect from an --allow-net-permitted hostname to a denied host:port, bypassing the denial. The attack requires the attacker to already have http::* function access and control a redirect target. Host-only deny rules are not affected because they match port-stripped targets. Version 3.1.0 and later patch this by including url.port() in the NetTarget construction for redirects, and regression tests verify the fix.

## Affected products

- SurrealDB SurrealDB < 3.1.0

## Timeline

- 2026-05-27: disclosed
- 2026-07-20: advisory: GHSA-97vg-427p-8hx5 published; CVE-2026-63743 assigned
- 2026-05-27: patched: Version 3.1.0 released with fix (commit ceb1ca3a1)
- 2026-09-04: other: GHSA-vq7c-3hc9-m5hr withdrawn as duplicate of GHSA-97vg-427p-8hx5

## References

- [https://github.com/surrealdb/surrealdb/security/advisories/GHSA-97vg-427p-8hx5](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-97vg-427p-8hx5)
- [https://www.vulncheck.com/advisories/surrealdb-before-port-specific-deny-rule-bypass-via-http-redirect](https://www.vulncheck.com/advisories/surrealdb-before-port-specific-deny-rule-bypass-via-http-redirect)

## Related threats

- [SurrealDB use-after-free in KV backends via affinitypool spawn_local](https://junglewise.ai/threats/cve-2026-121417-surrealdb-before-3-3-0-contains-a-use-after-free-vulnerability)
- [SurrealDB JSON parser denial of service via uncontrolled recursion](https://junglewise.ai/threats/surrealdb-json-parser-denial-of-service-via-uncontrolled-recursion-3037f8a0)
- [SurrealDB ES512 algorithm silently downgraded to ES384](https://junglewise.ai/threats/surrealdb-es512-algorithm-silently-downgraded-to-es384-f0af29b8)
- [SurrealDB permission bypass via WHERE clause evaluation](https://junglewise.ai/threats/surrealdb-permission-bypass-via-where-clause-evaluation-afa6f001)
- [SurrealDB authorization bypass in KILL statement](https://junglewise.ai/threats/surrealdb-authorization-bypass-in-kill-statement-fc230d0f)
