LoginSignup
4
1

More than 5 years have passed since last update.

Bitbucketにあった2つのStored XSS

Last updated at Posted at 2016-12-15

本記事は脆弱性"&'<<>\ Advent Calendar 2016の15日目の記事です。

Bitbucketに2つXSSを報告したお話です。

XSS on branch name (upon delete)

alert-1.png

alert-2.png

画像が全てです。ブランチを削除した時に表示されるメッセージがエスケープされていなかったためXSSが可能でした。ワンタイムですがStored XSSのため、任意のブラウザで発現可能でした。言うまでもなくユーザーインタラクションが必要なため、弱めのXSSです。

XSS with issue title and commit message

Issueを git commit -m "fix #1" としてコミットメッセージからresolveした場合、Web UI上ではコミットメッセージ内のIssue番号がIssueのタイトルで置換されて表示される仕様でした。その際、Issueタイトルがエスケープされずに表示されていたため、

  1. "><script>alert(document.domain)</script> というタイトルのissueを立てる。
  2. git commit -m "fix #1" && git push でこのissueをresolveする。

という手順でStored XSSが作れました。

alert.png

s_tag.png

これはログイン状態に関わらずIssueのページに誘導するだけで発現させられた他、Bitbucketトップページの"Recent Activity"の中にも表示されており、Bitbucket上で自分をフォローしている全てのユーザーのトップページにXSSを仕込めるようになっていたため、強力なXSSでした。

結果

AtlassianのSecurity Hall of Fameに名前を載せてもらった他、Tシャツを貰いました。

おわり

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1