{"id":"GHSA-6g9v-7gq3-p2c6","title":"SurrealDB: Authenticated callers can read fields hidden by field-level SELECT permissions via error messages","summary":"SurrealDB: Authenticated callers can read fields hidden by field-level SELECT permissions via error messages","severity":"medium","cvss":4.3,"cwe":["CWE-209"],"vendor":"surrealdb","product":"surrealdb","ecosystem":"rust","affected":["surrealdb < 3.1.0"],"patched":["surrealdb 3.1.0"],"published":"2026-07-01","updated":"2026-07-01","source":"GHSA","sourceUrl":"https://github.com/advisories/GHSA-6g9v-7gq3-p2c6","references":[{"url":"https://github.com/surrealdb/surrealdb/security/advisories/GHSA-6g9v-7gq3-p2c6"},{"url":"https://github.com/surrealdb/surrealdb/commit/0aaa332c79195e4c40275eb5224aed3d52f5cf90"},{"url":"https://github.com/advisories/GHSA-6g9v-7gq3-p2c6"}],"tags":["ghsa","rust"],"ingestedAt":"2026-07-01T21:17:11.630Z","slug":"GHSA-6g9v-7gq3-p2c6","body":"## Overview\n\nA record user with UPDATE access could read field values that field-level SELECT permissions hid from them. Arithmetic operators and `extend` embedded the raw operand into their error messages, and UPDATE permission checks evaluate against the unreduced document — so triggering such an error against a hidden field returned its value in the resulting error.\n\n### Impact\n\nA record user issues an UPDATE that performs an incompatible operation against a hidden field — e.g. `UPDATE person:me SET probe = email + 1` when `email` is a string — and reads the value from the returned error (`Tried to compute \"alice@example.com\" + 1 …`). One field per operation, but the attacker can repeat against any field on any record they can UPDATE.\n\n### Patches\n\nA patch has been introduced that replaces the raw operand in every `try_*` operator and in `extend` with the operand's type name (`\"string\"`, `\"int\"`, `\"array\"`, etc.).\n\n- Versions 3.1.0 and later are not affected by this issue.\n\n### Workarounds\n\nAffected users who are unable to update should not grant UPDATE permission on records whose field-level SELECT permissions are expected to hide values from the same caller.\n\n## Affected packages\n\n- `surrealdb < 3.1.0`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `surrealdb 3.1.0`","depth":"sunlit","depthScore":24,"depthScoreParts":{"impact":23.7,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}