From: Peter W To: John Percival Cc: bugtraq@securityfocus.com, clambert@whitecrown.net, peterw@tux.org Subject: Cross-Site Request Forgeries (Re: The Dangers of Allowing Users to Post Images) Message-ID: <20010615011542.C22677@usa.net> References: <04f901c0f437$4911b610$9701a8c0@wellingtoncollege.berks.sch.uk> In-Reply-To: <04f901c0f437$4911b610$9701a8c0@wellingtoncollege.berks.sch.uk>; from john@jelsoft.com on Wed, Jun 13, 2001 at 07:33:04PM +0100 Cross-Site Request Forgeries (CSRF, pronounced "sea surf") I hope you don't mind if I expand on this a bit. You've come across the tip, in my opinion, of a rather large iceberg. It's another Web/trust-relationship problem. Many Web applications are fairly good at identifying users and understanding requests, but terrible at verifying origins and intent. The problem isn't the IMG tag on the message board, it's the backend app you seek to attack via the IMG tag. And I suspect lots of Web apps are vulnerable. Lots. I've been to training on highly-regarded, widely-used, expensive Web app development frameworks, and none of the classes taught how to avoid the problems I will attempt to describe. In fact, they all seem to teach the "easy way" of handling what look like user requests, which is, of course, the vulnerable way. Anyway, let's look at how your post relates to what I call CSRF. On Wed, Jun 13, 2001 at 07:33:04PM +0100, John Percival wrote: > This exploit shows how almost any script that uses cookie session/login data > to validate CGI forms can be exploited if the users can post images. > What is the problem? Well, by using an [img] (or HTML or