Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
jononor
· 8y ago · 0 comments
Can someone explain how the injection itself works? I assume it's the require doing the work, but its not so clear how that loads externally instead of from a path in filesystem?
Comments
[–]
ekke
8y ago
NPM guys explain it in the blog today:
https://news.ycombinator.com/item?id=16975025
[–]
jononor
OP
8y ago
Corrected URL to blogpost is:
https://blog.npmjs.org/post/173526807575/reported-malicious-...
[–]
dylz
8y ago
It appears to be middleware that looks at headers, and if a certain condition is met, it'll basically execute
https://nodejs.org/api/vm.html#vm_vm_runinthiscontext_code_o...
against whatever the header has.