{"id":"GHSA-66r2-5gwj-gxm2","revision":null,"records":[{"revision":"b71eb34eb1cd4e98a6229c6a651728fd","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-63733","aliases":[],"title":"SurrealDB before 3.2.0 Permissions Bypass via PERMISSIONS Clause","description":"SurrealDB versions before 3.2.0 contain a permissions bypass vulnerability where data-modifying statements within PERMISSIONS clauses execute with enforcement disabled. Attackers with permission to perform a guarded operation can write to tables they lack permission for by embedding CREATE, UPDATE, DELETE, or UPSERT statements in the PERMISSIONS clause, causing unintended writes and data corruption.","state":0,"publishedAt":"2026-07-20T12:04:30.055+00:00","modifiedAt":"2026-07-28T01:05:31.722+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-core\",\n                    \"versions\": [\n                        {\n                            \"version\": \"0\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\",\n                            \"lessThan\": \"3.2.0\"\n                        },\n                        {\n                            \"version\": \"3.2.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:N/VI:L/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:N/I:L/A:N","score":4.3,"severity":"MEDIUM"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-66r2-5gwj-gxm2","https://www.vulncheck.com/advisories/surrealdb-before-permissions-bypass-via-permissions-clause"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-63733","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-63733","identifiers":["CVE-2026-63733"]},"retained":false,"historicalAffected":[]},{"revision":"fc20d53dcce04b21ab7d442ad566c339","observedAt":"2026-11-17T17:39:35.697+00:00","statement":{"source":"euvd","id":"EUVD-2026-45904","aliases":["CVE-2026-63733","GHSA-6g69-7xmf-h2x7","GHSA-66r2-5gwj-gxm2"],"title":"SurrealDB versions before 3.2.0 contain a permissions bypass vulnerability where data-modifying statements within PERMISSIONS clauses execute with enforcement disabled. Attackers with permission to perform a guarded operation can write to t…","description":"SurrealDB versions before 3.2.0 contain a permissions bypass vulnerability where data-modifying statements within PERMISSIONS clauses execute with enforcement disabled. Attackers with permission to perform a guarded operation can write to tables they lack permission for by embedding CREATE, UPDATE, DELETE, or UPSERT statements in the PERMISSIONS clause, causing unintended writes and data corruption.","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:N/VI:L/VA:N/SC:N/SI:N/SA:N","score":5.3,"severity":null}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-66r2-5gwj-gxm2","https://www.vulncheck.com/advisories/surrealdb-before-permissions-bypass-via-permissions-clause"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-45904","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jul 20, 2026, 12:04:30 PM","dateUpdated":"Jul 28, 2026, 1:05:31 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-45904","identifiers":["EUVD-2026-45904","CVE-2026-63733","GHSA-6g69-7xmf-h2x7","GHSA-66r2-5gwj-gxm2"]},"retained":false,"historicalAffected":[]},{"revision":"e41129a0bfa6482d8818b47a32e5b7cc","observedAt":"2026-10-25T15:18:45.851+00:00","statement":{"source":"nvd","id":"CVE-2026-63733","aliases":[],"title":"SurrealDB versions before 3.2.0 contain a permissions bypass vulnerability where data-modifying statements within PERMISSIONS clauses execute with enforcement disabled. Attackers with permission to perform a guarded operation can write to t…","description":"SurrealDB versions before 3.2.0 contain a permissions bypass vulnerability where data-modifying statements within PERMISSIONS clauses execute with enforcement disabled. Attackers with permission to perform a guarded operation can write to tables they lack permission for by embedding CREATE, UPDATE, DELETE, or UPSERT statements in the PERMISSIONS clause, causing unintended writes and data corruption.","state":0,"publishedAt":"2026-07-20T12:19:42.243+00:00","modifiedAt":"2026-07-22T15:53:24.56+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:N/VI:L/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:N/I:L/A:N","score":4.3,"severity":"MEDIUM"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","score":6.5,"severity":"MEDIUM"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-66r2-5gwj-gxm2","https://www.vulncheck.com/advisories/surrealdb-before-permissions-bypass-via-permissions-clause"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-63733","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:42.243","lastModified":"2026-07-22T15:53:24.560"},"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-63733","identifiers":["CVE-2026-63733"]},"retained":false,"historicalAffected":[]},{"revision":"4f62426e21a6455582f0e07f9bce8bf5","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-66r2-5gwj-gxm2","aliases":["CVE-2026-63733"],"title":"SurrealDB: Writes in a PERMISSIONS clause bypass table permissions","description":"A `PERMISSIONS ... WHERE` clause is evaluated with permission enforcement disabled, so it can't recurse into its own checks. But the clause could also contain data-modifying statements, and these ran with enforcement still off — so evaluating a permission check could write to tables the caller cannot write.\n\nFor example:\n\n```surql\nDEFINE TABLE post PERMISSIONS FOR update\n    WHERE (CREATE log SET at = time::now()) OR true;\n```\n\nAny user allowed to update a `post` now also creates a `log` record, even with no permission on `log`. The clause is evaluated once per matched record, so one statement can cause several writes.\n\n### Impact\n\nOnly databases with a `PERMISSIONS` clause that contains a write are affected; `FULL`, `NONE`, and read-only clauses are not.\n\nWhat an attacker **can** do:\n\n- With permission to perform the guarded operation (a low-privileged or record user is enough), write to tables in their own database that their permissions would otherwise forbid, by triggering an operation the clause guards.\n- Cause several writes from a single statement — the clause is evaluated once per matched record.\n- Trigger unintended events, cascades, or data corruption on those tables.\n\nWhat it **can't** do:\n\n- Escape the caller's own namespace and database — a permission clause cannot switch namespace or database.\n- Perform root- or namespace-level actions such as creating users; the caller's role still applies.\n- Read hidden data — this is an integrity issue, not disclosure.\n\n### Patches\n\nPermission clauses must now be read-only: defining or importing one that contains a write is rejected, and any write attempted while a clause is evaluated is blocked at runtime, including writes reached through a called function. Read-only clauses are unaffected.\n\n- Versions 3.2.0 and later are not affected by this issue.\n\n### Workarounds\n\nUsers unable to patch should consider the following workarounds:\n\n- Review your `PERMISSIONS` clauses and remove any containing `CREATE`, `UPDATE`, `DELETE`, `RELATE`, `INSERT`, or `UPSERT`.\n- Limit who can define schema and vet imported data — such a clause must be defined before it can be triggered.\n\n### Resources\n\n- [DEFINE TABLE … PERMISSIONS](https://surrealdb.com/docs/surrealql/statements/define/table)\n- [DEFINE FIELD](https://surrealdb.com/docs/surrealql/statements/define/field)\n- `fix(core): reject writes in PERMISSIONS clauses and block writes during permission evaluation` (included in SurrealDB 3.2.0)\n\n### Acknowledgements\n\nThank you to [sondt99](https://github.com/sondt99) for reporting this issue.","state":0,"publishedAt":"2026-09-04T20:50:40+00:00","modifiedAt":"2026-09-04T21:10:34.732142+00:00","affected":[{"ecosystem":"crates.io","name":"surrealdb-core","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"3.2.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-66r2-5gwj-gxm2","https://nvd.nist.gov/vuln/detail/CVE-2026-63733","https://github.com/surrealdb/surrealdb/commit/1e4c3d743e1591f14f340cb627e56d98b6bd7fd7","https://github.com/surrealdb/surrealdb/commit/afea699dfb3c8f274ab36861f8a95f5e98d82f1b","https://github.com/surrealdb/surrealdb","https://github.com/surrealdb/surrealdb/releases/tag/v3.2.0","https://www.vulncheck.com/advisories/surrealdb-before-permissions-bypass-via-permissions-clause"],"sourceUrl":"https://github.com/advisories/GHSA-66r2-5gwj-gxm2","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-66r2-5gwj-gxm2","identifiers":["GHSA-66r2-5gwj-gxm2","CVE-2026-63733"]},"retained":false,"historicalAffected":[]},{"revision":"1a851ecb84f54e999ed12fa14dae7e6b","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-6g69-7xmf-h2x7","aliases":[],"title":"Duplicate Advisory: Writes in a PERMISSIONS clause bypass table permissions","description":"## Duplicate Advisory\n\nThis advisory has been withdrawn because it is a duplicate of\u00A0GHSA-66r2-5gwj-gxm2. This link is maintained to preserve external references.\n\n## Original Description\nSurrealDB versions before 3.2.0 contain a permissions bypass vulnerability where data-modifying statements within PERMISSIONS clauses execute with enforcement disabled. Attackers with permission to perform a guarded operation can write to tables they lack permission for by embedding CREATE, UPDATE, DELETE, or UPSERT statements in the PERMISSIONS clause, causing unintended writes and data corruption.","state":2,"publishedAt":"2026-07-20T12:33:08+00:00","modifiedAt":"2026-09-04T21:00:06.7120575+00:00","affected":[{"ecosystem":"crates.io","name":"surrealdb","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","score":null,"severity":null},{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/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":"MODERATE"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-66r2-5gwj-gxm2","https://nvd.nist.gov/vuln/detail/CVE-2026-63733","https://www.vulncheck.com/advisories/surrealdb-before-permissions-bypass-via-permissions-clause"],"sourceUrl":"https://github.com/advisories/GHSA-6g69-7xmf-h2x7","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-6g69-7xmf-h2x7","identifiers":["GHSA-6g69-7xmf-h2x7"]},"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}]}