CWE-566βAuthorization Bypass Through User-Controlled SQL Primary Key
PUBLISHEDweakness record
released 2006-07-19 Β· last modified 2025-12-11
Metadata
Weakness Name
Authorization Bypass Through User-Controlled SQL Primary Key
Description
The product uses a database table that includes records that should not be accessible to an actor, but it executes a SQL statement with a primary key that can be controlled by that actor.
When a user can set a primary key to any value, then the user can modify the key to point to unauthorized records. Database access control errors occur when: