CVE-2026-50281: CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes in craftcms cms
Craft CMS is a content management system (CMS). Versions 5.7.0 and above, prior to 5.9.21 contain a mass-assignment flaw in the bulk-duplicate element action. An attacker who is only able to duplicate their own entires can submit an arbitrary id through the newAttributes request parameter. The duplication routine overrides its own id = null reset with that value and writes the attacker's attributes into the victim's existing entry row. ElementsController::beforeAction() pulls the request body into $this->_attributes and rejects requests that ship an id or canonicalId key at the top level, actionBulkDuplicate(), reads a separate newAttributes array and passes it straight through to the service layer. Elements::duplicateElement() clones the source element, sets id to null, and then hands the attacker's array to Craft::configure(), which overwrites the reset id with any numeric value inside $newAttributes. PHP Yii's saveElement() then performs an UPDATE against the row with that primary key instead of an INSERT. The attackers's title, slug, authorId, postDate, and UID land on the victim's entry. safeAttributes() on Entry includes id because the base element model exposes it, so the Collection::only() filter does not strip it. This issue has been fixed in version 5.9.21.
AI Analysis
Technical Summary
CVE-2026-50281 is a mass-assignment vulnerability in Craft CMS affecting versions 5.7.0 through 5.9.20. The vulnerability arises in the bulk-duplicate element action, where the newAttributes request parameter is passed directly to the service layer without proper filtering. Although the controller rejects id or canonicalId keys at the top level, the newAttributes array is not similarly filtered. The duplication routine clones the source element and sets its id to null, but then Craft::configure() overwrites this reset id with any numeric id present in newAttributes. Consequently, the saveElement() method performs an UPDATE on the existing database row instead of an INSERT, allowing an attacker to overwrite another entry's data such as title, slug, authorId, postDate, and UID. This flaw is classified under CWE-915 (Improperly Controlled Modification of Dynamically-Determined Object Attributes). The issue was fixed in Craft CMS version 5.9.21.
Potential Impact
An attacker with the ability to duplicate their own entries can exploit this vulnerability to modify existing entries they do not own by submitting a crafted request. This can lead to unauthorized modification of content attributes including title, slug, authorId, postDate, and UID. The vulnerability allows data integrity compromise within the CMS entries but does not require elevated privileges beyond the ability to duplicate owned entries.
Mitigation Recommendations
This vulnerability has been fixed in Craft CMS version 5.9.21. Users should upgrade to version 5.9.21 or later to remediate this issue. No official temporary fixes or workarounds are provided in the available data. Patch status is not explicitly confirmed in a vendor advisory; therefore, verify the upgrade guidance with the official Craft CMS release notes or security advisories.
CVE-2026-50281: CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes in craftcms cms
Description
Craft CMS is a content management system (CMS). Versions 5.7.0 and above, prior to 5.9.21 contain a mass-assignment flaw in the bulk-duplicate element action. An attacker who is only able to duplicate their own entires can submit an arbitrary id through the newAttributes request parameter. The duplication routine overrides its own id = null reset with that value and writes the attacker's attributes into the victim's existing entry row. ElementsController::beforeAction() pulls the request body into $this->_attributes and rejects requests that ship an id or canonicalId key at the top level, actionBulkDuplicate(), reads a separate newAttributes array and passes it straight through to the service layer. Elements::duplicateElement() clones the source element, sets id to null, and then hands the attacker's array to Craft::configure(), which overwrites the reset id with any numeric value inside $newAttributes. PHP Yii's saveElement() then performs an UPDATE against the row with that primary key instead of an INSERT. The attackers's title, slug, authorId, postDate, and UID land on the victim's entry. safeAttributes() on Entry includes id because the base element model exposes it, so the Collection::only() filter does not strip it. This issue has been fixed in version 5.9.21.
CVSS v4.0
Score 7.1high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-50281 is a mass-assignment vulnerability in Craft CMS affecting versions 5.7.0 through 5.9.20. The vulnerability arises in the bulk-duplicate element action, where the newAttributes request parameter is passed directly to the service layer without proper filtering. Although the controller rejects id or canonicalId keys at the top level, the newAttributes array is not similarly filtered. The duplication routine clones the source element and sets its id to null, but then Craft::configure() overwrites this reset id with any numeric id present in newAttributes. Consequently, the saveElement() method performs an UPDATE on the existing database row instead of an INSERT, allowing an attacker to overwrite another entry's data such as title, slug, authorId, postDate, and UID. This flaw is classified under CWE-915 (Improperly Controlled Modification of Dynamically-Determined Object Attributes). The issue was fixed in Craft CMS version 5.9.21.
Potential Impact
An attacker with the ability to duplicate their own entries can exploit this vulnerability to modify existing entries they do not own by submitting a crafted request. This can lead to unauthorized modification of content attributes including title, slug, authorId, postDate, and UID. The vulnerability allows data integrity compromise within the CMS entries but does not require elevated privileges beyond the ability to duplicate owned entries.
Mitigation Recommendations
This vulnerability has been fixed in Craft CMS version 5.9.21. Users should upgrade to version 5.9.21 or later to remediate this issue. No official temporary fixes or workarounds are provided in the available data. Patch status is not explicitly confirmed in a vendor advisory; therefore, verify the upgrade guidance with the official Craft CMS release notes or security advisories.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-04T16:26:05.985Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a46c86527e9c797190439b0
Added to database: 07/02/2026, 20:21:57 UTC
Last enriched: 07/02/2026, 20:36:18 UTC
Last updated: 07/02/2026, 21:00:28 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.