Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. surrealdb
  4. ›
  5. CVE-2026-49997

CVE-2026-49997: SurrealDB: Edge PERMISSIONS FOR delete bypassed when a connected node is deleted

July 1, 2026

In SurrealDB, records can be connected as a graph: a RELATE statement creates an edge record between two node records. If either endpoint node is deleted, SurrealDB automatically removes the edge row to keep the graph consistent.

A user with permission to delete a node could also delete the edges connected to that node, even when the edge table’s PERMISSIONS FOR delete clause should have stopped them.

The automatic edge removal (Document::purge_edges) ran with permissions disabled (opt.clone().with_perms(false)), so the edge table’s PERMISSIONS FOR delete and PERMISSIONS FOR select clauses were never consulted. The removal step could also observe edge state that the edge’s SELECT clause should have hidden.

References

  • github.com/advisories/GHSA-whwg-vh4f-pmmf
  • github.com/surrealdb/surrealdb/commit/a80d1784cf75358441978bbd77688855e95f4578
  • github.com/surrealdb/surrealdb/pull/242
  • github.com/surrealdb/surrealdb/security/advisories/GHSA-whwg-vh4f-pmmf
  • nvd.nist.gov/vuln/detail/CVE-2026-49997

Code Behaviors & Features

Detect and mitigate CVE-2026-49997 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 →

Affected versions

All versions before 3.1.0

Fixed versions

  • 3.1.0

Solution

Upgrade to version 3.1.0 or above.

Impact 5.4 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-285: Improper Authorization
  • CWE-863: Incorrect Authorization

Source file

cargo/surrealdb/CVE-2026-49997.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 13 Jul 2026 00:20:02 +0000.