News has come in this evening that Fine Gael’s website has been hacked at around 8pm on Sunday. It appears to be an XSS vulnerability that was exploited in the comment section. These types of hack attempts can occur when user input isn’t sanitised before being displayed on a webpage. The site was only launched last week, and this does come as a surprise.
Preventing Hacking Attempts
Any user generated content you display on your website should be checked for malicious scripts and content, as in the case of the Fine Gael’s website, it has ended up redirecting it to another website [seen below]. In essence it’s a rather straight forward hack :
- A user entered a comment, which contained the malicious code.
- And it was displayed on their website, without being checked, parsed or sanitised (i.e. potentially malicious tags being removed)
No doubt there will be calls for a full explanation as to how this could happen to Fine Gael’s website. For further reading about the hack attempt check threads on boards.ie / politics.ie , news on RTÉ / silconrepublic.com / thejournal.ie and on blogs like michele’s & nábídána‘s.
Update : As of 21:40 , January 9 2011, it seems that the website has been replaced with a holding template while the website is fixed.
Update : There are now reports that the hack also compromised some data on the website, an Irish journalist has received up to 4,000 details of users of the website.