r/javascript • Front-End Engineer • Aug 09 '12

A JavaScript Security Flaw

http://blog.alexmaccaw.com/a-javascript-security-flaw
0 Upvotes

13 comments sorted by

View all comments

4

u/[deleted] Aug 10 '12

I don't understand, what is the security flaw here? Considering anyone can run arbitrary JavaScript through the developer console or the address bar, I don't understand why someone being able to run JavaScript in this instance is any different.

1

u/[deleted] Aug 12 '12

After thinking about this more, I think I understand the security risk. The idea isn't to get the site to run your JavaScript on your machine, but rather on someone else's machine. For example, let's say I could do this trick on my facebook profile, and the code would run anytime someone looked at my profile. That would give me a hook to view their cookies or do something else malicious.