Skip to main content
Vulnerability Database/CVE-2025-68436

CVE-2025-68436: Craft CMS Information Disclosure Vulnerability

CVE-2025-68436 is an information disclosure vulnerability in Craft CMS that allows authenticated users to expose sensitive assets through profile photos. This article covers technical details, affected versions, and mitigation.

Updated:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2025-68436 Overview

Craft CMS contains an information exposure vulnerability affecting versions 5.0.0-RC1 through 5.8.20 and 4.0.0-RC1 through 4.16.16. Authenticated users can expose sensitive assets through the user profile photo feature by sending maliciously crafted requests. The flaw is tracked under GitHub Security Advisory GHSA-53vf-c43h-j2x9 and categorized as [CWE-200] Information Exposure. Craft CMS maintainers released patched versions 5.8.21 and 4.16.17 to address the issue.

Critical Impact

Authenticated attackers can read sensitive assets stored in a Craft CMS installation by abusing the photoId attribute during user profile updates.

Affected Products

  • Craft CMS versions 5.0.0-RC1 through 5.8.20
  • Craft CMS versions 4.0.0-RC1 through 4.16.16
  • Patched in Craft CMS 5.8.21 and 4.16.17

Discovery Timeline

  • 2026-01-05 - CVE-2025-68436 published to NVD
  • 2026-09-30 - Last updated in NVD database

Technical Details for CVE-2025-68436

Vulnerability Analysis

The vulnerability resides in the User element class in Craft CMS. The photoId attribute was treated as a safe (mass-assignable) attribute during user profile updates. An authenticated user could submit a crafted request that assigned the photoId of their profile photo to the ID of an arbitrary asset in the Craft installation. Because the profile photo endpoint exposes the referenced asset to the requesting user, this effectively bypasses asset access controls and discloses files the user should not be able to read.

Root Cause

The root cause is improper restriction of mass-assignable attributes on the User element. The photoId property was included in the list returned by safeAttributes(), allowing it to be overwritten through standard form submissions. Combined with the lack of an authorization check between the authenticated user and the referenced asset, this produced an information exposure condition classified under [CWE-200].

Attack Vector

An attacker needs valid authenticated credentials to the Craft CMS front-end or control panel. The attacker submits a profile update request setting photoId to the numeric ID of a target asset. Craft then associates that asset as the user's profile photo and serves it back to the attacker through the profile photo workflow.

php
         return $rules;
     }
 
+    /**
+     * @inheritdoc
+     */
+    public function safeAttributes(): array
+    {
+        return ArrayHelper::withoutValue(parent::safeAttributes(), 'photoId');
+    }
+
     /**
      * @inheritdoc
      */

The patch overrides safeAttributes() in src/elements/User.php and removes photoId from the list of mass-assignable attributes using ArrayHelper::withoutValue(). After the fix, photoId can no longer be set directly from untrusted request input. Source: Craft CMS commit 4bcb0db.

Detection Methods for CVE-2025-68436

Indicators of Compromise

  • HTTP POST requests to Craft user save endpoints (such as /actions/users/save-user or /actions/users/upload-user-photo workflows) containing an explicit photoId or user[photoId] parameter.
  • Profile photo associations in the users table that reference asset IDs belonging to private or restricted volumes.
  • Repeated profile photo changes from a single authenticated account iterating sequential asset IDs.

Detection Strategies

  • Review Craft CMS access logs for request bodies containing photoId parameters originating from non-administrator accounts.
  • Correlate asset download events with profile photo updates to identify assets served through a user profile endpoint rather than a sanctioned asset volume.
  • Audit the Craft database for users.photoId values that reference assets outside the designated user photo volume.

Monitoring Recommendations

  • Enable verbose logging on Craft CMS user and asset actions and forward logs to a centralized SIEM or data lake.
  • Alert on anomalous enumeration patterns where a single account updates profile photo associations many times in a short window.
  • Monitor outbound asset downloads tied to accounts without content editing privileges.

How to Mitigate CVE-2025-68436

Immediate Actions Required

  • Upgrade Craft CMS to 5.8.21 or 4.16.17 without delay.
  • Review users.photoId entries for references to assets outside the expected user photos volume and reset affected profile photos.
  • Rotate any secrets, API keys, or credentials that may have been stored as assets in the Craft installation.

Patch Information

Craft CMS maintainers released the fix in commit 4bcb0db554e273b66ce3b75263a13414c2368fc9, included in versions 5.8.21 and 4.16.17. The patch removes photoId from the user element's safe attributes list, blocking mass assignment from HTTP request parameters. Full details are available in the GitHub Security Advisory GHSA-53vf-c43h-j2x9.

Workarounds

  • Restrict Craft CMS authenticated access to trusted users until the patched version can be deployed.
  • Place sensitive assets in volumes that are not readable by the web process or move them outside the Craft installation.
  • Apply the upstream patch as a hotfix to src/elements/User.php on affected instances where immediate version upgrades are not feasible.
bash
# Upgrade Craft CMS using Composer
composer require craftcms/cms:^5.8.21 --update-with-dependencies
# or for the 4.x branch
composer require craftcms/cms:^4.16.17 --update-with-dependencies
php craft up

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.