craftcms/cms
Affected
- introduced
4.0.0-RC1, fixed4.17.0-beta.1(ecosystem)
Fixed versions
4.17.0-beta.1
Fix
The export has no generic command for this ecosystem.
Advisory
Also known as: CVE-2026-28696
Craft CMS has IDOR via GraphQL @parseRefs
The GraphQL directive @parseRefs, intended to parse internal reference tags (e.g., {user:1:email}), can be abused by both authenticated users and unauthenticated guests (if a Public Schema is enabled) to access sensitive attributes of any element in the CMS. The implementation in Elements::parseRefs fails to perform authorization checks, allowing attackers to read data they are not authorized to view.
Vulnerability Details
craft\services\Elements::parseRefs identifies reference tags and resolves them using _getRefTokenReplacement. This method fetches the referenced element and accesses the specified attribute via $element->$attribute.
canView() checks.getElementTypeByRefHandle allows referencing any element type (entry, asset, user, category).__get() to resolve custom field handles, an attacker is not limited to core attributes. They can exfiltrate any custom field data by enumerating the field handle (e.g. {entry:123:privateNotes}).Attack Vectors
An attacker can enumerate sensitive attributes of administrators or other users.
{user:1:email} or {user:1:photoId}The vulnerability allows reflecting any accessible property of the underlying Element model.
{user:1:username} (Confirmed: returns admin), {user:1:admin}.{user:1:authKey}) exposes full server stack traces in the GraphQL error response (e.g., Exception: No user session token exists with paths like /var/www/html/...).The vulnerability is not limited to Users. Reference tags can target any element type.
{entry:456:myConfidentialField} (Bypasses canView checks).{volume:1:path} can expose internal file system paths.Confirmed locally. The @parseRefs directive is active in the Public Schema. By injecting a payload into a public-facing field (e.g., a "News" entry title), an unauthenticated guest can trigger the resolution and retrieve the sensitive output.
Steps to Reproduce
curl -X POST \
-H "Content-Type: application/json" \
-d '{"query": "{ entries { title @parseRefs } }"}'
{"data":{"entries":[{"title":"admin"}]}} (or the email).{user:1:authKey} triggers an internal server error that leaks the full server path in string format.Impact
Recommended Fix
Modify Elements::parseRefs to enforce canView permissions on the resolved element before extracting attributes.
References
https://github.com/craftcms/cms/commit/4d98a07e47580f1712095825d3e3c4d67bc9f8b9
High Basis: The source's own band: HIGH
4.0.0-RC1, fixed 4.17.0-beta.1 (ecosystem)4.17.0-beta.1
The export has no generic command for this ecosystem.
5.0.0-RC1, fixed 5.9.0-beta.1 (ecosystem)5.9.0-beta.1
The export has no generic command for this ecosystem.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0