logoalt Hacker News

ashishbyesterday at 11:16 PM2 repliesview on HN

JavaScript fanatics will downvote me, but I will say again. JavaScript is meant to be run in an untrusted environment (think browser), and running it in any form of trusted environment increases the risk drastically [1]

The language is too hard to do a meaningful static analysis. This particular attack is much harder (though not impossible) to execute in Java, Go, or Rust-based packages.

1 - https://ashishb.net/tech/javascript/


Replies

tantaloryesterday at 11:26 PM

Even in a browser, a compromised JS payload can put your user's data and privacy at risk.

show 1 reply
mcintyre1994yesterday at 11:29 PM

In what way is it harder to write a library that exfiltrates credentials passed to it in those languages? I’d think it’d be a bit easier because you could use the standard library instead of custom encryption, but otherwise pretty much the same.

show 1 reply