DB-005 critical general
App user cannot DROP DATABASE
Application database user must not have DROP privilege. Verify via SHOW GRANTS output.
Question to ask
"Could a SQL injection bug wipe your entire database?"
Verification guide
Severity: Critical
This is a guided manual check.
Prompt user:
Please provide the
SHOW GRANTSoutput for the application database user.For PostgreSQL:
\du app_useror checkpg_rolesFor MySQL:
SHOW GRANTS FOR 'app_user'@'%';
Verify:
- No
DROPprivilege on database level - No
ALL PRIVILEGESon database level - Ideally limited to: SELECT, INSERT, UPDATE, DELETE on specific tables
Pass criteria:
- App user cannot DROP DATABASE
- Permissions are scoped to necessary operations only
Fail criteria:
- DROP privilege exists
- ALL PRIVILEGES granted at database level
Evidence to capture:
- GRANTS output for app user
- Confirmation of restricted permissions
Cross-reference with:
- DB-004 (should be one of the documented users)