Page MenuHomePhabricator

CVE-2025-11173: Reauth for enabling 2FA can be bypassed by submitting a form
Closed, ResolvedPublicSecurity

Description

Special:Manage_Two-factor_authentication makes you reauthenticate before enabling 2FA. However, the logic for this doesn't apply to POST requests, to avoid forcing another reauth when the user submits the form later (T235645). This means it's easily bypassed by just making a POST request to https://en.wikipedia.org/w/index.php?title=Special:Manage_Two-factor_authentication&action=enable&module=totp instead of a GET request.

Exploit:

$('.oo-ui-panelLayout a[role="button"]').each( function () { $(this).replaceWith( $('<form>').attr( { action: $(this).prop('href'), method: 'post' } ).append( $('<input>').attr( { type: 'submit', value: $(this).text() } ) ) ); } );

Details

Risk Rating
Medium
Author Affiliation
WMF Product

Event Timeline

Mstyles claimed this task.
Mstyles subscribed.

Now that T402094 is merged, this should be resolved

All that remains to do here is backport https://gerrit.wikimedia.org/r/c/1180998 ; @Reedy has already backported the other patches.

All that remains to do here is backport https://gerrit.wikimedia.org/r/c/1180998 ; @Reedy has already backported the other patches.

This was done.

Reedy renamed this task from Reauth for enabling 2FA can be bypassed by submitting a form to CVE-2025-11173: Reauth for enabling 2FA can be bypassed by submitting a form.Sep 29 2025, 5:50 PM
sbassett triaged this task as Medium priority.Feb 2 2026, 7:13 PM
sbassett changed the visibility from "Custom Policy" to "Public (No Login Required)".
sbassett changed the edit policy from "Custom Policy" to "All Users".
sbassett changed Risk Rating from N/A to Medium.