Craft CMS Vulnerable to Stored XSS in Revision Context Menu
The advisory, in context
The revision/draft context menu in the element editor renders the creator’s fullName as raw HTML due to the
use of Template::raw() combined with Craft::t() string interpolation. A low-privileged control panel user
(e.g., Author) can set their fullName to an XSS payload via the profile editor, then create an entry with two
saves.
If an administrator is logged in and executes a specifically crafted payload while an elevated session is active, the attacker’s account can be elevated to administrator.
Users should update to Craft 5.9.11 with the patch to mitigate the issue.
Affected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
From 5.9.0-beta.1 before 5.9.11
Fixed in 5.9.11
13 explicitly affected versions
5.9.0, 5.9.0-beta.1, 5.9.0-beta.2, 5.9.1, 5.9.10, 5.9.2, 5.9.3, 5.9.4, 5.9.5, 5.9.6, 5.9.7, 5.9.8, 5.9.9
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "5.9.0-beta.1"
},
{
"fixed": "5.9.11"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"5.9.0",
"5.9.0-beta.1",
"5.9.0-beta.2",
"5.9.1",
"5.9.10",
"5.9.2",
"5.9.3",
"5.9.4",
"5.9.5",
"5.9.6",
"5.9.7",
"5.9.8",
"5.9.9"
]
}