CVE-2026-50281
CVE-2026-50281 · Craft CMS: Mass assignment via id in newAttributes during bulk duplicate overwrites existing elements
Cette page présente des faits issus de sources publiques. Consultez l’avis original avant toute mise à jour.
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 7.1 · Élevée · EPSS 0,4% · Correctif disponible
- Publication
- Mise à jour
Pile logicielle: php
Produits et versions concernés
cms
- Versions du logiciel
- >= 5.7.0, < 5.9.21: Concernée
Aucun correctif publié
craftcms/cms Packagist
- Versions du logiciel
- 5.7.0
- 5.7.1
- 5.7.1.1
- 5.7.10
- 5.7.11
- 5.7.2
- 5.7.3
- 5.7.4
- 5.7.5
- 5.7.6
- 5.7.7
- 5.7.8
- 5.7.8.1
- 5.7.8.2
- 5.7.9
- 5.8.0
- 5.8.1
- 5.8.10
- 5.8.11
- 5.8.12
- 5.8.13
- 5.8.13.1
- 5.8.13.2
- 5.8.14
- 5.8.15
- 5.8.16
- 5.8.17
- 5.8.18
- 5.8.19
- 5.8.2
- 5.8.20
- 5.8.21
- 5.8.22
- 5.8.23
- 5.8.3
- 5.8.4
- 5.8.5
- 5.8.6
- 5.8.7
- 5.8.8
- 5.8.9
- 5.9.0
- 5.9.0-beta.1
- 5.9.0-beta.2
- 5.9.1
- 5.9.10
- 5.9.11
- 5.9.12
- 5.9.13
- 5.9.14
- 5.9.15
- 5.9.16
- 5.9.17
- 5.9.18
- 5.9.19
- 5.9.2
- 5.9.20
- 5.9.3
- 5.9.4
- 5.9.5
- 5.9.6
- 5.9.7
- 5.9.8
- 5.9.9
- Plages de versions concernées
- ECOSYSTEM: ≥ 5.7.0, < 5.9.21
Mettez à jour vers 5.9.21