Summary
StarRocks does not consistently enforce authorization when an authenticated account drops a legacy synchronous materialized view. Because this object is represented as a rollup index rather than a standalone materialized-view object, an account without grants on the view, base table, or database may be able to remove it.
Affected context
The issue occurs in StarRocks when a drop-materialized-view request targets a legacy synchronous materialized view. These views are stored as rollup indexes on an OlapTable, causing execution to follow a path that validates table state and naming conditions but does not invoke the normal authorization check. The risk depends on the account being authenticated and the affected legacy view being reachable through the relevant database and table metadata.
Exploit preconditions
- Attack surface: Materialized-view management statements exposed by the StarRocks SQL interface
- Required access: Any authenticated StarRocks account able to submit the relevant statement; grants on the view, base table, or database may not be required
- Trigger point: Processing a request to drop a legacy synchronous materialized view
- Why exploitation is possible: The authorization visitor returns before checking permissions, and the legacy rollup-index execution path does not perform a compensating privilege check
Why this happens
The vulnerability is caused by an authorization gap created by inconsistent control flow for related object types. The statement-level authorization layer defers validation to execution, but the execution path for legacy synchronous materialized views is distinct from the path used for asynchronous materialized views and lacks an equivalent permission check. This behavior maps to CWE-862: Missing Authorization, because a sensitive management operation can proceed without verifying whether the requesting principal has the required authority.
Potential impact
- An unauthorized account may delete legacy synchronous materialized views
- Query performance or workload behavior could be degraded when dependent views are removed
- Derived or precomputed data may become unavailable
- Database object integrity and administrative audit expectations could be undermined
- The operation could be indistinguishable from an authorized deletion in environments lacking detailed policy-aware monitoring
General mitigation guidance
Mitigation generally focuses on enforcing authorization consistently at every execution path for sensitive metadata operations.
Common defensive patterns include:
- Requiring an explicit privilege check immediately before materialized-view deletion
- Applying equivalent authorization rules to both asynchronous materialized views and legacy rollup-index representations
- Centralizing permission enforcement so alternate object-resolution branches cannot bypass it
- Denying management operations by default unless the principal has the required database, table, or view authority
- Preserving audit records that identify the principal, target object, authorization decision, and operation result
- Limiting administrative SQL access and separating routine query privileges from schema-management privileges
How teams detect issues like this
Organizations can look for this weakness through:
- Static analysis that identifies statement visitors returning before authorization and execution methods lacking permission checks
- Code review of all alternate branches for object types represented differently in metadata
- Tests that submit destructive metadata operations using accounts with no grants on the target or its containing database
- Policy checks requiring authorization before every drop, alter, or rename operation
- Audit-log monitoring for materialized-view deletions by principals without corresponding administrative permissions
Automated security review tools may help identify missing checks, but coverage should include authorization-flow and negative-permission tests.

