CVE-2026-28696: Craftcms/cms Craft CMS Has IDOR Vulnerability

HIGH
Advisory Identifier: GHSA-7x43-mpfg-r9wj
CWE-639 CWE-862
Published
Advisory Summary

CVE-2026-28696 is a HIGH craft cms has idor vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting Craftcms/cms libraries in the Packagist ecosystem. The issue involves craft cms has idor via graphql @parserefs. Remediation is available by upgrading affected packages to version 4.17.0-beta.1, 5.9.0-beta.1.

CVE-2026-28696 at a Glance

CVE Identifier CVE-2026-28696
GHSA Identifier GHSA-7x43-mpfg-r9wj
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-639: Authorization Bypass Through User-Controlled Key
Affected Product Craftcms/cms
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2026-28696

To remediate this vulnerability, upgrade all affected Craftcms/cms dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

craftcms/cms fixed: 4.17.0-beta.1
Upgrade craftcms/cms to 4.17.0-beta.1
craftcms/cms fixed: 5.9.0-beta.1
Upgrade craftcms/cms to 5.9.0-beta.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for craftcms/cms

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-28696, inspect your project dependencies for Craftcms/cms:

inspect dependencies for craftcms/cms

Analyze the terminal output to locate any version of Craftcms/cms in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.17.0-beta.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-639: Authorization Bypass Through User-Controlled Key, where the system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. In Craftcms/cms, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

CVE-2026-28696 Affected Craftcms/cms Versions

2 component(s)
Fixed Versions:
4.17.0-beta.15.9.0-beta.1
Product / Package Ecosystem Affected Versions Fixed Version
craftcms/cms
Packagist
≥ 4.0.0-RC1
< 4.17.0-beta.1
4.17.0-beta.1
craftcms/cms
Packagist
≥ 5.0.0-RC1
< 5.9.0-beta.1
5.9.0-beta.1

References

Frequently Asked Questions

What is CVE-2026-28696?
CVE-2026-28696 is a security vulnerability in Craftcms/cms involving Craft CMS has IDOR via GraphQL @parseRefs under CWE-639: Authorization Bypass Through User-Controlled Key.
Which Craftcms/cms versions are affected?
Affected versions include releases prior to 4.17.0-beta.1, 5.9.0-beta.1 across affected packages: craftcms/cms.
What version fixes CVE-2026-28696?
Upgrading to 4.17.0-beta.1, 5.9.0-beta.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is craftcms/cms affected?
Yes, craftcms/cms is affected in releases prior to 4.17.0-beta.1, 5.9.0-beta.1. Upgrade your dependency to 4.17.0-beta.1, 5.9.0-beta.1 or later.
What CWE is associated with CVE-2026-28696?
CVE-2026-28696 is classified under CWE-639: Authorization Bypass Through User-Controlled Key (The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.).
How can I check Packagist dependencies for CVE-2026-28696?
Run the dependency tree command: 'inspect dependencies for craftcms/cms'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7x43-mpfg-r9wj",
  "modified" : "2026-03-04T18:38:55Z",
  "published" : "2026-03-03T20:38:55Z",
  "aliases" : [ "CVE-2026-28696" ],
  "summary" : "Craft CMS has IDOR via GraphQL @parseRefs",
  "details" : "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.\n\n## Vulnerability Details\n\n`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.\n\n- Missing Auth Check: It bypasses `canView()` checks.\n- Polymorphic Access: `getElementTypeByRefHandle` allows referencing any element type (entry, asset, user, category).\n- 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}`).\n\n## Attack Vectors\n\n1. Privilege Escalation / User Data Leak\n\nAn attacker can enumerate sensitive attributes of administrators or other users.\n\n- Payload: `{user:1:email}` or `{user:1:photoId}`\n\n2. Arbitrary Property Reflection & Server-Side Logic Execution\n\nThe vulnerability allows reflecting any accessible property of the underlying Element model.\n\n- Username/Admin Enumeration: `{user:1:username}` (Confirmed: returns admin), {user:1:admin}.\n- 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/...`).\n\n3. IDOR on Private Entries & Assets (Polymorphism)\n\nThe vulnerability is not limited to Users. Reference tags can target any element type.\n\n- Payload: `{entry:456:myConfidentialField}` (Bypasses canView checks).\n- Asset Path Leakage: `{volume:1:path}` can expose internal file system paths.\n\n4. Unauthenticated Exploitation (Public Schema)\n\nConfirmed 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.\n\n## Steps to Reproduce\n\n1. Setup (Admin Panel):\n- Create a Section (e.g., \"News\") and an Entry Type.\n- Create a new Entry in that section. Set the Title to the payload: {user:1:username} or {user:1:email}.\n- Go to GraphQL > Schemas > Public Schema. Enable it, and ensure \"Query for elements in the Site\" and \"News\" section queries are checked.\n\n2. Execute Exploit (Unauthenticated):\n- Send a POST request to http://localhost:8000/index.php?action=graphql/api:\n```\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-d '{\"query\": \"{ entries { title @parseRefs } }\"}'\n```\n\n3. Observation:\n- The API returns `{\"data\":{\"entries\":[{\"title\":\"admin\"}]}}` (or the email).\n- Using `{user:1:authKey}` triggers an internal server error that leaks the full server path in string format.\n\n## Impact\n\n- Critical Information Disclosure: Full PII enumeration (emails, usernames).\n- System Information Leakage: Absolute server paths via stack traces.\n- Authentication Bypass: Guest accounts can effectively query the database as the system user.\n\n## Recommended Fix\n\nModify `Elements::parseRefs` to enforce `canView` permissions on the resolved element before extracting attributes.\n\n## References\n\nhttps://github.com/craftcms/cms/commit/4d98a07e47580f1712095825d3e3c4d67bc9f8b9",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "craftcms/cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0-RC1"
      }, {
        "fixed" : "4.17.0-beta.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "craftcms/cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0-RC1"
      }, {
        "fixed" : "5.9.0-beta.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/cms/security/advisories/GHSA-7x43-mpfg-r9wj"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-28696"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/cms/commit/4d98a07e47580f1712095825d3e3c4d67bc9f8b9"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/craftcms/cms"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-639", "CWE-862" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-03T20:38:55Z",
    "nvd_published_at" : "2026-03-04T17:16:21Z"
  }
}