This vulnerability occurs when an application allows a user to directly control the primary key value used in a SQL query, enabling them to access database records they are not authorized to view.
This flaw typically unfolds in three steps: first, user-supplied data from an untrusted source (like a URL parameter or form field) is accepted without proper validation. Second, this data is directly used to specify a primary key in a SQL statement, such as in a `WHERE` clause. Finally, because the database query does not enforce additional row-level permissions, the user can manipulate the key to retrieve or modify records belonging to other users, effectively bypassing the application's intended authorization checks. Preventing this requires implementing proper access control at the data layer, such as adding checks to ensure the requested record belongs to the current user's session. Managing this at scale is difficult; an ASPM like Plexicus can help you track and remediate these authorization flaws across your entire stack by correlating user flows with data access patterns.
Impact: Read Application DataModify Application DataBypass Protection Mechanism
c#