Summary
SurrealDB has Silent Failure to Overwrite Table Definition of Relation Type
The OVERWRITE clause of the DEFINE TABLE statement would fail to overwrite data for tables that were defined with TYPE RELATION. Since table definitions include the PERMISSIONS clause, this failure would result in permissions not being overwritten as a result, which may potentially lead users to believe they have changed the table permissions when they have not.
Workarounds
Users of tables with TYPE RELATION that may have been modified using the OVERWRITE clause in order to update permissions are advised to verify that the intended permissions are in place using the INFO FOR DB statement. Affected users who are unable to update and require updating permissions in a table with TYPE RELATION will be required to remove the table and define it from scratch with the intended permissions. Data can be preserved by backing it up to a temporary table.
References
- #5260
Impact
If a user attempted to update table permissions of a table defined with TYPE RELATION using DEFINE TABLE ... OVERWRITE, permissions for the table would not be changed. This may allow a client that is authorized to run queries in a SurrealDB server to access certain data in that specific table that they were not intended to be able to access after the specified change in permissions.
A file, directory, or other resource is assigned permissions that allow broader access than intended. Typical impact: unauthorized read, modification, or execution of the resource.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
The DEFINE TABLE statement has been updated to appropriately overwrite data for tables defined with TYPE RELATION.
- Version 2.1.4 and later are not affected by this issue.
Frequently Asked Questions
- What is GHSA-27VQ-HV74-7CQP? GHSA-27VQ-HV74-7CQP is a low-severity incorrect permission assignment for critical resource vulnerability in surrealdb (rust), affecting versions >= 2.0.0, < 2.1.4. It is fixed in 2.1.4. A file, directory, or other resource is assigned permissions that allow broader access than intended.
- Which packages are affected by GHSA-27VQ-HV74-7CQP?
surrealdb(rust) (versions >= 2.0.0, < 2.1.4)surrealdb-core(rust) (versions >= 2.0.0, < 2.1.4)
- Is there a fix for GHSA-27VQ-HV74-7CQP? Yes. GHSA-27VQ-HV74-7CQP is fixed in 2.1.4. Upgrade to this version or later.
- Is GHSA-27VQ-HV74-7CQP exploitable, and should I be worried? Whether GHSA-27VQ-HV74-7CQP is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-27VQ-HV74-7CQP is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-27VQ-HV74-7CQP?
- Upgrade
surrealdbto 2.1.4 or later - Upgrade
surrealdb-coreto 2.1.4 or later
- Upgrade