Popular Websites Vulnerable to Cross-Site Request Forgery Attacks

Update Oct 15, 2008 We've modified the paper to reflect the fact that the New York Times has fixed this problem. We also clarified that our server-side protection techniques do not protect against active network attackers.

Update Oct 1, 2008 The New York Times has fixed this problem. All of the problems mentioned below have now been fixed.

Today Ed Felten and I (Bill Zeller) are announcing four previously unpublished Cross-Site Request Forgery (CSRF) vulnerabilities. We've described these attacks in detail in a technical report titled Cross-Site Request Forgeries: Exploitation and Prevention.

We found four major vulnerabilities on four different sites. These vulnerabilities include what we believe is the first CSRF vulnerability that allows the transfer of funds from a financial institution. We contacted all the sites involved and gave them ample time to correct these issues. Three of these sites have fixed the vulnerabilities listed below, one has not.

CSRF vulnerabilities occur when a website allows an authenticated user to perform a sensitive action but does not verify that the user herself is invoking that action. The key to understanding CSRF attacks is to recognize that websites typically don't verify that a request came from an authorized user. Instead they verify only that the request came from the browser of an authorized user. Because browsers run code sent by multiple sites, there is a danger that one site will (unbeknownst to the user) send a request to a second site, and the second site will mistakenly think that the user authorized the request.

If a user visits an attacker's website, the attacker can force the user's browser to send a request to a page that performs a sensitive action on behalf of the user. The target website sees a request coming from an authenticated user and happily performs some action, whether it was invoked by the user or not. CSRF attacks have been confused with Cross-Site Scripting (XSS) attacks, but they are very different. A site completely protected from XSS is still vulnerable to CSRF attacks if no protections are taken. For more background on CSRF, see Shiflett, Grossman, Wikipedia, or OWASP.

We describe the four vulnerabilities below:

1. ING Direct (ingdirect.com)

Status: Fixed

We found a vulnerability on ING's website that allowed additional accounts to be created on behalf of an arbitrary user. We were also able to transfer funds out of users' bank accounts. We believe this is the first CSRF vulnerability to allow the transfer of funds from a financial institution. Specific details are described in our paper.

2. YouTube (youtube.com)

Status: Fixed

We discovered CSRF vulnerabilities in nearly every action a user could perform on YouTube. An attacker could have added videos to a user's "Favorites," added himself to a user's "Friend" or "Family" list, sent arbitrary messages on the user's behalf, flagged videos as inappropriate, automatically shared a video with a user's contacts, subscribed a user to a "channel" (a set of videos published by one person or group) and added videos to a user's "QuickList" (a list of videos a user intends to watch at a later point). Specific details are described in our paper.

3. MetaFilter (metafilter.com)

Status: Fixed

A vulnerability existed on Metafilter that allowed an attacker to take control of a user's account. A forged request could be used to set a user's email address to the attacker's address. A second forged request could then be used to activate the "Forgot Password" action, which would send the user's password to the attacker's email address. Specific details are described in our paper.

(MetaFilter fixed this vulnerability in less than two days. We appreciate the fact that MetaFilter contacted us to let us know the problem had been fixed.)

4. The New York Times (nytimes.com)

Status: Not Fixed. We contacted the New York Times in September, 2007. As of September 24, 2008, this vulnerability still exists. This problem has been fixed.

A vulnerability in the New York Time's website allows an attacker to find out the email address of an arbitrary user. This takes advantage of the NYTimes's "Email This" feature, which allows a user to send an email about a story to an arbitrary user. This emails contains the logged-in user's email address. An attacker can forge a request to active the "Email This" feature while setting his email address as the recipient. When a user visit's the attacker's page, an email will be sent to the attacker's email address containing the user's email address. This attack can be used for identification (e.g., finding the email addresses of all users who visit an attacker's site) or for spam. This attack is particularly dangerous because of the large number of users who have NYTimes' accounts and because the NYTimes keeps users logged in for over a year.

Also, TimesPeople, a social networking site launched by the New York Times on September 23, 2008, is also vulnerable to CSRF attacks.

We hope the New York Times will decide to fix these vulnerabilities now that they have been made public. The New York Times appears to have fixed the problems detailed above.

Mitigation

Our paper provides recommendations for preventing these attacks. We provide a server-side plugin for the PHP MVC framework Code Igniter that can completely prevent CSRF. We also provide a client-side Firefox extension that can protect users from certain types of CSRF attacks (non-GET request attacks).

The Takeaway

We've found CSRF vulnerabilities in sites that have a huge incentive to do security correctly. If you're in charge of a website and haven't specifically protected against CSRF, chances are you're vulnerable.

The academic literature on CSRF attacks has been rapidly expanding over the last two years and we encourage you to see our bibliography for references to other work. On the industry side, I'd like to especially thank Chris Shiflett and Jeremiah Grossman for tirelessly working to educate developers about CSRF attacks.

Tagged:  

OWASP has made two tools available to help with CSRF problems. The first is CSRFTester which will allow you to test your website for CSRF problems. The tool allows you to create multi-step test cases and has been used to transfer funds, create accounts, issue checks, etc...

The second tool is called CSRFGuard, and it's a Java EE filter that can be placed in front of an entire application to provide CSRF protection. CSRFGuard uses javascript to insert tokens into forms and links, and then validates the token in every request.

You can find both free tools at http://www.owasp.org.

It would be helpful if you linked to the plugin on the CodeIgniter forums. I haven't seen something like this posted, although EL said a while ago that they're working on some sort of CSRF protection.
I think quite a few people in the community are not aware of the risks or don't know how to best go about mitigating them. The way I see it, education is a real problem when it comes to webappsec. Since you provide an explanation as well as a solid solution, not even a lazy person can refuse to take a look.

If I am not mistaken, your CI plugin will not prevent a form from being processed if the user's browser doesn't accept cookies or the CSRF token cookie has expired. Shouldn't the plugin reject all form submissions when there's any token mismatch, including the missing cookie case?

Hey George,

That cookie exception was the result of a tradeoff between security and usability in non-cookie contexts. I agree with you that the plugin should reject all invalid requests, so I've changed it to reflect that. Developers concerned about this can disable (or not install) the plugin.

How about this, I've been wondering why it's not automagically created as a Firefox option:

Manually:
Create a folder for "logoff" bookmarks
Save a copy of every "logout" link/button that you find to that folder, for example:

http://www.nytimes.com/logout
https://www.typekey.com/t/typekey?__mode=user_logout
http://login.yahoo.com/config/login?logout=1&.src=&.intl=us&.partner=&.d...
http://www.livejournal.com/logout.bml?user=yournamehere

Whenever you feel the hair on the back of your neck start to stand up as you realize how exposed you might be, choose "Open All in Tabs" from the bottom of the folder contents.

At least to some degree. If you go (on FF3 on windows) Tool>Clear Private Data (ctrl-shift-del) and select cookies and authenticated sessions (or if you're feeling more paranoid more cache et all) it will take out almost all your logged in sites.

not the same. the sessions will still exist on the servers. so if someone has your cookies, theyre still you.

[...] Zeller and Ed Felten have published a report on Cross-Site Request Forgery attacks on popular Web sites: We found four major vulnerabilities on four different sites. These vulnerabilities include what [...]

[...] Popular Websites Vulnerable to Cross-Site Request Forgery Attacks | Freedom to Tinker [...]

[...] Ed Felton and Bill Zeller have found this vulnerability in some very popular sites. Here is the quick status to get right down to what interests you. [...]

[...] Zeller and Ed Felten have published a report on Cross-Site Request Forgery attacks on popular Web sites: We found four major vulnerabilities on four different sites. These vulnerabilities include what [...]

[...] Popular Websites Vulnerable to Cross-Site Request Forgery Attacks | Freedom to Tinker - You would be amazed how little developers know about CSRF attacks and more precisely, how to protect against them. [...]

[...] Popular Websites Vulnerable to Cross-Site Request Forgery Attacks | Freedom to Tinker (tags: security browser hack web Internet webdesign) b94 [...]

[...] researchers released a research paper yesterday which documents Cross-Site Request Forgery vulnerabilities in 4 well known commercial websites (ING Direct, NY Times, Youtube, and Metafilter). It makes for interesting [...]

[...] Zeller and Ed Felten have published a report on Cross-Site Request Forgery attacks on popular Web sites: We found four major vulnerabilities on four different sites. These vulnerabilities include what [...]

Google released a cool proxy that you can surf your site through and then report potential issues.

http://code.google.com/p/ratproxy

-Ben

[...] Popular Websites Vulnerable to Cross-Site Request Forgery Attacks [...]

[...] sind jedoch auch zahlreiche weitere größere Webseiten betroffen, wie auf freedom-to-tinker.com zu lesen ist. Diesen Post [...]

[...] Ed Felten and Bill Zeller recently released a very well-written paper about Cross-Site Request Forge..., including some real-world vulnerability examples from ING Direct, YouTube, MetaFilter, and The New York Times. As you all know so well, CSRF vulnerabilities are easy find when you just decide to look on basically any website. Don’t expect any ground breaking research per-say, but the papers content is really helpful to those unfamiliar with CSRF (and that’s still a lot people - especially developers). Ed and Bill also did some work on a potential client-side solution, like LocalRodeo I think, which I hope to find time to investigate further. We need as many smart people as we can trying to solve this problem in creative ways. CSRF certainly isn’t going to go away anytime soon. WhiteHat Security is a leading provider of web application security services. WhiteHat Sentinel, the company’s flagship service, provides continuous web applications vulnerability assessment and management. [...]

[...] Read more here. [...]

[...] Ed Felten and Bill Zeller recently released a very well-written paper about Cross-Site Request Forge..., including some real-world vulnerability examples from ING Direct, YouTube, MetaFilter, and The New York Times. As you all know so well, CSRF vulnerabilities are easy find when you just decide to look on basically any website. Don’t expect any ground breaking research per-say, but the papers content is really helpful to those unfamiliar with CSRF (and that’s still a lot people - especially developers). Ed and Bill also did some work on a potential client-side solution, like LocalRodeo I think, which I hope to find time to investigate further. We need as many smart people as we can trying to solve this problem in creative ways. CSRF certainly isn’t going to go away anytime soon. WhiteHat Security is a leading provider of web application security services. WhiteHat Sentinel, the company’s flagship service, provides continuous web applications vulnerability assessment and management. [...]

One question, how can you make cross-domain post request from Javascript?

[...] 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.” addthis_url = [...]

[...] - Popular Websites Vulnerable to Cross-Site Request Forgery Attacks | Freedom to Tinker (tags: [...]

It just takes a commitment to building security into an application before it goes live. If companies like the NYT and ING Direct took a leadership position in being proactive rather than reactive, the rest would hopefully fall into line. Refusing to do business with organizations that don't take web security seriously is another possible solution.

There are some good resources about this in the following places:
Blog post: The Web Browser - Security Threat Number One
http://www.pcis.com/web/vvblog.nsf/dx/the-web-browser-security-threat-nu...

Devfense web application security
http://www.boonbox.net/devfense.htm

White Paper: Implications of outsourcing web application security
http://www.boonbox.net/pdf/WP_OutsourcingWAS_2008August.pdf

The article suggests that a POST request can be sent across domain from Firefox
without extended privileges.
I do not believe this is possible, unless there is a hole in the same origin policy.

This is only true for xmlhttprequest object.
However, you can have a page with hidden forms that do posts on any server.

[...] the Freedom to Tinker blog, Bill Zeller offers one of the best, most concise explanation of XSRF that I’ve read to date: [...]

[...] Bill Zeller offers a good description of what this is CSRF vulnerabilities occur when a website allows an authenticated user to perform a sensitive action but does not verify that the user herself is invoking that action. The key to understanding CSRF attacks is to recognize that websites typically don’t verify that a request came from an authorized user. Instead they verify only that the request came from the browser of an authorized user. Because browsers run code sent by multiple sites, there is a danger that one site will (unbeknownst to the user) send a request to a second site, and the second site will mistakenly think that the user authorized the request. [...]

[...] Referans: Freedom to Tinker [...]

[...] the Freedom to Tinker blog, Bill Zeller offers one of the best, most concise explanation of XSRF that I've read to [...]

[...] populäre Seiten betroffen sind, zeigt eine Ausarbeitung von Bill Zeller und Ed Felten. In einem Blog-Eintrag sprechen sie unter anderem über YouTube, wo so ziemlich alles anfällig war, aber auch über eine [...]

[...] cross-site request forgery es una realidad y aunque usé a Amazon como un ejemplo, hay casos reales documentados y un muy buen paper del tema creado por William Zeller y Edward Felten que está con muchos más [...]

[...] see also Bill Zeller’s blog post describing the attack and the Wikipedia page for cross-site request [...]

[...] see also Bill Zeller’s blog post describing the attack and the Wikipedia page for cross-site request [...]

There is a problem with a static nonce who's value isn't checked server side.

I could have some fancy flash forge the headers. Lets say:
COOKIE['ci_token'] = csrf
POST['password'] = badguy
POST['ci_token'] = csrf
By not having a server side check, your ci plugin allows the attacker to set the nonce to whatever he pleases.

if (isset($_COOKIE['ci_token'])) {
$ci_token = $_COOKIE['ci_token'];
}

Sending arbitrary HTTP requests with Flash 7/8 (+IE 6.0)
http://www.securityfocus.com/archive/1/443391

By using a variable nonce (or at least a static one) and storing them in the session variables, you can achieve the proposed outcome. I currently allow the last 5 generated tokens in an active session to be used (overwriting the oldest). These tokens expire after a set time even if the session remains active. This allows for user friendly sites (back button) as well as tabbed browsing.

This site is really interesting for excisting people.

Sherwood park jobs

come 2 me

[...] of private data and other high value targets from end-users’ PCs to popular web applications, interest in CSRF and other web application vulnerabilities will only continue to [...]

[...] of private data and other high value targets from end-users’ PCs to popular web applications, interest in CSRF and other web application vulnerabilities will only continue to grow. As we designed Internet [...]

fx infinity
fx 主婦 4 億
ディ トレード
仕手 株 で しっかり 儲ける 投資 術
オリコン チャート 分析
fx ランキング
ワイド スプレッド
デイトレ っ
アストマックス スワップ
ポンド ドル 円
完全 自動 売買 プロポジ fx
tl スプレッド
fx 必勝 法 タダ
セミナー fx 申込
ターナー の 短期 売買 革命
システム トレード 日経
デイトレ 推奨 銘柄
投資情報
agp fx
為替 レート 推移
仕手株
株式 投資 日記
fx で 自動 売買 で 生活 する ぞ
短期 売買 技法
NZドル 外国為替
外国 為替 fx 情報
bbh3 レート
スイスフラン 外国為替
チャート マスター
スワップ 喫茶
オリコン チャート
短期 売買 税金
super fx system
の 株価 チャート ソフト
香港 為替
株価 チャート らくらく 分析
東京 為替
ローソク 足 の 格
株式 投資 情報
ちゃん デイトレ
株 システム
google スプレッド
の 主婦 が fx
為替 レート 2007
ローソク 足 酒田
日経225 先物
株式 投資 方法
アクセ レート
カレンダー スプレッド
super fx system 検証
商品 チャート
トレイダーズ fx
sarah fx
取引 fx コスト 初心者
fx 手数料 初心者
システムトレードデータ
システムトレードバックテスト
日経 225 先物 手数料
分析 チャート 分析
為替 交換
株式 デイトレード
外国為替
無料 情報 商 材
gl スプレッド
日経 225 先物 日足
z チャート 分析
maro デイトレ
デイトレーダー
株式 チャート
fx 必勝 の ため
デイトレ講座
デイ トレード 生活
fx で月 200 稼ぎ出す究極のデイトレード
fx 初心者 必勝 法
通貨 為替
デッド スワップ
fx 初心者 必勝 法 無料
日経先物
スワップ 金利
株価 表示 ソフト
韓国 通貨 レート
ネット 株式 取引
fx システム トレード で 豪邸
株 チャート
fx 自動 売買 証券
ユーロ 円 レート
取引 先物
通貨 外国為替
fx スワップ ブログ
為替 推移
情報商材
トレード システム super fx system
自動売買
株式 情報
スプレッド シート と は
為替 レート 台湾 ドル
fx システムトレードエクセル
デイトレ する なら スイング
fx デイトレ
外貨 外国為替
短期 売買 研究 会
デイ トレード 入門 短期 売買
みずほ レート
システムトレード研究所
fx 初心者 ドット
日経225システムトレード
信託 短期 売買
日経225先物比較
fx 初心者 の テクニカル 必勝
日本 円 為替
スワップ 比較
グラフ チャート
チャート の 分析
Fチャート
検証くん
eva スプレッド
ペソ レート
pc fx ソフト
fx 初心者 口座 開設
デイトレ 注目 銘柄
fx 初心者 の ため の 簡単 fx 講座
システムトレード情報
迷 える 子羊 デイトレ
カルビ チャート
で fx 自動 売買 net
外国 為替 レート チャート
ドル 円 計算
fx 外国 為替 稼ぐ
スワップ マジック
ubuntu スワップ 領域
fx システムトレードエクセル
fx 比較
fx 自動 売買 比較
ニュージーランド ドル 為替 レート
fx 100
super fx system レビュー
元 レート
fx 自動 売買 無料
fx 短期 売買 法
分 足 ローソク
スワップ ps2
fx デイトレ 比較
us レート
fx 初心者 専用 質問
取引 法 短期 売買
ローソク 足 三
スワップ dvd
market fx
換金 ドル 円
為替 レート 計算
fx online
ニュージーランド ドル 為替
短期 売買 の 魅力
お 勧め の 株価 チャート ソフト
fx 情報商材
線 ローソク 足
fx システム トレード excel
fx 初心者 必勝 法
日経 225 とは
の 短期 売買 革命
デイ トレード 株
fx 初心者 必勝
株 シュミレーション
為替 動向
FX 稼ぐ
通貨 ペア で 賢く 儲ける fx
金融 商品 取引 法 短期 売買
パイロン システム トレード
外貨 換算 レート
短期 売買 マニュアル
デイ トレード 方法
fx 初心者 セミナー
株価 ソフトウェア
証券 システム トレード
チャート 分析 方法
外国 為替 両替
quadro fx 4600
fx 勝つ ため
香港ドル スワップ
為替 レート 変動
fx 初心者 でも
オンライン スプレッド シート
スプレッド 為替
ショットガン fx
外国為替 推移
ヒランヤ スプレッド
スワップ スプレッド と は
ペソ 為替
ローソク足読み方
銀行 為替 レート
スプレッド ボム
自動 売買 プロポジ fx
ものぐさ デイトレ 必勝
スプレッド s
fx 初心者 が 失敗
自動 取引
エクセル 株価 チャート
株 チャート ソフト
証券 ネット
スプレッド ロック
情報 売買
株 スプレッド
ソニーバンク レート
チャート 攻略
外国 為替 相場 一覧表
fx スワップ ポイント 比較
時 系列 移動 平均 線
fx online
株式ソフト
式 デイ トレード fx
スプレッド プラス
オリーブ オイル スプレッド
株 トレード
odl fx
ラリーウイリアムズ短期売買法
外国 為替 レート リアルタイム
初心者 fx システム
トレード ネット
自動 売買 証券
fx デイ トレード
デイトレ 儲かる
株 初心者 儲ける
スプレッド 安い
fx 必勝 の ため
ドル 円 データ
為替 レート rmb
初心者 の 為 の fx
外貨 取引
デイトレ macd
fx 5600
株式
クレジット カード 為替 レート
短期 売買 と は
チャート 分析 大全
円 金利 スワップ
デイトレ 配信
短期 売買 法
fx 分析 ソフト はんだ ん
fx キャッシュバック
元 為替
為替 比較
が 読める チャート 分析
の 短期 売買 実践 ノート
豪ドル 外国為替
スワップ 掲示板
証券 会社 自動 売買
3p スワップ
fx 4
200 日 移動 平均 線
ローソク 足 トンカチ
スプレッド 0.5
fx 会社
サザ デイトレ
チャート テクニカル 分析
自動 売買 無料
野村 トレード
主要 株主 短期 売買
スプレッド 縮小
fx スワップ
チャート 分析 テクニック
スプレッド ツール
fx の 自動 売買
式 fx システム トレード
kosei 式 デイトレ
デイトレ 部屋
ピナクル ゴールド fx ソフト
スワップ マジック 3 8
fx 儲ける 方法
初心者 おすすめ fx 会社
為替 レ ト
fx 初心者 が
為替 レート オーストラリア
株情報
fx デイトレ
オーストラリアドル 外国為替
オートトレードシステム
為替 レート 変動
fx 初心者 の ため の fx 成功 法則
スプレッド ランキング
完全 自動 売買 レンタル fx
デイトレ 2
システム ソフト 株価
ユーロドル スワップ
ラリー の 短期 売買 入門
fx 初心者 おすすめ
fx で 儲ける 21 の
fx 完全 自動 売買 システム
スワップ マジック 3.8
外国為替 スワップポイント
為替 レート 台湾
デイトレ 画面
sata ほっと スワップ
fx 初心者 ブログ
デイトレ 液晶
fx 初心者 から
fx 初心者 セミナー
株式 投資 情報 サイト
株価 チャート ソフト
為替 チャート ソフト
FX システムトレード 作り 方

[...] пользователей к популярным веб-приложениям, интерес к CSRF и другим уязвимостям веб-приложений будет только [...]

[...] пользователей к популярным веб-приложениям, интерес к CSRF и другим уязвимостям веб-приложений будет только [...]

[...] пользователей к популярным веб-приложениям, интерес к CSRF и другим уязвимостям веб-приложений будет только [...]

[...] see also Bill Zeller’s blog post describing the attack and the Wikipedia page for cross-site request [...]

Sorry, comments closed.