Comment

Comment by jimrandomh

As others have observed, if the attackers had wanted, they could have modified the hosted jQuery scripts and used them to attack other web sites. They don't seem to have done so, but this highlights how the practice of including scripts hosted by other parties is a security problem for the Internet as a whole.

But there's an easy way to fix it. Browsers should support a hash attribute for <script> tags, so instead of

    <script src="https://code.jquery.com/jquery-2.1.1.min.js">
sites could instead say

    <script src="https://code.jquery.com/jquery-2.1.1.min.js" hash="sha256:874706b2b1311a0719b5267f7d1cf803057e367e94ae1ff7bf78c5450d30f5d4">
This would also significantly reduce the risks from use of http instead of https, and from weaknesses in https itself.
parent jimrandomh 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton