Skip to main content

Overview

Payload is stored in the database (registration, profile update) and executed later when another feature reads and uses it in a SQL query without sanitization. Input is sanitized on insert but not on retrieval.

How It Works


Common Injection Points


Example — Password Reset

Register

Trigger — Change Password

Application runs:
Result: admin password changed to newpass.

Example — Profile Update

Register

Trigger

Application displays profile with:

Example — Data Exfiltration

Store

Trigger

Appears on admin dashboard, export CSV, or email notification that renders the stored value in a query.

Testing Methodology

  1. Identify all input fields that store data
  2. Inject payloads in each field (registration, profile, settings)
  3. Navigate to every feature that reads those fields
  4. Monitor for SQL errors or unexpected data
  5. Check admin panels, reports, search, export features

Useful Payloads


SQLmap Second-Order

--second-url = page where stored payload is triggered.

Quick Reference


Sources