There are a lot of websites out there that state that you should disable JavaScript because of the possible security risks. There's also a reason that an AddOn like NoScript has been developed and is used a lot.
Now, the times I have used JavaScript to enrich user experience the most harming code I was able to have run in the browser was basically just a loop with spamming alert
messages, this is more of an annoyance than a security risk though and can easily be disabled by the user on up-to-date browsers.
However, NoScript exists and thus JavaScript can probably do more harm than just message boxes. What real security risks can be exploited when having JavaScript enabled and visiting a website that has malicious JavaScript code? (Assuming a modern JavaScript engine and browser (Chrome, Firefox))
Can information outside of the browser be accessed and sent off to the server?
Can files be downloaded to the client computer without the client's consent?
What serious security threats are there that solely rely on the client JavaScript code that the browser allows?