Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. surrealdb
  4. ›
  5. GHSA-fpxg-5xmv-922m

GHSA-fpxg-5xmv-922m: SurrealDB has bypass of field-level SELECT permissions through JSON Patch `copy` and `move` with empty `from`

July 1, 2026

SurrealDB lets callers modify records using JSON Patch operations via the UPDATE … PATCH statement (and SDK equivalents such as db.patch()). One of those operations is copy, which duplicates one field’s value into another field of the same record. A PATCH with an empty from — for example, UPDATE thing:1 PATCH [{ op: 'copy', from: '', path: '/leak' }] — was treated as “copy the entire record” and duplicated every field, including fields the caller has no permission to read, into the destination field the caller chose. The permission filter that hides protected field values from the response only knew to hide the original protected field names, not the new destinations, so the protected values were returned to the caller intact under the new field name.

References

  • github.com/advisories/GHSA-fpxg-5xmv-922m
  • github.com/surrealdb/surrealdb/commit/56a7a1540d9228f82fd6284c258344e8dcb690fd
  • github.com/surrealdb/surrealdb/security/advisories/GHSA-fpxg-5xmv-922m

Code Behaviors & Features

Detect and mitigate GHSA-fpxg-5xmv-922m 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 4.3 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-863: Incorrect Authorization

Source file

cargo/surrealdb/GHSA-fpxg-5xmv-922m.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sat, 18 Jul 2026 00:23:53 +0000.