If you are responsible for the security of a Web site, chances are darn good it’s got at least one serious vulnerability lurking just beneath the surface. I’m talking about CSRF, or “Cross Site Request Forgery,” and it’s just beginning to be explored by attackers, phishers, and other miscreants.
(Note that CSRF is not to be confused with cross-site scripting, or XSS. They’re distinctly different.)
Before I continue, however, let me just say that I seriously don’t consider myself a “FUD guy”—meaning, I’m not one to try to scare my readers or customers into submission using Fear, Uncertainty, and Doubt. I prefer instead to rely on facts and, when asked, opinions and recommendations. But I’m always explicitly clear about which I’m talking about.
That said, CSRF is a big deal. This is not a fire drill. It affects a huge percentage of today’s Web applications. Numbers are not yet clear, but there are some estimates as high as 80-90% of today’s Web apps are affected by CSRF.
Perhaps more to the point, though, when a CSRF vulnerability is exploited, the attacker has access to all the information and functions accessible to the victim’s account. If the victim can transfer money (to the attacker’s account), the attacker can transfer money, and without the victim’s consent or knowledge. No kidding.
So just what is a CSRF vulnerability and what makes it so heinous? Here’s the scenario: you’re logged into a Web site, or the site has placed a “remember me” cookie in your browser. While the session or cookie is active, you receive an unsolicited email that’s either directly or indirectly—via, for example, a “spambot” network—from the attacker. The email is HTML formatted, and includes an “image tag,” which is an instruction to the HTML renderer to grab an image from another site, normally via a URL pointing to a graphics file.
But this image tag doesn’t contain a harmless pointer to an image file. Instead, it contains an explicit URL pointing the HTML rendering engine off to the site you were logged into back in your browser. (Remember, the email comes in while you’re logged in.)
Security Articles |
We Need to Rethink PC Security Software Spam Wars: When Good Geeks Say Bad Things |
The request to the web site you’re logged into gets doled out to the HTML subsystem—normally your browser. But your browser knows you have a session open on that site, and it gleefully sends along your session credentials (e.g., JSESSIONID, active cookies).
Now, the really nasty bit… That image request has embedded in it an explicit set of instructions to your Web site that instruct it to, for instance, transfer funds, change your password, send your login credentials to the attacker, or some other unpleasant function.
It’s real. We’ve already seen CSRF attacks that do some fairly straight forward things, that I’d consider as “proof of concept” code to validate the effectiveness of CSRF. To name a couple examples, Netflix had a CSRF flaw that enabled an attacker to add a movie to the victim’s movie queue and place it at the front of the line. (That could result in some interesting discussions with your spouse…) Google had a CSRF flaw that enabled an attacker to change the victim’s default language to Klingon (or any other language, for that matter).
We’ve also seen published examples of CSRF flaws being used to change the configuration of popular routers. (Does the device at 192.168.1.1 on your network have a username/password of admin/admin?) But these are just child’s play compared to what CSRF is really capable of.
CSRF first really came to my attention when the Open Web Application Security Project (OWASP) published its 2007 top 10 list of security defects. Unlike all other defects on previous OWASP top 10 lists, however, CSRF was put on the list in advance of statistical verification. This was done because the OWASP team felt strongly that CSRF is real and urgently needs to be fixed as soon as possible.
Fortunately, the OWASP folks didn’t stop there. They’ve also released the CSRF Guard, which is an open source Java J2EE class library that provides simple and effective protection against CSRF vulnerabilities.
The way the OWASP CSRF Guard works is to include a randomly generated and unpredictable token in each web page, in the form of a hidden HTML field. This allows valid browser requests to pass, but blocks CSRF requests in their tracks, since they don’t have access to this token.
The CSRF Guard is not just simple and effective, it’s free. Kudos to the good folks at OWASP for making this available. And, similar solution sets are available or being developed in other programming languages as well.
So, CSRF is a nasty little vulnerability with potentially very large impacts on vulnerable web site. But it’s also easy to safeguard against. There’s just no excuse for a Web site to remain vulnerable to them. Left unfixed, CSRF issues provide the attacker with a direct avenue of attack to your customers.
Ethics and Artificial Intelligence: Driving Greater Equality
FEATURE | By James Maguire,
December 16, 2020
AI vs. Machine Learning vs. Deep Learning
FEATURE | By Cynthia Harvey,
December 11, 2020
Huawei’s AI Update: Things Are Moving Faster Than We Think
FEATURE | By Rob Enderle,
December 04, 2020
Keeping Machine Learning Algorithms Honest in the ‘Ethics-First’ Era
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 18, 2020
Key Trends in Chatbots and RPA
FEATURE | By Guest Author,
November 10, 2020
FEATURE | By Samuel Greengard,
November 05, 2020
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 02, 2020
How Intel’s Work With Autonomous Cars Could Redefine General Purpose AI
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 29, 2020
Dell Technologies World: Weaving Together Human And Machine Interaction For AI And Robotics
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 23, 2020
The Super Moderator, or How IBM Project Debater Could Save Social Media
FEATURE | By Rob Enderle,
October 16, 2020
FEATURE | By Cynthia Harvey,
October 07, 2020
ARTIFICIAL INTELLIGENCE | By Guest Author,
October 05, 2020
CIOs Discuss the Promise of AI and Data Science
FEATURE | By Guest Author,
September 25, 2020
Microsoft Is Building An AI Product That Could Predict The Future
FEATURE | By Rob Enderle,
September 25, 2020
Top 10 Machine Learning Companies 2021
FEATURE | By Cynthia Harvey,
September 22, 2020
NVIDIA and ARM: Massively Changing The AI Landscape
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
September 18, 2020
Continuous Intelligence: Expert Discussion [Video and Podcast]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 14, 2020
Artificial Intelligence: Governance and Ethics [Video]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 13, 2020
IBM Watson At The US Open: Showcasing The Power Of A Mature Enterprise-Class AI
FEATURE | By Rob Enderle,
September 11, 2020
Artificial Intelligence: Perception vs. Reality
FEATURE | By James Maguire,
September 09, 2020
Datamation is the leading industry resource for B2B data professionals and technology buyers. Datamation's focus is on providing insight into the latest trends and innovation in AI, data security, big data, and more, along with in-depth product recommendations and comparisons. More than 1.7M users gain insight and guidance from Datamation every year.
Advertise with TechnologyAdvice on Datamation and our other data and technology-focused platforms.
Advertise with Us
Property of TechnologyAdvice.
© 2025 TechnologyAdvice. All Rights Reserved
Advertiser Disclosure: Some of the products that appear on this
site are from companies from which TechnologyAdvice receives
compensation. This compensation may impact how and where products
appear on this site including, for example, the order in which
they appear. TechnologyAdvice does not include all companies
or all types of products available in the marketplace.