{"id":"GHSA-8rw6-p7m8-63jp","revision":null,"records":[{"revision":"adc2fcfaeb204339bc2bb6fc93c0edd9","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-63740","aliases":[],"title":"SurrealDB before 3.1.4 Array Element Permission Bypass","description":"SurrealDB versions before 3.1.4 fail to properly enforce SELECT permissions on array elements (field.*) for record users, leaking denied array elements instead of hiding them. Attackers with record scope access can read array elements that element-level permissions should deny by exploiting incorrect index handling during permission filtering.","state":0,"publishedAt":"2026-07-20T12:04:34.904+00:00","modifiedAt":"2026-07-28T01:05:36.685+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.4\"\n                        },\n                        {\n                            \"version\": \"3.1.4\",\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:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":7.1,"severity":"HIGH"},{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"severity":"MEDIUM"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-8rw6-p7m8-63jp","https://www.vulncheck.com/advisories/surrealdb-before-array-element-permission-bypass"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-63740","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-63740","identifiers":["CVE-2026-63740"]},"retained":false,"historicalAffected":[]},{"revision":"65c5cb0b2910492db54dd471132f633d","observedAt":"2026-11-17T17:39:40.372+00:00","statement":{"source":"euvd","id":"EUVD-2026-45911","aliases":["CVE-2026-63740","GHSA-j6mj-v752-pp4x"],"title":"SurrealDB versions before 3.1.4 fail to properly enforce SELECT permissions on array elements (field.*) for record users, leaking denied array elements instead of hiding them. Attackers with record scope access can read array elements that …","description":"SurrealDB versions before 3.1.4 fail to properly enforce SELECT permissions on array elements (field.*) for record users, leaking denied array elements instead of hiding them. Attackers with record scope access can read array elements that element-level permissions should deny by exploiting incorrect index handling during permission filtering.","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:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":7.1,"severity":null}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-8rw6-p7m8-63jp","https://www.vulncheck.com/advisories/surrealdb-before-array-element-permission-bypass"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-45911","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jul 20, 2026, 12:04:34 PM","dateUpdated":"Jul 28, 2026, 1:05:36 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-45911","identifiers":["EUVD-2026-45911","CVE-2026-63740","GHSA-j6mj-v752-pp4x"]},"retained":false,"historicalAffected":[]},{"revision":"bad76a46564a4c45ac520443851e3a8d","observedAt":"2026-10-25T15:18:45.851+00:00","statement":{"source":"nvd","id":"CVE-2026-63740","aliases":[],"title":"SurrealDB versions before 3.1.4 fail to properly enforce SELECT permissions on array elements (field.*) for record users, leaking denied array elements instead of hiding them. Attackers with record scope access can read array elements that …","description":"SurrealDB versions before 3.1.4 fail to properly enforce SELECT permissions on array elements (field.*) for record users, leaking denied array elements instead of hiding them. Attackers with record scope access can read array elements that element-level permissions should deny by exploiting incorrect index handling during permission filtering.","state":0,"publishedAt":"2026-07-20T12:19:43.287+00:00","modifiedAt":"2026-07-22T15:48:36.197+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:H/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":7.1,"severity":"HIGH"},{"system":"CVSS 3.1 · disclosure@vulncheck.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"severity":"MEDIUM"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-8rw6-p7m8-63jp","https://www.vulncheck.com/advisories/surrealdb-before-array-element-permission-bypass"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-63740","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.287","lastModified":"2026-07-22T15:48:36.197"},"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-63740","identifiers":["CVE-2026-63740"]},"retained":false,"historicalAffected":[]},{"revision":"8850a734a73741929974af664685dc49","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-8rw6-p7m8-63jp","aliases":["CVE-2026-63740"],"title":"SurrealDB: Array element-level (field.*) SELECT permissions leak denied elements to record users","description":"A `SELECT` permission defined on an array element (`DEFINE FIELD field.* … PERMISSIONS FOR select …`) is not enforced correctly for `RECORD` users. Instead of hiding the denied elements, the query leaks a subset of them: a deny-all returns the odd-indexed elements, and a per-element predicate keeps and drops the wrong ones.\n\nThe filter removed each denied element by index while walking the array forwards. Because removing an element shifts every later index down, each cut invalidated the indices still pending in the loop, leaving denied elements behind. Field-level permissions are enforced correctly; only the element (`field.*`) level is affected, and only for record users — root and record-owner sessions are not.\n\n## Impact\n\nWhat an attacker **can** do:\n\n- As a record (scope) user, read array elements that an element-level (`field.*`) SELECT permission should hide, on any table they can already SELECT.\n- Recover denied elements through both a deny-all and a `WHERE` predicate — the wrong elements are selected either way.\n\nWhat it **can't** do:\n\n- Bypass field-level SELECT permissions, which are evaluated correctly.\n- Affect root or record-owner sessions, or cross namespace/database isolation.\n- Modify data, escalate privileges, or affect availability (confidentiality only).\n\n## Patches\n\nThe three permission-filtering paths (`doc/reduce.rs`, `doc/output.rs`, `exec/operators/scan/pipeline.rs`) now remove denied elements in reverse index order, so removing one element no longer shifts the elements still to be checked. Regression tests reproducing the issue were added.\n\nThe fix is included in SurrealDB 3.1.4.\n\n## Workarounds\n\n- Do not rely on element-level (`field.*`) permissions to hide data from record users; use field-level permissions, which are enforced correctly.\n- Restrict record users from selecting tables whose schema uses element-level permissions.\n\n## Resources\n\n- [DEFINE FIELD](https://surrealdb.com/docs/surrealql/statements/define/field)\n- [USERS](https://surrealdb.com/docs/learn/security/authentication/authentication)\n- [DEFINE TABLE … PERMISSIONS](https://surrealdb.com/docs/surrealql/statements/define/table)\n- `fix(sec): stop array element-level SELECT permissions leaking elements` (commit `8f89b260b`)","state":0,"publishedAt":"2026-08-14T19:40:48+00:00","modifiedAt":"2026-09-04T20:10:35.920119+00:00","affected":[{"ecosystem":"crates.io","name":"surrealdb","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"3.1.4"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/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-8rw6-p7m8-63jp","https://nvd.nist.gov/vuln/detail/CVE-2026-63740","https://github.com/surrealdb/surrealdb/commit/8f89b260bb9692e5b0d58930793d482a8207eedc","https://github.com/surrealdb/surrealdb","https://www.vulncheck.com/advisories/surrealdb-before-array-element-permission-bypass"],"sourceUrl":"https://github.com/advisories/GHSA-8rw6-p7m8-63jp","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-8rw6-p7m8-63jp","identifiers":["GHSA-8rw6-p7m8-63jp","CVE-2026-63740"]},"retained":false,"historicalAffected":[]},{"revision":"087ae6bddc324fddb51ea1d74f68ffb9","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-j6mj-v752-pp4x","aliases":[],"title":"Duplicate Advisory: SurrealDB: Array element-level (field.*) SELECT permissions leak denied elements to record users","description":"## Duplicate Advisory\n\nThis advisory has been withdrawn because it is a duplicate of\u00A0GHSA-8rw6-p7m8-63jp. This link is maintained to preserve external references.\n\n## Original Description\nSurrealDB versions before 3.1.4 fail to properly enforce SELECT permissions on array elements (field.*) for record users, leaking denied array elements instead of hiding them. Attackers with record scope access can read array elements that element-level permissions should deny by exploiting incorrect index handling during permission filtering.","state":2,"publishedAt":"2026-07-20T12:33:08+00:00","modifiedAt":"2026-09-04T20:00:28.2335336+00:00","affected":[{"ecosystem":"crates.io","name":"surrealdb","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"last_affected","version":"3.1.3"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":null,"severity":null},{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/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":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-8rw6-p7m8-63jp","https://nvd.nist.gov/vuln/detail/CVE-2026-63740","https://www.vulncheck.com/advisories/surrealdb-before-array-element-permission-bypass"],"sourceUrl":"https://github.com/advisories/GHSA-j6mj-v752-pp4x","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-j6mj-v752-pp4x","identifiers":["GHSA-j6mj-v752-pp4x"]},"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-19T13:59:38.0220724+00:00","complete":true,"records":1786,"lastAttemptAt":"2026-11-19T13:59:38.0220724+00:00","lastSuccessAt":"2026-11-19T13:59:38.3751697+00:00","error":null,"lastVerifiedAt":"2026-11-19T13:59:38.3753216+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-e55c589538e0700b45c7d6d41fe1447a79199283262c371c864535c791a040b9-139b33c18373676a973fe9182aec8a3691d9b11c7b42e245543a606871b8ef68","complete":true,"records":428483,"lastAttemptAt":"2026-11-19T13:59:36.944265+00:00","lastSuccessAt":"2026-11-19T13:40:15.6982314+00:00","error":null,"lastVerifiedAt":"2026-11-19T13:59:36.944265+00:00","snapshotPublishedAt":"2026-11-19T13:24: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-ae6c004e7d4446a3b24b12d5e4f85da8","complete":false,"records":13861,"lastAttemptAt":"2026-11-19T14:05:06.3953584+00:00","lastSuccessAt":"2026-11-19T14:05:06.391+00:00","error":"238 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-19T14:05:06.391+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13670,"expectedIdentifiers":13908,"failedIdentifiers":238},{"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-19T13:59:38.0220724+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-19T13:59:38.0220724+00:00","lastSuccessAt":"2026-11-19T13:59:38.4804896+00:00","error":null,"lastVerifiedAt":"2026-11-19T13:59:38.4804901+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-66078286355a487e841d6e6e3b3f67f3","complete":true,"records":13873,"lastAttemptAt":"2026-11-19T13:59:39.8610471+00:00","lastSuccessAt":"2026-11-19T13:41:59.829+00:00","error":null,"lastVerifiedAt":"2026-11-19T13:41:59.829+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13908,"expectedIdentifiers":13908,"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-76574c95b6792d47ba90af64983ed5843633f14426346d676016e94a5f383202","complete":true,"records":9963,"lastAttemptAt":"2026-11-19T13:59:37.4102656+00:00","lastSuccessAt":"2026-11-19T01:24:31.4213722+00:00","error":null,"lastVerifiedAt":"2026-11-19T13:59:37.4102656+00:00","snapshotPublishedAt":"2026-11-19T01:03:15+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-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-19T13:59:37.1621626+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-19T13:59:37.1621626+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+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-313d8afdba3867de110bc2f0cc252c7b787cb94e08a055d09b0542017e147ca8","complete":true,"records":3194,"lastAttemptAt":"2026-11-19T13:59:37.5525506+00:00","lastSuccessAt":"2026-11-19T09:40:31.5988269+00:00","error":null,"lastVerifiedAt":"2026-11-19T13:59:37.5525506+00:00","snapshotPublishedAt":"2026-11-19T09:03:08+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-e2a5d5b457bf00210b88384778af42f87dedd32a57cbf9118572d3d2fabc062c","complete":true,"records":232733,"lastAttemptAt":"2026-11-19T13:59:37.2994305+00:00","lastSuccessAt":"2026-11-19T13:41:57.1937409+00:00","error":null,"lastVerifiedAt":"2026-11-19T13:59:37.2994305+00:00","snapshotPublishedAt":"2026-11-19T13:33:30+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}