Double Encoding is a technique where characters are URL-encoded twice to bypass security filters that only decode input once, allowing malicious payloads to pass through and be decoded by the application.
# Single encoding
< → %3C
# Double encoding
< → %3C → %253C
# Decoding chain
%253C → %3C (first decode) → < (second decode)
# WAF blocks: ../../../etc/passwd
# Single encoded: %2e%2e%2f%2e%2e%2f%2e%2e%2fetc/passwd
# WAF decodes once: ../../../etc/passwd → BLOCKED
# Double encoded: %252e%252e%252f%252e%252e%252f%252e%252e%252fetc/passwd
# WAF decodes once: %2e%2e%2f%2e%2e%2f%2e%2e%2fetc/passwd → PASS
# App decodes again: ../../../etc/passwd → Attack succeeds
Character | Single | Double
----------|---------|--------
. | %2e | %252e
/ | %2f | %252f
\ | %5c | %255c
< | %3c | %253c
> | %3e | %253e
' | %27 | %2527
" | %22 | %2522