
Abhishek M (Community Member) asked a question.
We have a query regarding Authorization Bypass Through User-Controlled SQL Primary Key (CWE ID 566). We are getting this flaw at the DAO layer.
Hi Team,
We have a query regarding Authorization Bypass Through User-Controlled SQL Primary Key (CWE ID 566). We are getting this flaw at the DAO layer. So we wanted to check if we can utilize the session parameter which we are retrieving from the HttpServletRequest object at the controller layer for authorizing the user at the dao layer?
.png)
Hi Abhishek!
If you're conducting an authorization check to ensure the user has access to perform the action and view the associated records, that should help reduce the risk. It’s likely that any implementation will still flag as a potential issue, so you’ll probably need to document a mitigation strategy. If you have further questions or need more tailored guidance, consider scheduling a consultation call to go over specific examples and discuss your implementation in detail.
https://docs.veracode.com/r/t_schedule_consultation