CVE-2026-50279

CVE-2026-50279 is a high-severity security vulnerability in craftcms/cms (composer), affecting versions >= 5.0.0-RC1, < 5.9.21. It is fixed in 5.9.21.

Summary

EntriesController::actionSaveEntry() performs entry-edit permission checks before request-controlled author changes are applied to the model. The subsequent author mutation path accepts attacker-supplied authors / author parameters and allows the change when the current user is one of the old authors. Because the controller does not re-run authorization after mutating the author list, a low-privileged user can reassign an entry’s authorship to another user without holding the dedicated peer-author-change permission.

Details

The control flow begins in EntriesController.php:249. actionSaveEntry() loads the entry and enforces edit permissions before calling _populateEntryModel():

public function actionSaveEntry(bool $duplicate = false): ?Response
{
    ...
    $entry = $this->_editableEntry($this->request->getBodyParam('entryId'), $siteId);
    ...
    $this->enforceEditEntryPermissions($entry, $duplicate);
    ...
    $this->_populateEntryModel($entry);
    ...
    $success = Craft::$app->getElements()->saveElement($entry);
}

The attacker-controlled source is in EntriesController.php:588:

$entry->setAttributesFromRequest(array_filter([
    'authorIds' => $this->request->getBodyParam('authors') ??
        $this->request->getBodyParam('author') ??
        $entry->getAuthorId() ??
        static::currentUser()->id,
]));

Entry::setAttributesFromRequest() in Entry.php:1124 extracts the new author IDs and applies them if canChangeAuthor() returns true:

if (
    ($authorIds !== null || $authorId !== null) &&
    $this->canChangeAuthor()
) {
    $this->_oldAuthorIds = $oldAuthorIds;
    $this->setAuthorIds($authorIds);
}

canChangeAuthor() at Entry.php:2789 allows the author change when the current user can view peer entries and is already one of the existing authors:

return (
    empty($authorIds) ||
    in_array($user->id, $authorIds) ||
    $user->can("changeAuthorForPeerEntries:$section->uid")
);

After the author list is mutated, the controller does not re-check authorization.

This closes the exploit chain:

  1. External source: authenticated request to entries/save-entry with attacker-controlled authors[].
  2. Trust boundary failure: authorization is checked on the pre-mutation entry state, not on the post-mutation author assignment.
  3. Privileged sink: the author relationship is rewritten in persistent storage.

Preconditions derived from the source:

  1. The attacker is authenticated and can edit entry 345.
  2. The attacker is among the existing authors of entry 345, or otherwise satisfies canChangeAuthor() through the old author set.
  3. The attacker has viewPeerEntries for the section.
  4. User ID 1 exists and can be assigned as an author in that section.

Result:

  1. enforceEditEntryPermissions() succeeds on the original entry state.
  2. _populateEntryModel() reads authors[]=1 from the request body.
  3. setAttributesFromRequest() updates authorIds because canChangeAuthor() is evaluated against the old authorship state.
  4. saveElement() persists the change and _saveAuthors() rewrites the entry-author relation.
  5. Entry 345 now appears authored by user 1.

Impact

This allows low-privileged users to falsify content ownership and alter the authorship of entries without having the dedicated author-management permission. The impact includes corrupted audit trails, misleading notifications, broken approval workflows, and unauthorized reassignment of content responsibility.

Affected versions

craftcms/cms (>= 5.0.0-RC1, < 5.9.21)

Security releases

craftcms/cms → 5.9.21 (composer)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade craftcms/cms to 5.9.21 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-50279? CVE-2026-50279 is a high-severity security vulnerability in craftcms/cms (composer), affecting versions >= 5.0.0-RC1, < 5.9.21. It is fixed in 5.9.21.
  2. Which versions of craftcms/cms are affected by CVE-2026-50279? craftcms/cms (composer) versions >= 5.0.0-RC1, < 5.9.21 is affected.
  3. Is there a fix for CVE-2026-50279? Yes. CVE-2026-50279 is fixed in 5.9.21. Upgrade to this version or later.
  4. Is CVE-2026-50279 exploitable, and should I be worried? Whether CVE-2026-50279 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2026-50279 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2026-50279? Upgrade craftcms/cms to 5.9.21 or later.

Other vulnerabilities in craftcms/cms

Stop the waste.
Protect your environment with Kodem.