Craft 2FA: old sessions survived, disable was free
Turning on two-factor authentication feels like closing a door. Craft's advisory GHSA-j2r3-x468-c6j5, published on November 2, describes two ways that door stayed ajar. It is rated Low and has no CVE, but it touches the exact scenario people enable 2FA for: someone else already has a foothold in your account.
What the advisory says
The advisory lists affected versions as >= 5.0.0, < 5.11.4, with the fix in 5.11.4. It describes two separate problems.
- Existing sessions survive enabling 2FA. Log in to the same account in two browsers, enable 2FA in browser A, then refresh browser B. B stays logged in with full access and is never asked to set up or verify 2FA.
- 2FA can be disabled without re-authentication. On an account with 2FA enabled, the disable action completes without asking for the current password, a 2FA code, or a recovery code.
The weakness is classified as CWE-272, Least Privilege Violation.
Why the combination matters
Each issue alone is mild. Together they undo the point of 2FA after a session compromise. Say a session cookie leaks through a shared computer or a stolen token. You notice something is off and enable 2FA as a response. Before the fix, the attacker's session was not invalidated, so it kept working. If they wanted to go further, they could turn 2FA off again without knowing your password or holding your authenticator codes.
The advisory itself says that if an attacker already holds an active session, enabling 2FA does not restore the owner's exclusive control. That is the honest framing: this does not let a stranger in from the outside. It weakens your recovery path once someone is already in.
What I would do
- Update to 5.11.4 or later. Anything newer in the 5.x line includes the fix.
- After updating, treat enabling 2FA on a suspect account as a two-step job: enable it, then also sign out of everywhere you can and change the password. I would not assume older sessions behave the way the patched version does.
- For admin accounts, check Craft's user session and login history if you have it, and look for 2FA changes you did not make.
The advisory page does not list a workaround, and it does not give a CVSS score. I am not going to invent either. If you cannot update right away, the practical mitigation is reducing who can hold a long-lived control panel session at all.
The broader pattern
I keep noticing that session lifecycle is where authentication features leak. Login is well tested. The edges, such as "what happens to other sessions when security settings change" and "what does the disable button require", get less attention. When I review any CMS I now test those two questions before I look at anything fancier. Craft fixed them here, and it is worth running the same checks against your own custom login flows.