Craft's GraphQL site-scope fix was incomplete
Craft's GraphQL tokens can be limited to a single site, and on December 1 the Craft team published an advisory saying that limit still had a gap: GHSA-vvm6-wrc8-5fgh, titled "Incomplete fix for GHSA-7rr3-4jcm-x526". It is rated Moderate, has no CVE, and affects craftcms/cms from 5.0.0 up to but not including 5.12.0. The fix is 5.12.0. It is a small advisory, but it shows how easy it is to half-close an authorization hole.
What the first fix covered
The original advisory, GHSA-7rr3-4jcm-x526, was published on October 5 and fixed in 5.11.0. It said GraphQL tokens were not held to their schema's site scope in three places: entry creation, deleteEntry when no siteId is passed, and the Category, Tag and Asset delete mutations. Craft enforces scope through MutationResolver::requireAllowedSite(), and the entry create path simply never called it.
What was still open
The new advisory describes the leftover case this way: a GraphQL token whose schema allows only one site can still delete an element that is shared with other sites, and the deletion removes the element from those other sites too. The advisory calls it a remediation failure of the earlier fix, not a new root cause.
The earlier advisory explains why this is limited. Elements that exist only in a site outside the token's scope can't be reached, because fetching is restricted to the allowed sites. The delete only works on elements that also exist in a site the token may see. But on a multi-site install, shared elements are normal. Think of an asset or a tag propagated to every site. A token you handed to the "Site A" frontend for housekeeping could therefore wipe content that site B depends on.
The timeline
Per the 5.12.0 release notes, 5.12.0 shipped on November 3. The notes list a fix for GHSA-vvm6-wrc8-5fgh as a "moderate-severity authorization bypass vulnerability". The advisory itself went public on December 1, so the gap between patch and details was about four weeks. The same release also fixed GHSA-hgwm-4xxx-w8jq. Both were published the same day.
The 5.12.0 notes also add site-scope features: a "Sites" pane on multi-site element edit pages, per-site asset deletion in volumes that allow per-asset site selection, and a rule that deleting an element that exists in only one site now soft-deletes it. This is the area of code that was changing, which fits with the fix landing there.
What I'd do
- Upgrade to 5.12.0 or later. Anything on 5.11.x only has the first fix.
- List your GraphQL schemas and tokens. For each one restricted to a single site, ask whether it has delete mutations enabled at all. If it doesn't need them, switch them off.
- Don't treat "scoped to one site" as a boundary on multi-site installs where elements propagate. The advisory doesn't mention a workaround, so I wouldn't count on one.
The practical lesson is the one I keep relearning with config and permissions in CMSes. A rule enforced by hand in each resolver will eventually be missed in one of them. The first advisory fixed three places and missed the fourth. I'd rather see the check enforced once, centrally, than keep reading follow-up advisories.