Skip to main content
Blue Moose logo Blue Moose Field notes
← All articles
craft cms

Craft's signup form could touch inactive accounts

Code on two monitors above a keyboard with a warm backlight

Craft's public registration form is the kind of feature I enable and forget. On Craft Pro it lets strangers sign up, and I assumed the worst a stranger could do was create a junk account. GHSA-hgwm-4xxx-w8jq, published December 1, says otherwise: an anonymous request could touch an existing account that wasn't theirs. It's rated Moderate, has no CVE, and is fixed in Craft 5.12.0.

What actually goes wrong

With "Allow public registration" turned on, an unauthenticated request to users/save-user that uses the email address of an existing inactive user (active = 0, pending = 0) loads that account instead of creating a new one. The advisory states the account is modified and returned before the requester has proven they own the mailbox. It reproduces with email verification both on and off.

The affected range is >= 5.0.0, < 5.12.0. The attacker needs to know or guess the email address, which for a staff member or former customer isn't hard.

The impact, in order of how much it bothered me

  • Disclosure: the JSON response can include the inactive user's profile, such as names, custom fields, account metadata and address IDs, even when the registration itself fails validation.
  • Tampering: a single anonymous request can delete that account's direct user permissions. With a valid password in the request, the password, groups, names and fields can be overwritten as well.
  • Suspension bypass: if an admin had suspended the account, the suspension is lifted when the real mailbox owner follows the activation link. With verification off, it's lifted immediately and the account is usable with the attacker's password. The advisory notes the link-click variant needs user interaction.

The last one is the one I'd worry about. Deactivating an account is how many of us handle a departed editor or a banned member, and this path turned "inactive" into a state an outsider could act on.

What I'm doing about it

The advisory lists no workaround, so the fix is upgrading to 5.12.0 or later. Until then, the precondition is clear: Craft Pro with public registration enabled. If you don't need open signup, switching it off removes the entry point. That is my reading of the preconditions, not a mitigation the advisory offers, so treat it as a stopgap.

The same release also closes GHSA-vvm6-wrc8-5fgh, an incomplete fix for an earlier GraphQL site-scope issue: a token scoped to one site could still delete shared elements, which removes them from other sites too. Both are Moderate and both land in 5.12.0, so one upgrade covers them.

The takeaway for me is about states, not this one bug. Any flow that looks up a user by email deserves a second look at what it does when that user is inactive, suspended or pending. I'll be checking the same assumption in my own custom registration code before I call this one done.

BM
Blue Moose
The moose behind Blue Moose. Full-stack PHP developer — Drupal by day, Symfony by night, tests always.