Page MenuHomePhabricator

horizon accepts the same 2FA token as wikitech
Closed, ResolvedPublic

Description

How to reproduce

  1. Login at wikitech
  2. Get your 2FA token
  3. Copy the token
  4. Login at horizon
  5. Use the same token

It works in the inversed order too, e.g.:
Login to horizon, and use the same token at wikitech

I don't know, how long this is possible, but it has a big abuse potencial: Steal the 2FA token from a user, login into the other instance, and change his settings.

Event Timeline

It's supposed to do this, it was discussed in T105690 (which can probably be made public now)

I think what @Luke08151 may be saying is that mediawiki prevents the replay of OATH tokens, but if you replay the OATH token in horizon, then it works fine.

We could have horizon also check the same system for replayed tokens that mediawiki uses, but then horizon needs access to mediawiki's cache.

csteipp renamed this task from horizon accepts the same 2FA token aus wikitech to horizon accepts the same 2FA token as wikitech.May 10 2016, 10:13 PM
csteipp added a project: Cloud-VPS.
Andrew claimed this task.
Andrew subscribed.

I think this is fixed -- Horizon now uses the mediawiki 2fa plugin for verification, same as wikitech.

The MediaWiki code used for this was developed in T144712: Check for 2FA protection and enforce validation of 2FA tokens to support 2FA in Striker. Tokens are now validated by MediaWiki's OATH extension directly using a privileged API endpoint which also maintains a single cache of consumed tokens to prevent replay attacks.

bd808 changed the visibility from "Custom Policy" to "Public (No Login Required)".Apr 21 2017, 8:36 PM