CVE-2026-28696: Craft affected by IDOR via GraphQL @parseRefs

Published Mar 3, 2026
·
Updated

Craft is a content management system (CMS). Prior to 4.17.0-beta.1 and 5.9.0-beta.1, 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. This vulnerability is fixed in 4.17.0-beta.1 and 5.9.0-beta.1.

Other sources

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.

- Missing Auth Check: It bypasses canView() checks. - Polymorphic Access: getElementTypeByRefHandle allows referencing any element type (entry, asset, user, category). - Custom Field Access: Since Craft elements use 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

1. Privilege Escalation / User Data Leak

An attacker can enumerate sensitive attributes of administrators or other users.

- Payload: {user:1:email} or {user:1:photoId}

2. Arbitrary Property Reflection & Server-Side Logic Execution

The vulnerability allows reflecting any accessible property of the underlying Element model.

- Username/Admin Enumeration: {user:1:username} (Confirmed: returns admin), {user:1:admin}. - Internal Path Disclosure: Accessing methods that trigger errors (e.g., {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/...).

3. IDOR on Private Entries & Assets (Polymorphism)

The vulnerability is not limited to Users. Reference tags can target any element type.

- Payload: {entry:456:myConfidentialField} (Bypasses canView checks). - Asset Path Leakage: {volume:1:path} can expose internal file system paths.

4. Unauthenticated Exploitation (Public Schema)

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

1. Setup (Admin Panel): - Create a Section (e.g., "News") and an Entry Type. - Create a new Entry in that section. Set the Title to the payload: {user:1:username} or {user:1:email}. - Go to GraphQL > Schemas > Public Schema. Enable it, and ensure "Query for elements in the Site" and "News" section queries are checked.

2. Execute Exploit (Unauthenticated): - Send a POST request to http://localhost:8000/index.php?action=graphql/api: curl -X POST \ -H "Content-Type: application/json" \ -d '{"query": "{ entries { title @parseRefs } }"}'

3. Observation: - The API returns {"data":{"entries":[{"title":"admin"}]}} (or the email). - Using {user:1:authKey} triggers an internal server error that leaks the full server path in string format.

Impact

- Critical Information Disclosure: Full PII enumeration (emails, usernames). - System Information Leakage: Absolute server paths via stack traces. - Authentication Bypass: Guest accounts can effectively query the database as the system user.

Recommended Fix

Modify Elements::parseRefs to enforce canView permissions on the resolved element before extracting attributes.

References

https://github.com/craftcms/cms/commit/4d98a07e47580f1712095825d3e3c4d67bc9f8b9

GitHub

Affected Software

10 affected componentsFixes available
composer/craftcms/cms>=5.0.0-RC1<5.9.0-beta.1
5.9.0-beta.1
composer/craftcms/cms>=4.0.0-RC1<4.17.0-beta.1
4.17.0-beta.1
CraftCMS Craft CMS>4.0.0<4.17.0
CraftCMS Craft CMS>5.0.0<5.9.0
CraftCMS Craft CMS=4.0.0
CraftCMS Craft CMS=4.0.0-rc1
CraftCMS Craft CMS=4.0.0-rc2
CraftCMS Craft CMS=4.0.0-rc3
CraftCMS Craft CMS=5.0.0
CraftCMS Craft CMS=5.0.0-rc1

Event History

Mar 3, 2026
Advisory Published
via GitHub·08:38 PM
Data Sourced
via GitHub·08:38 PM
DescriptionWeaknessAffected Software
Mar 4, 2026
CVE Published
via MITRE·04:21 PM
Data Sourced
via MITRE·04:21 PM
DescriptionWeakness
Data Sourced
via NVD·05:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Dec 1, 58158
Event
via FIRST·11:11 AM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-28696?

CVE-2026-28696 is a high severity vulnerability that allows exploitation via IDOR in GraphQL.

2

How do I fix CVE-2026-28696?

To fix CVE-2026-28696, upgrade Craft CMS to version 5.9.0-beta.1 or 4.17.0-beta.1 or later.

3

Who is affected by CVE-2026-28696?

CVE-2026-28696 affects users of Craft CMS versions prior to 4.17.0-beta.1 and 5.9.0-beta.1.

4

Can unauthenticated users exploit CVE-2026-28696?

Yes, both authenticated users and unauthenticated guests can exploit CVE-2026-28696.

5

What component is vulnerable in CVE-2026-28696?

The vulnerable component in CVE-2026-28696 is the GraphQL directive @parseRefs used in Craft CMS.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203