Summary
Manticore Search does not consistently enforce permissions across every statement in a multi-statement SQL request, allowing read-only users to perform unauthorized queries. An attacker who can submit such a request may read credential data, obtain password hashes, and potentially authenticate as an administrator without recovering plaintext passwords.
Affected context
The issue occurs in Manticore Search deployments that permit multi-statement SQL requests while applying authorization checks only to the initial statement. It becomes risky when a lower-privileged account can submit additional statements and the database exposes credential or other sensitive tables to the affected query path.
Exploit preconditions
- Attack surface: SQL query interface that accepts multi-statement requests
- Required access: An authenticated account with at least read-only database access
- Trigger point: Processing additional statements appended to an otherwise permitted request
- Why exploitation is possible: Authorization checks are not consistently applied to every statement in the request
- Additional condition: Sensitive credential records must be readable through the accessible query context
Why this happens
The underlying bug is an incomplete authorization model for batched or multi-statement SQL requests. The system validates the permission for one statement but fails to independently authorize subsequent statements, allowing a lower-privileged principal to perform operations outside its intended scope. This behavior maps to CWE-863, Improper Authorization, because access-control decisions do not consistently enforce the user's granted permissions.
Potential impact
- Attackers may read credential tables or other restricted data
- Password hashes could be disclosed
- Compromised hashes may enable authentication as administrative users
- Unauthorized users could gain broader access to search data and management functions
- Sensitive information may be exposed or used for follow-on account compromise
General mitigation guidance
Mitigation generally focuses on making authorization decisions statement-aware
and enforcing least privilege throughout the query-processing pipeline.
Common defensive patterns include:
- Authorizing every statement independently rather than trusting the first statement
- Disabling multi-statement requests for roles that do not require them
- Applying strict allowlists for permitted SQL operations and accessible objects
- Restricting direct access to credential and system tables
- Storing authentication material with appropriate protection and minimizing its query exposure
- Using separate, least-privileged accounts for read-only workloads
- Enforcing authentication, network boundaries, and administrative access controls
How teams detect issues like this
Organizations can look for this weakness through:
- Static analysis and code review of authorization logic around SQL batching and statement splitting
- Tests that submit mixed-permission multi-statement requests under each database role
- Policy checks confirming that sensitive tables are inaccessible to read-only principals
- Query auditing for unexpected access to credential tables or administrative objects
- Monitoring for authentication activity involving accounts or credentials outside normal usage patterns
- Automated security testing that verifies authorization is applied consistently to every parsed statement

