r/javascript • • Aug 27 '15

The Evil Side of JavaScript: Server-Side JavaScript Injection

https://blog.nvisium.com/2015/08/the-evil-side-of-javascript-server-side.html
3 Upvotes

19 comments sorted by

View all comments

8

u/battery_go Aug 27 '15

I have never seen an eval used in a setting like this and if you did this, you obviously don't care about security. However, this being server-side, is there a way to actually get the output of your actions. Spawning a process is alright, but reading a directory? Where will the output of that go?

3

u/Ahri Aug 27 '15

res.send(filecontents), for synchronous output of files. Otherwise there's always the http library with which to send data to my server.

2

u/battery_go Aug 27 '15

You're right, I didn't think of that - thanks!