New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server Side JS Injection #24

codelion opened this Issue Jul 3, 2014 · 1 comment


None yet
2 participants

codelion commented Jul 3, 2014

A sever side JS injection is possible in the application at the movement.html page.

The issue is in the following line form the fille movement.js

req.body.amount = Math.round(parseFloat(eval('('+req.body.amount.toString().replace(/,/g,'.')+')'))*100,2)/100;

As you can see above you are passing untrusted input from request body (amount) to eval(), this leads to the possibility of server side JS injection.

To exploit just enter "process.exit()" as the amount in the movement.html page and it will shutdown the server. It is also possible kill any process on server using process.kill(


This comment has been minimized.

Show comment
Hide comment

lautarobock Jul 3, 2014


thanks, this project is only for fun... there is no problem :)


lautarobock commented Jul 3, 2014

thanks, this project is only for fun... there is no problem :)

@lautarobock lautarobock closed this Jul 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment