Nasty web bug descends on world's most popular sites
ING, New York Times bitten hard
Underscoring the severity of of an exotic form of website bug, security researchers from Princeton University have cataloged four cross-site request forgeries in some of the world's most popular sites.
The most serious vulnerability by far was in the website of global financial services company ING Direct. The flaw could have allowed an attacker to transfer funds out of a user's account, or to create additional accounts of behalf of a victim, according to this post from Freedom to Tinker blogger Bill Zeller.
The vulnerabilities were confirmed for users of Firefox and Internet Explorer browsers, and ING's use of the secure sockets layer protocol did nothing to prevent the attack. ING plugged the hole after Zeller and colleague Ed Felton reported it privately.
Cross-site request forgery (CSRF) vulnerabilities occur when a website carries out an action without first confirming it was requested by the authenticated user. Miscreants can exploit this shortcoming by including code on an attack site that causes the user's browser to send commands to a site such as ING.com. ING.com then carries out the command under the mistaken notion that because it was requested by the browser, it was invoked by the user.
"The vulnerabilities in the websites are severe, demonstrating the pervasiveness and importance of CSRF protection," Jeremiah Grossman, CTO of White Hat Security and an expert in website security, said of the report.
Another CSRF flaw resides on the website of The New York Times and is troubling for the amount of time webmasters of the site have allowed it to persist. According to the researchers, it allows attackers to learn the address of arbitrary users by automatically initiating a feature that allows users to email NYT stories. NYT personnel were alerted to the problem a year ago this month, but it has yet to be fixed.
"When a user visits the attacker's page, an email will be sent to the attacker's email address containing the user's email address," Zeller wrote. "This attack can be used for identification (e.g., finding the email address of all uses who visit an attacker's site) or for spam." The attack is all the more appealing given the large number of people who have NYT accounts and the fact that users may stay logged in for over a year.
The remaining two CSRF holes were in YouTube and MetaFilter. The flaws allowed attackers to do things including changing the owner's email address, adding or deleting friends and sending messages on the owner's behalf. Both YouTube and MetaFilter have fixed the errors.
In a more detailed paper (PDF), Zeller and Felton outline steps people can take to prevent getting bitten by CSRF bugs. One is client-side approach in the form of a plugin for the Firefox browser. We've yet to use it, but it looks intriguing. The other is server-side plugin for the PHP MVC framework Code Igniter. ®
Re: simple solution?
True. I posted without reading the complete PDF (my bad), and was thinking about embedded images or similar. The referer would not be easily faked in those cases, and it is yet another layer of protection that can be easily deployed without rewriting entire websites.
Re: simple solution?
The referrer header can be faked. Whilst many attack vectors inside the browser wouldn't allow it to be done, it is not impossible to do once you consider plugins like Flash. The resolutions suggested in the paper work fine. In fact, sending the psuedo-random value as a cookie isn't necessary - you can just store it in your session state on the server and only send it in the forms, then you don't need to worry about any cookie sniffing vulnerabilities discovering it either.
I notice the paper entirely fails to mention Microsoft .Net in its list of frameworks. This is one of those rare occasions when the Microsoft platform is actually more secure - it provides CSRF protection of of the box with the viewstate mechanism.
NYT A Problem?
The ING flaw is an issue certainly, but the NYT can rest easy (and obviously have) as no one registers for their site legitimately - thank God for bugmenot! Clearly the NYT dudes know this perfectly well and so have been able to take a rather relaxed attitude to the problem.