Second Order
Last updated
Was this helpful?
Last updated
Was this helpful?
This allows attackers to inject malicious SQL code that may not be immediately executed but can be triggered later, potentially leading to unauthorized access or data manipulation.
Use prepared statements and parameterized queries throughout the application, validate and sanitize all user inputs, and review and secure data storage and retrieval processes to prevent injection at all stages.
The example below is based on TCM's course.
The application has a Sign Up
and a Login
functionality (Figure 1).
If we go step through the functionality as intented, i.e., registering a user and then logging in with that user, we will notice that the username gets reflected in the dashboard (Figure 2).
We can try registering using a common SQLi payload instead of a normal username and check if this has any effect when we log in (Figure 3).
Sign Up
and Login
flows.