← back to room
SQL Injection
Second-Order SQLi
Scenario
TalentBoard stores your profile bio verbatim for later admin searches. The admin search tool builds a query by concatenating your stored text. Save a bio that stays quiet on edit but alters the search query when reviewed.
Your approach
- Update your bio with a payload containing SQL syntax and save it.
- Trigger the admin search feature against your username or bio text.
- Observe extra rows or error output indicating injection fired.
- Copy the second-order flag from the search results page.
- Submit that flag.
1) Save a malicious bio (injection stays stored). 2) Run admin search — it concatenates your stored bio into SQL. Try bio:
' UNION SELECT username, bio FROM profiles--Update your bio (player)
Admin search (uses your stored bio)
Profiles
('admin', 'safe bio')
('player', 'hello')