Injection
Server-Side JavaScript Injection
SSJI occurs when user-controlled input is evaluated as JavaScript on the server, typically in Node.js applications using eval() or similar functions.
- 193 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.
ssji-payloads.txt
193 payloads · 13 KBLoading payloads for SSJI…
What it is#
Server-Side JavaScript Injection (SSJI) occurs when a Node.js application evaluates user-supplied input as JavaScript code. Functions like eval(), new Function(), setTimeout() with string arguments, and require() with user-controlled paths create injection opportunities. Successful exploitation can result in remote code execution, data exfiltration, or full server compromise.
Attack vectors#
- Applications using eval() on user input
- Template engines backed by JavaScript evaluation
- Calculator or expression evaluator features
- JSON deserialization with eval-based parsers
- Dynamic require() calls with user-controlled module names
Testing methodology#
- Submit 1+1 and observe if 2 is returned (arithmetic evaluation)
- Test with process.version to detect Node.js context
- Try require('child_process').execSync('id').toString()
- Use global object enumeration: Object.keys(global)
Indicators of vulnerability#
- Arithmetic result returned for injected expression
- Node.js version string in response for process.version
- File system contents or environment variables in response
Detection guidance#
Audit all uses of eval(), new Function(), and similar evaluation primitives in Node.js code. Static analysis tools can identify these patterns.
Mitigation and remediation#
- Never use eval() or new Function() with user-supplied input
- Use JSON.parse() instead of eval() for JSON data
- Implement strict Content Security Policy
- Use vm module with a restricted sandbox if evaluation is truly necessary
- Apply principle of least privilege to Node.js process
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)