rkrauter
rkrauter

Reputation: 1169

Javascript reference external script file - security implications

If I have a reference to an external third party JavaScript file on my website, what are the security implications? Can the JavaScript file be used to steal cookies?

One example of this is the Google Analytics JavaScript reference file.

Could the third party technically steal cookies or any other sensitive information from my logged on users (XSS)?

The whole cross domain scripting has me confused sometimes.

Thanks!

Upvotes: 2

Views: 675

Answers (1)

edwin
edwin

Reputation: 2821

Yes, the external JavaScript can do anything your own scripts can do. That includes reading cookies and worse: doing things on behalve of your visitors.

Only include JavaScripts from external websites you really, really trust.

Upvotes: 3

Related Questions