OWASP Hunting

Injection

SSI and ESI Injection

SSI directives are evaluated by web servers such as Apache and nginx (with SSI enabled) when a response contains <!--#...--> tags. ESI tags (<esi:...>) are evaluated by caches and CDNs such as Varnish, Akamai, Fastly and Squid. If user input reaches a response that is later processed by one of these engines, the attacker may read files, run commands (SSI exec), make server-side requests (ESI include), steal HttpOnly cookies or bypass XSS filters.

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

Folder on GitHub

Use the arrow keys to move between payloads. Press Enter or C to copy the focused payload.

ssi-esi-payloads.txt

59 payloads · 3.7 KB
Source

Loading payloads for SSI and ESI Injection…

Common Attack Vectors#

  • Reflected or stored input in .shtml, .stm and .shtm pages, or SSI-enabled directories
  • Input reflected into cached responses processed by an ESI-capable proxy or CDN
  • Error pages and 404 pages that echo the path
  • File upload that allows .shtml extensions
  • Hybrid chains: XSS that is blocked by the browser filter but accepted as ESI, and SSRF through esi:include

Testing Approach#

Inject a harmless directive such as <!--#echo var="DATE_LOCAL" --> and <esi:include src="http://oast.example.test/esi" />. Evidence of SSI is an expanded date or variable; evidence of ESI is an out-of-band request from the cache or CDN, or an error mentioning ESI. Identify the ESI implementation (response headers like Surrogate-Control and Surrogate-Capability) before testing function sets. Do not use exec on systems you do not own.

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)