A few years ago there was much media attention to this issue when some guy released a trojan that, when installed on someone's computer, could send information back to the cheater, effectively enabling him to see their
hands.
So yes, someone can end up knowing your cards. But to do so they would first have to get you to install some software on your computer or open e-mail attachments that you are unfamiliar with. I doubt many people will install programs or open e-mails from complete strangers.
So in order for the cheater's plan to work he would have to target family and friends who would trust him enough to fall for this. Unfortunately there are people who are not computer savvy and will open anything on the internet. This is why it's important to regularly check for viruses and malware.
Without a trojan or something like that nobody that is not working for the
poker site can ever see your cards. So don't download dodgy software and don't open e-mail attachments from unknown senders. And because it's important I'll say it again. Keep your anti-virus up to date and do regular scans.