CentralAuth can allow logging in as any user, no password needed
Closed, ResolvedPublic

Description

I was testing change 76829, and I noticed that the JS check was firing on Special:UserLogout and logging me right back in. I investigated to see why, and discovered two bugs, that individually seem like nothing to worry about but combined allow someone to log in on any SUL wiki except loginwiki as any attached SUL user without having to supply a password.

#1 is that CentralAuthHooks::onUserLoadFromSession leaves a valid CentralAuthUser object for the user named in the centralauth_User cookie cached on the User object, even when the centralauth_Token doesn't match.

#2 is that Special:CentralAutoLogin assumes that CentralAuthUser::getInstance doesn't return a valid CentralAuthUser when the User isn't logged in. Which would normally be the case, except for bug #1.

Fixing either bug prevents the security hole. I'll attach a patch momentarily to fix both of them.


Version: master
Severity: blocker

bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz52338.
Anomie created this task.Via LegacyJul 31 2013, 7:27 PM
Anomie added a comment.Via ConduitJul 31 2013, 7:28 PM

Created attachment 13033
Patch to fix both bugs

attachment diff ignored as obsolete

Anomie added a comment.Via ConduitJul 31 2013, 8:26 PM

Created attachment 13038
Patch to fix both bugs

Add another small fix requested by Chris.

Attached: diff

csteipp added a comment.Via ConduitJul 31 2013, 10:18 PM

Fix deployed (along with an unrelated change)
22:14 logmsgbot: csteipp synchronized php-1.22wmf12/extensions/CentralAuth 'eventlogging patch'

We'll release publicly as part of the next security release.

csteipp added a comment.Via ConduitSep 5 2013, 5:02 PM

This was assigned CVE-2013-4304

Legoktm edited projects, added MW-1.22.0-release; removed MW-extension-1.22-version.Via WebDec 16 2014, 7:07 PM
csteipp added a project: Security.Via WebMar 26 2015, 8:39 PM
MarcoAurelio moved this task to Done on the MediaWiki-extensions-CentralAuth workboard.Via WebTue, May 5, 5:59 PM

Add Comment