Config & design
Type Juggling
Loosely typed languages convert values implicitly when comparing or processing them. PHP's ==, JavaScript's == and isNaN, and permissive JSON/YAML parsing allow different values to compare as equal or select unexpected branches. Attackers abuse this to bypass authentication, compare token or hash values against a number, and trick signature or password checks. Magic hash strings (0e...) are the best-known example.
- 112 payloads
- 1 file
- README on GitHub
Payloads are read from main at 35c1f2b (committed 22 Nov 2026). Project version 1.0.2.
These payloads are for authorized testing only: systems you own, authorized bug bounty programs, or controlled lab environments. Unauthorized testing is illegal.
Payload files
Use the arrow keys to move between payloads. Press Enter or C to copy the focused payload.
type-juggling-payloads.txt
112 payloads · 2.7 KBLoading payloads for Type Juggling…
Common Attack Vectors#
- PHP loose comparison with
==,!=,in_array,switch,array_searchandstrcmp - Hash comparisons where the digest looks like scientific notation (
0efollowed by digits) - JSON bodies with
true,0,null, arrays or objects in place of a string - Array parameters (
password[]=x) that make string functions returnNULL - JavaScript loose equality,
parseInt, truthiness and prototype-based coercion - Numeric strings, whitespace, hex, octal and scientific notation in comparisons
- Type confusion in YAML, XML and query-string parsers
Testing Approach#
Identify the language and the comparison. In PHP, send integers, booleans, null, empty arrays and 0e... strings in JSON in place of strings, and send array notation for form fields. Compare the response with the baseline (invalid password). For hash comparison, test known 0e strings that hash to 0e... values. Authentication bypass is confirmed only when you can log in as your own test account; do not use these techniques against other users.
References#
Responsible Use
All content in this reference is for authorized security testing only. Use only on systems you own or have explicit written permission to test.
- Systems and applications you own
- Authorized penetration testing engagements
- Bug bounty programs with defined scope
- Educational lab environments (DVWA, WebGoat, HackTheBox)