Description
SurrealDB 3.0.0 before 4.0.0 contains an authorization bypass that allows users with the read-only VIEWER role to modify database schema, because CREATE on a nonexistent table implicitly defines it without the DEFINE TABLE permission check applied to explicit definitions. Authenticated VIEWER users can issue CREATE statements in non-STRICT databases to add arbitrary empty SCHEMALESS tables, cluttering schemas or colliding with application table names.
Affected products and versions
surrealdb surrealdb3.0.0 – < 4.0.0Fixed in: 4.0.0
CVSS vector, explained
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
- Attack vector
- Network (from the internet)
- Attack complexity
- Low
- Privileges required
- Regular user
- User interaction
- Not required
- Scope
- Vulnerable component only
- Confidentiality
- None
- Integrity
- Low impact
- Availability
- None
Weakness type (CWE)
- CWE-862 Missing Authorization
References
- github.com/surrealdb/surrealdb/security/advisories/GHSA-m887-2246-mgw3 vendor advisory
- www.vulncheck.com/advisories/surrealdb-3.0.0-before-4.0.0-viewer-role-authorization-bypass
Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.