Hacking websites via third-party JavaScript libraries
21–30 of 39 posts
Re: Hacking websites via third-party JavaScript libraries
#22Tag managers are the worst. They shouldn’t even exist. When a website uses a tag manager, it means the web devs have been forced to give marketing and every other department a backdoor to insert whatever vile abominations they want.
Re: Hacking websites via third-party JavaScript libraries
#23I’ve come to the conclusion that the way to secure your website from third party JavaScript is to monitor everything happening on your site: https://enchantedsecurity.com/ These third party libraries are a necessary part of modern websites. It’s worth trusting but verifying their security.
Re: Hacking websites via third-party JavaScript libraries
#24That's a risk every time you use a CDN. We used a CDN that f-ed up JS versions, breaking sites, had downtime, breaking sites... when ever you do use a CDN, be aware of everything that could go wrong, which is a lot... On the other hand, id you add hashes to the script references you load, you are a lot more secure, check out https://developer.mozilla.org/en-US/docs/Web/Security/Subres... if you use a CDN and would li…
Re: Hacking websites via third-party JavaScript libraries
#25A few ways out of these are: - don't eval on the server side (this is a bad idea most of the time anyway); - serve js bundles from your own domain and set an appropriate content security policy; These hacks won't work then.
Re: Hacking websites via third-party JavaScript libraries
#26While I think SRI is a good tool to counter CDNs (with the correct deploying strategy, human-supervised semi-automatized SRI generation shall become trivial), there is a fundamental flaw with "compiled" aka obfuscated/minimized javascript code: How do you, as an author, even know that it doesn't contain malicious code in the first place? That's the fundamental problem of using software written by other people: Except…
Re: Hacking websites via third-party JavaScript libraries
#27SRI is such a cool idea (in theory) but the approach fails in practice. Also very few sites maintain a solid Content Security Policy (CSP). What's the point of all these controls/tools when nobody uses them?
Re: Hacking websites via third-party JavaScript libraries
#28So this has nothing to do with the third party JS library itself, but with how the website's backend stored the data generated by the frontend script. The developer could probably reproduce the hack with postman and doesn't need the CDN hosted library at all.
Re: Hacking websites via third-party JavaScript libraries
#29That's a risk every time you use a CDN. We used a CDN that f-ed up JS versions, breaking sites, had downtime, breaking sites... when ever you do use a CDN, be aware of everything that could go wrong, which is a lot... On the other hand, id you add hashes to the script references you load, you are a lot more secure, check out https://developer.mozilla.org/en-US/docs/Web/Security/Subres... if you use a CDN and would li…
Re: Hacking websites via third-party JavaScript libraries
#30The fact that this was possible is a testament that web devs really have no concept of due diligence. Sad. Imagine if running a native app on your computer would load random DLLs from servers. It boggles the mind.