{"id":"GHSA-c8jx-96c9-8xrp","revision":null,"records":[{"revision":"c272279555ef47f0a2ee14027d376379","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-63742","aliases":[],"title":"SurrealDB before 3.1.0 Field Permission Bypass via Indexed COUNT","description":"SurrealDB versions before 3.1.0 contain a field-level SELECT permission bypass vulnerability in indexed COUNT fast paths. Attackers can execute COUNT queries on indexed fields with field-level SELECT restrictions to confirm or recover restricted field values through repeated guesses.","state":0,"publishedAt":"2026-07-20T12:04:36.415+00:00","modifiedAt":"2026-07-28T01:05:38.097+00:00","affected":[{"ecosystem":"Vendor product","name":"surrealdb","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"surrealdb\",\n                    \"product\": \"surrealdb\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"packageURL\": \"pkg:cargo/surrealdb\",\n                    \"versions\": [\n                        {\n                            \"version\": \"0\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\",\n                            \"lessThan\": \"3.1.0\"\n                        },\n                        {\n                            \"version\": \"3.1.0\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","score":5.3,"severity":"MEDIUM"},{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"severity":"MEDIUM"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-c8jx-96c9-8xrp","https://www.vulncheck.com/advisories/surrealdb-before-field-permission-bypass-via-indexed-count"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-63742","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-63742","identifiers":["CVE-2026-63742"]},"retained":false,"historicalAffected":[]},{"revision":"3cf5f215eaa141308a91b22aa526969e","observedAt":"2026-11-22T09:30:24.711+00:00","statement":{"source":"euvd","id":"EUVD-2026-45913","aliases":["CVE-2026-63742","GHSA-5c44-88qh-4c5h"],"title":"SurrealDB versions before 3.1.0 contain a field-level SELECT permission bypass vulnerability in indexed COUNT fast paths. Attackers can execute COUNT queries on indexed fields with field-level SELECT restrictions to confirm or recover restr…","description":"SurrealDB versions before 3.1.0 contain a field-level SELECT permission bypass vulnerability in indexed COUNT fast paths. Attackers can execute COUNT queries on indexed fields with field-level SELECT restrictions to confirm or recover restricted field values through repeated guesses.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","score":5.3,"severity":null}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-c8jx-96c9-8xrp","https://www.vulncheck.com/advisories/surrealdb-before-field-permission-bypass-via-indexed-count"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-45913","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jul 20, 2026, 12:04:36 PM","dateUpdated":"Jul 28, 2026, 1:05:38 AM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-45913","identifiers":["EUVD-2026-45913","CVE-2026-63742","GHSA-5c44-88qh-4c5h"]},"retained":false,"historicalAffected":[]},{"revision":"2cd2c152ba6d41e9a01445d0acda5b95","observedAt":"2026-11-04T03:59:20.726+00:00","statement":{"source":"nvd","id":"CVE-2026-63742","aliases":[],"title":"SurrealDB versions before 3.1.0 contain a field-level SELECT permission bypass vulnerability in indexed COUNT fast paths. Attackers can execute COUNT queries on indexed fields with field-level SELECT restrictions to confirm or recover restr…","description":"SurrealDB versions before 3.1.0 contain a field-level SELECT permission bypass vulnerability in indexed COUNT fast paths. Attackers can execute COUNT queries on indexed fields with field-level SELECT restrictions to confirm or recover restricted field values through repeated guesses.","state":0,"publishedAt":"2026-07-20T12:19:43.573+00:00","modifiedAt":"2026-07-22T15:47:01.527+00:00","affected":[],"metrics":[{"system":"CVSS 4.0 · disclosure@vulncheck.com · Secondary","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","score":5.3,"severity":"MEDIUM"},{"system":"CVSS 3.1 · disclosure@vulncheck.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"severity":"MEDIUM"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-c8jx-96c9-8xrp","https://www.vulncheck.com/advisories/surrealdb-before-field-permission-bypass-via-indexed-count"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-63742","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-863"],"productCriteria":["cpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:*"],"sourceDates":{"published":"2026-07-20T12:19:43.573","lastModified":"2026-07-22T15:47:01.527"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-63742","identifiers":["CVE-2026-63742"]},"retained":false,"historicalAffected":[]},{"revision":"fb3a40cf9f9e42249000191af30138be","observedAt":"2026-11-04T03:59:15.952+00:00","statement":{"source":"osv","id":"GHSA-c8jx-96c9-8xrp","aliases":["CVE-2026-63742"],"title":"SurrealDB: Field-level SELECT permissions bypassed via indexed COUNT fast paths","description":"A record user could learn the value of a hidden field by counting how many records match a guess.\n\nWhen `DEFINE FIELD ... PERMISSIONS FOR select WHERE ...` hides a field's contents from a caller, and that field is indexed, running `SELECT count() FROM t WHERE hidden_field = \"guess\" GROUP ALL` returned a count greater than zero whenever a record actually had that value — even though the caller was never allowed to read the field directly. The query planner used an indexed-COUNT shortcut (`Index::Count`, `IndexCountScan`, or the legacy `Iterate Index Count` / `Iterate Index Keys` paths) that counts matching index entries and skips the permission check that would normally hide the value. The same query with `WITH NOINDEX` correctly returned `[]`, confirming the gap.\n\nBy repeating the count query with different guesses, an attacker can confirm or recover the contents of any restricted field they could not read through a normal `SELECT`.\n\n### Impact\n\nWhat an attacker **can** do:\n\n- Confirm or recover values of a field protected by field-level SELECT permissions on any table they hold table-level SELECT on, provided the field is indexed.\n- Repeat the query with different guesses to read restricted field contents one value at a time.\n\nWhat it **can't** do:\n\n- Read fields that are not indexed (the shortcut only fires when an index covers the predicate column).\n- Cross table, database or namespace isolation boundaries.\n- Modify data, escalate privileges, or affect availability.\n\n### Patches\n\nThe legacy planner (`surrealdb/core/src/idx/planner/tree.rs`) and the streaming planner (`surrealdb/core/src/exec/planner/select/mod.rs`) now both refuse the indexed fast path when the WHERE / ORDER tree references a field governed by a non-`Full` SELECT permission:\n\n- `resolve_indexes` skips any B-tree / unique index whose columns are governed by such a permission.\n- A new `cond_touches_restricted_field` flag is propagated; `eval_count` refuses a dedicated `Index::Count` when set.\n- The streaming planner adds `cond_touches_restricted_select_field`, a `RestrictedIdiomChecker` visitor that matches each idiom against the table's field-permission prefixes (loaded via the plan-time txn), and gates `IndexCountScan` emission on it.\n- The fast paths are preserved for root / owner sessions via `should_check_perms_for_view`.\n\nVersions 3.1.0 and later are not affected.\n\n### Workarounds\n\nUsers unable to patch are advised to consider the following workarounds:\n\n- Avoid `DEFINE INDEX` on fields whose values are protected by field-level SELECT permissions. The class of attack is specific to the indexed fast paths.\n- Restrict the ability of record users to issue arbitrary `SELECT count() … GROUP ALL` queries against tables containing field-protected columns.\n- Use namespace / database isolation as the primary boundary where feasible.","state":0,"publishedAt":"2026-07-01T20:22:06+00:00","modifiedAt":"2026-11-04T02:56:13.1284055+00:00","affected":[{"ecosystem":"crates.io","name":"surrealdb","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"3.1.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-c8jx-96c9-8xrp","https://github.com/surrealdb/surrealdb/pull/240","https://github.com/surrealdb/surrealdb/commit/0c6dd021bb55b32a78a553c72bb9c0cdd414825f","https://github.com/surrealdb/surrealdb"],"sourceUrl":"https://github.com/advisories/GHSA-c8jx-96c9-8xrp","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-c8jx-96c9-8xrp","identifiers":["GHSA-c8jx-96c9-8xrp","CVE-2026-63742"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-24T01:35:04.8725245+00:00","complete":true,"records":1792,"lastAttemptAt":"2026-11-24T01:35:04.8725245+00:00","lastSuccessAt":"2026-11-24T01:35:05.0385464+00:00","error":null,"lastVerifiedAt":"2026-11-24T01:35:05.0385465+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-f6e4a7f93ed9acd6fcb1f804a4567f7b9b16730ac126110af8d6d24176317946-8739c76e681f900923b900c9df0ef75cf421d39cabb54650c4b9ad19b6a76d85","complete":true,"records":430969,"lastAttemptAt":"2026-11-24T01:35:03.7450335+00:00","lastSuccessAt":"2026-11-24T01:35:03.7398709+00:00","error":null,"lastVerifiedAt":"2026-11-24T01:35:03.7450335+00:00","snapshotPublishedAt":"2026-11-24T00:38:02+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-a7ac8a6a216343ecaf7f865000131f6a","complete":false,"records":13935,"lastAttemptAt":"2026-11-24T01:36:10.7613878+00:00","lastSuccessAt":"2026-11-24T01:36:10.831174+00:00","error":null,"lastVerifiedAt":"2026-11-24T01:36:10.831174+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-24T01:35:04.8725245+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-24T01:35:04.8725245+00:00","lastSuccessAt":"2026-11-24T01:35:05.0393131+00:00","error":null,"lastVerifiedAt":"2026-11-24T01:35:05.0393132+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-8c33077d0c904a2e95d5c5fe37c4221a","complete":true,"records":13947,"lastAttemptAt":"2026-11-24T01:35:25.5402562+00:00","lastSuccessAt":"2026-11-24T01:35:25.536+00:00","error":null,"lastVerifiedAt":"2026-11-24T01:35:25.536+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13982,"expectedIdentifiers":13982,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c86437892ddabdeaf17409463a17578b1e71dd185d64061100dd57629858f6d6","complete":true,"records":10074,"lastAttemptAt":"2026-11-24T01:35:04.3764802+00:00","lastSuccessAt":"2026-11-23T22:27:19.6557603+00:00","error":null,"lastVerifiedAt":"2026-11-24T01:35:04.3764802+00:00","snapshotPublishedAt":"2026-11-23T21:33:52+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-24T01:35:03.8804046+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-24T01:35:03.8804046+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-15e801f03affdaac7ba10268556f4d0b3e1b9f897dae85fdcade5fc30d25011c","complete":true,"records":3217,"lastAttemptAt":"2026-11-24T01:35:04.7835805+00:00","lastSuccessAt":"2026-11-23T17:27:41.2539213+00:00","error":null,"lastVerifiedAt":"2026-11-24T01:35:04.7835805+00:00","snapshotPublishedAt":"2026-11-23T16:18:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-c41399423d276dca4b043be850730e8108fe6ab724d5bef1a99daeb4f8074e30","complete":true,"records":232938,"lastAttemptAt":"2026-11-24T01:35:04.2718053+00:00","lastSuccessAt":"2026-11-24T00:27:03.6308807+00:00","error":null,"lastVerifiedAt":"2026-11-24T01:35:04.2718053+00:00","snapshotPublishedAt":"2026-11-23T23:48:45+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}