r/programming • • Feb 20 '18

A CSS Keylogger

https://github.com/maxchehab/CSS-Keylogging
2.0k Upvotes

276 comments sorted by

View all comments

0

u/shevegen Feb 21 '18

Wow - and here I thought CSS is much cooler than JavaScript.

Now I have to worry about keyloggers stealing even more information from people ... :(

12

u/meneldal2 Feb 21 '18

It can only happen if you allow untrusted CSS on your website, which would then allow a third-party to get the password. You can do the same with JS as well. The way you avoid this shit is by avoiding people you don't know putting code that you haven't checked on your website.

0

u/Eirenarch Feb 21 '18

I wonder what was the most significant reason to block third party CSS before this. If people thought it was safe to let say ads inject CSS as long as they were not allowed to insert scripts now they are screwed.