/

CVE-2026-28696

Severity:

HIGH RISK

(7.5)

Authorization Bypass / Insecure Direct Object Reference

CVE-2026-28696

Analyzed

Vulnerability type

Category:

Authorization Bypass / Insecure Direct Object Reference

CWE:

CWE-639

Impact:

Unauthorized Data Exposure

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A broken authorization check in Craft CMS's GraphQL @parseRefs directive allows attackers to resolve internal reference tags into sensitive element attributes without proper access control.

When a public GraphQL schema is enabled, even unauthenticated guests can abuse this behavior to read data they are not authorized to view across various CMS elements.

Affected context

This vulnerability affects Craft CMS instances that expose the GraphQL API and use the @parseRefs directive to resolve internal reference tags such as {user:1:email} or other element attributes.

It becomes relevant when:

  • The GraphQL API is enabled, and
  • Either authenticated users or unauthenticated guests (via a Public Schema) can send queries using @parseRefs.

In this context, the Elements::parseRefs implementation attempts to resolve references into element fields but does not consistently apply authorization checks before returning the resolved values.

Exploit preconditions

  • Attack surface: Craft CMS GraphQL endpoint where the @parseRefs directive is available.
  • Required access:
  • Any authenticated GraphQL consumer; and
  • Unauthenticated guests if a Public Schema is enabled for GraphQL.
  • Trigger point: Execution of a GraphQL query that applies @parseRefs to carefully crafted reference tags targeting sensitive elements or attributes.
  • Why exploitation is possible: The Elements::parseRefs function resolves internal reference tags and returns associated element attributes without enforcing per-element authorization checks, effectively bypassing normal access control rules.

Why this happens

The core issue is an authorization check omission in the code path responsible for parsing internal reference tags within the GraphQL layer.

The Elements::parseRefs implementation treats any syntactically valid reference tag as resolvable, assuming the caller is authorized, and fails to verify whether the current principal (user or guest) has permission to view the targeted element or attribute.

This maps directly to CWE-639: Authorization Bypass Through User-Controlled Key, since attackers supply identifiers or references (e.g., element IDs) that the system uses to fetch data without re-checking access rights.

Potential impact

  • Unauthorized reading of sensitive user attributes (e.g., email addresses or profile details).
  • Exposure of confidential content fields from entries, assets, or other CMS elements.
  • Leakage of internal identifiers and structural metadata that can support further attacks (enumeration, social engineering, targeted phishing).
  • Potential regulatory or compliance impact if personal or regulated data is exposed.

General mitigation guidance

Effective mitigation centers on enforcing robust authorization checks wherever identifiers or reference tags are resolved:

  • Ensure that any function resolving element references (like parseRefs) performs explicit permission checks against the current user or API consumer before returning data.
  • Treat internal reference tags as untrusted input when they originate from GraphQL or other client-controlled interfaces, and validate them as you would any direct ID-based lookup.
  • Constrain GraphQL schemas to the minimum required fields and types, avoiding exposure of sensitive attributes through generalized directives.
  • Where feasible, separate public and private data models or views so that even if a resolver is misused, sensitive data is never placed on publicly reachable types.
  • Apply the principle of least privilege for GraphQL APIs by disabling public schemas or reducing their scope when not strictly needed.

How teams detect issues like this

Detection generally involves both code-level analysis and runtime monitoring:

  • Static analysis / code review:
  • Identify API endpoints or resolvers that accept user-controlled identifiers, reference tags, or keys and verify that they all perform authorization checks.
  • Look for helper methods like parseRefs or similar that retrieve elements by ID or handle templated references without checking permissions.
  • Enforce secure coding guidelines that mandate access checks at all data access boundaries, especially in shared utility functions.
  • Policy and automated checks:
  • Use security linters or custom rules to flag ID-based lookups that do not pass through a standardized authorization helper.
  • Implement CI policies that require security review for changes touching GraphQL resolvers or access-control logic.
  • Runtime monitoring:
  • Log GraphQL queries and look for patterns where @parseRefs is used with unusual or out-of-scope element IDs.
  • Monitor for spikes in GraphQL traffic that enumerate element IDs or fields that are typically non-public.

Sources

SourceLink
github.comgithub.com/craftcms/cms/commit/4d98a07e47580f1712095825d3e3c4d67bc9f8b9
github.comgithub.com/craftcms/cms/security/advisories/GHSA-7x43-mpfg-r9wj

Frequently asked

questions

The vulnerability can be exploited wherever the GraphQL @parseRefs directive is available. Any authenticated GraphQL client is at risk, and if a Public Schema is enabled, unauthenticated guests can also craft queries to access data they should not see.

Not necessarily. If a public GraphQL schema is enabled and exposes @parseRefs, an attacker can exploit the issue without authentication. In environments without a public schema, an attacker needs at least some level of authenticated GraphQL access.

Centralize authorization logic and ensure that any function resolving elements, especially those using user-supplied identifiers or reference tags, calls a common permission-checking routine. The resolver should return only data that the current user or API consumer is explicitly permitted to view.

Adopt a defense-in-depth approach: funnel all resource lookups through a small set of well-tested access-control helpers, restrict GraphQL schemas to only necessary fields, avoid exposing sensitive attributes by default, and enforce security-focused code review for changes affecting resolvers and shared utility methods like parseRefs.

Find out what's already
exploitable in your codebase.