Moodle XSS Vulnerability
The advisory, in context
A vulnerability was found in moodle before versions 3.6.3, 3.5.5, 3.4.8 and 3.1.17. Users with the "login as other users" capability (such as administrators/managers) can access other users' Dashboards, but the JavaScript those other users may have added to their Dashboard was not being escaped when being viewed by the user logging in on their behalf.
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 3.6.0 before 3.6.3
Fixed in 3.6.3
3 explicitly affected versions
v3.6.0, v3.6.1, v3.6.2
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "3.6.0"
},
{
"fixed": "3.6.3"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"v3.6.0",
"v3.6.1",
"v3.6.2"
]
}From 3.5.0 before 3.5.5
Fixed in 3.5.5
5 explicitly affected versions
v3.5.0, v3.5.1, v3.5.2, v3.5.3, v3.5.4
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "3.5.0"
},
{
"fixed": "3.5.5"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"v3.5.0",
"v3.5.1",
"v3.5.2",
"v3.5.3",
"v3.5.4"
]
}From 3.2.0 before 3.4.8
Fixed in 3.4.8
36 explicitly affected versions
v3.2.0, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6, v3.2.7, v3.2.8, v3.2.9, v3.3.0, v3.3.0-beta, v3.3.0-rc1, v3.3.0-rc2, v3.3.0-rc3, v3.3.1, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.0-beta, v3.4.0-rc1, v3.4.0-rc2, v3.4.0-rc3, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "3.2.0"
},
{
"fixed": "3.4.8"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"v3.2.0",
"v3.2.1",
"v3.2.2",
"v3.2.3",
"v3.2.4",
"v3.2.5",
"v3.2.6",
"v3.2.7",
"v3.2.8",
"v3.2.9",
"v3.3.0",
"v3.3.0-beta",
"v3.3.0-rc1",
"v3.3.0-rc2",
"v3.3.0-rc3",
"v3.3.1",
"v3.3.2",
"v3.3.3",
"v3.3.4",
"v3.3.5",
"v3.3.6",
"v3.3.7",
"v3.3.8",
"v3.3.9",
"v3.4.0",
"v3.4.0-beta",
"v3.4.0-rc1",
"v3.4.0-rc2",
"v3.4.0-rc3",
"v3.4.1",
"v3.4.2",
"v3.4.3",
"v3.4.4",
"v3.4.5",
"v3.4.6",
"v3.4.7"
]
}Earlier releases before 3.1.17
Fixed in 3.1.17
136 explicitly affected versions
v2.3.10, v2.3.11, v2.3.4, v2.3.5, v2.3.6, v2.3.7, v2.3.8, v2.3.9, v2.4.0, v2.4.0-rc1, v2.4.1, v2.4.10, v2.4.11, v2.4.2, v2.4.3, v2.4.4, v2.4.5, v2.4.6, v2.4.7, v2.4.8, v2.4.9, v2.5.0, v2.5.0-beta, v2.5.0-rc1, v2.5.1, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.0-beta, v2.6.0-rc1, v2.6.1, v2.6.10, v2.6.11, v2.6.2, v2.6.3, v2.6.4, v2.6.5, v2.6.6, v2.6.7, v2.6.8, v2.6.9, v2.7.0, v2.7.0-beta, v2.7.0-rc1, v2.7.0-rc2, v2.7.1, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.7.16, v2.7.17, v2.7.18, v2.7.19, v2.7.2, v2.7.20, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9, v2.8.0, v2.8.0-beta, v2.8.0-rc1, v2.8.0-rc2, v2.8.1, v2.8.10, v2.8.11, v2.8.12, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.8.6, v2.8.7, v2.8.8, v2.8.9, v2.9.0, v2.9.0-beta, v2.9.0-rc1, v2.9.0-rc2, v2.9.1, v2.9.2, v2.9.3, v2.9.4, v2.9.5, v2.9.6, v2.9.7, v2.9.8, v2.9.9, v3.0.0, v3.0.0-beta, v3.0.0-rc1, v3.0.0-rc2, v3.0.0-rc3, v3.0.0-rc4, v3.0.1, v3.0.10, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7, v3.0.8, v3.0.9, v3.1.0, v3.1.0-beta, v3.1.0-rc1, v3.1.0-rc2, v3.1.1, v3.1.10, v3.1.11, v3.1.12, v3.1.13, v3.1.14, v3.1.15, v3.1.16, v3.1.2, v3.1.3, v3.1.4, v3.1.5, v3.1.6, v3.1.7, v3.1.8, v3.1.9
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.17"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"v2.3.10",
"v2.3.11",
"v2.3.4",
"v2.3.5",
"v2.3.6",
"v2.3.7",
"v2.3.8",
"v2.3.9",
"v2.4.0",
"v2.4.0-rc1",
"v2.4.1",
"v2.4.10",
"v2.4.11",
"v2.4.2",
"v2.4.3",
"v2.4.4",
"v2.4.5",
"v2.4.6",
"v2.4.7",
"v2.4.8",
"v2.4.9",
"v2.5.0",
"v2.5.0-beta",
"v2.5.0-rc1",
"v2.5.1",
"v2.5.2",
"v2.5.3",
"v2.5.4",
"v2.5.5",
"v2.5.6",
"v2.5.7",
"v2.5.8",
"v2.5.9",
"v2.6.0",
"v2.6.0-beta",
"v2.6.0-rc1",
"v2.6.1",
"v2.6.10",
"v2.6.11",
"v2.6.2",
"v2.6.3",
"v2.6.4",
"v2.6.5",
"v2.6.6",
"v2.6.7",
"v2.6.8",
"v2.6.9",
"v2.7.0",
"v2.7.0-beta",
"v2.7.0-rc1",
"v2.7.0-rc2",
"v2.7.1",
"v2.7.10",
"v2.7.11",
"v2.7.12",
"v2.7.13",
"v2.7.14",
"v2.7.15",
"v2.7.16",
"v2.7.17",
"v2.7.18",
"v2.7.19",
"v2.7.2",
"v2.7.20",
"v2.7.3",
"v2.7.4",
"v2.7.5",
"v2.7.6",
"v2.7.7",
"v2.7.8",
"v2.7.9",
"v2.8.0",
"v2.8.0-beta",
"v2.8.0-rc1",
"v2.8.0-rc2",
"v2.8.1",
"v2.8.10",
"v2.8.11",
"v2.8.12",
"v2.8.2",
"v2.8.3",
"v2.8.4",
"v2.8.5",
"v2.8.6",
"v2.8.7",
"v2.8.8",
"v2.8.9",
"v2.9.0",
"v2.9.0-beta",
"v2.9.0-rc1",
"v2.9.0-rc2",
"v2.9.1",
"v2.9.2",
"v2.9.3",
"v2.9.4",
"v2.9.5",
"v2.9.6",
"v2.9.7",
"v2.9.8",
"v2.9.9",
"v3.0.0",
"v3.0.0-beta",
"v3.0.0-rc1",
"v3.0.0-rc2",
"v3.0.0-rc3",
"v3.0.0-rc4",
"v3.0.1",
"v3.0.10",
"v3.0.2",
"v3.0.3",
"v3.0.4",
"v3.0.5",
"v3.0.6",
"v3.0.7",
"v3.0.8",
"v3.0.9",
"v3.1.0",
"v3.1.0-beta",
"v3.1.0-rc1",
"v3.1.0-rc2",
"v3.1.1",
"v3.1.10",
"v3.1.11",
"v3.1.12",
"v3.1.13",
"v3.1.14",
"v3.1.15",
"v3.1.16",
"v3.1.2",
"v3.1.3",
"v3.1.4",
"v3.1.5",
"v3.1.6",
"v3.1.7",
"v3.1.8",
"v3.1.9"
]
}References
- https://nvd.nist.gov/vuln/detail/CVE-2019-3847
- https://github.com/moodle/moodle/commit/070f24d006eab6b958eb083530de159b43c538ed
- https://github.com/moodle/moodle/commit/93dda3bfd3caaaa8d23fe8ede543f27ef774958d
- https://github.com/moodle/moodle/commit/a37e26d2efe1ca0e4d8d69c611a748af35b33674
- https://github.com/moodle/moodle/commit/e836242e1c04cd62d0afa4a790074fd245628e7a
- https://github.com/moodle/moodle/commit/ec3b63c772d6448765c68268234cf36c1a91bcac
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2019-3847
- https://github.com/moodle/moodle
- https://moodle.org/mod/forum/discuss.php?d=384010#p1547742
- https://web.archive.org/web/20200227082922/http://www.securityfocus.com/bid/107489