{"answers":{"affected":"9 open source packages ship an affected version, including moodle/moodle and moodle. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2020-14321 exists.","fix":"Upgrade moodle/moodle to a fixed version for your release line: 3.5.13, 3.7.7, 3.8.4 or 3.9.1.","what":"CVE-2020-14321 is a high-severity vulnerability in Moodle Moodle, published on 16 Aug 2022. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2020-14321 and fix it if it is affected.\n\nWhat it is: CVE-2020-14321 is a high-severity vulnerability in Moodle Moodle, published on 16 Aug 2022. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2020-14321 exists.\n\nAffected packages and fixed versions:\n- moodle/moodle (Packagist): affected all versions; fixed in 3.5.13\n- moodle/moodle (Packagist): affected all versions; fixed in 3.5.13\n- moodle/moodle (Packagist): affected from 3.6.0-beta; fixed in 3.7.7\n- moodle/moodle (Packagist): affected from 3.6.0-beta; fixed in 3.7.7\n- moodle/moodle (Packagist): affected from 3.8.0-beta; fixed in 3.8.4\n- moodle/moodle (Packagist): affected from 3.8.0-beta; fixed in 3.8.4\n- moodle/moodle (Packagist): affected from 3.9.0-beta; fixed in 3.9.1\n- moodle/moodle (Packagist): affected from 3.9.0-beta; fixed in 3.9.1\n- moodle (Bitnami): affected from 3.5.0; fixed in 3.5.13, 3.7.7, 3.8.4, 3.9.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2020-14321/ (Markdown: https://insights.sbomify.com/CVE-2020-14321/index.md)","id":"CVE-2020-14321","markdown":"https://insights.sbomify.com/CVE-2020-14321/index.md","name":"CVE-2020-14321","record":{"aliases":["BIT-moodle-2020-14321","GHSA-9q29-jcjw-fw7h","UBUNTU-CVE-2020-14321"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"Moodle LMS","requires_auth":"low_privilege","summary":"Teachers can improperly assign themselves the manager role in a course, allowing unauthorized privilege escalation within the Moodle learning platform.","user_interaction":"not_required","vuln_class":"privilege_escalation"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"redhat","cpe":[{"product":"moodle","vendor":"moodle"}],"cvss":{"score":8.8,"severity":"high","source":"nvd","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-863","name":"Incorrect Authorization"}],"description":"In Moodle before 3.9.1, 3.8.4, 3.7.7 and 3.5.13, teachers of a course were able to assign themselves the manager role within that course.","ecosystems":["Bitnami","Packagist"],"exploits":{"exploitdb":0,"first_seen":"2020-07-20","github_poc":3,"max_poc_stars":44,"metasploit":1,"nuclei":0,"refs":[{"date":"2020-07-26T01:28:53Z","kind":"github_poc","ref":"https://github.com/HoangKien1020/CVE-2020-14321","stars":44,"title":"Course enrolments allowed privilege escalation from teacher role into manager role to RCE"},{"date":"2021-04-28T19:46:55Z","kind":"github_poc","ref":"https://github.com/lanzt/CVE-2020-14321","stars":22,"title":"Python script to exploit CVE-2020-14321 - Moodle 3.9 - Course enrollments allowed privilege escalation from teacher role into manager role to RCE."},{"date":"2022-02-01T18:29:11Z","kind":"github_poc","ref":"https://github.com/f0ns1/CVE-2020-14321-modified-exploit","stars":2,"title":"Modified Moodle exploit for privilege escalation (Dorvack)"},{"date":"2020-07-20","kind":"metasploit","ref":"exploit/multi/http/moodle_teacher_enrollment_priv_esc_to_rce","stars":null,"title":"Moodle Teacher Enrollment Privilege Escalation to RCE"}],"tier":"weaponised"},"has_fix":true,"headline":"Moodle Incorrect Authorization vulnerability","id":"CVE-2020-14321","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":"moodle:moodle","products":["moodle:moodle"],"type":"privilege_escalation","year":"2020"},"n_packages":9,"n_references":1,"next":{"headline":"Denial of service in Moodle","id":"CVE-2020-14322"},"packages":[{"ecosystem":"Bitnami","fixed":["3.5.13","3.7.7","3.8.4","3.9.1"],"introduced":["3.5.0","3.7.0","3.8.0","3.9.0"],"last_affected":[],"package":"moodle","purl":"pkg:bitnami/moodle","source":"BIT-moodle-2020-14321"},{"ecosystem":"Packagist","fixed":["3.5.13"],"introduced":["0"],"last_affected":[],"package":"moodle/moodle","purl":null,"source":"GHSA-9q29-jcjw-fw7h"},{"ecosystem":"Packagist","fixed":["3.5.13"],"introduced":["0"],"last_affected":[],"package":"moodle/moodle","purl":"pkg:composer/moodle/moodle","source":"GHSA-9q29-jcjw-fw7h"},{"ecosystem":"Packagist","fixed":["3.7.7"],"introduced":["3.6.0-beta"],"last_affected":[],"package":"moodle/moodle","purl":null,"source":"GHSA-9q29-jcjw-fw7h"},{"ecosystem":"Packagist","fixed":["3.7.7"],"introduced":["3.6.0-beta"],"last_affected":[],"package":"moodle/moodle","purl":"pkg:composer/moodle/moodle","source":"GHSA-9q29-jcjw-fw7h"},{"ecosystem":"Packagist","fixed":["3.8.4"],"introduced":["3.8.0-beta"],"last_affected":[],"package":"moodle/moodle","purl":null,"source":"GHSA-9q29-jcjw-fw7h"},{"ecosystem":"Packagist","fixed":["3.8.4"],"introduced":["3.8.0-beta"],"last_affected":[],"package":"moodle/moodle","purl":"pkg:composer/moodle/moodle","source":"GHSA-9q29-jcjw-fw7h"},{"ecosystem":"Packagist","fixed":["3.9.1"],"introduced":["3.9.0-beta"],"last_affected":[],"package":"moodle/moodle","purl":null,"source":"GHSA-9q29-jcjw-fw7h"},{"ecosystem":"Packagist","fixed":["3.9.1"],"introduced":["3.9.0-beta"],"last_affected":[],"package":"moodle/moodle","purl":"pkg:composer/moodle/moodle","source":"GHSA-9q29-jcjw-fw7h"}],"prev":{"headline":"Moodle reflected XSS Vulnerability","id":"CVE-2020-14320"},"products":["Moodle"],"published":"2022-08-16","related":[{"cvss_score":10,"headline":"File upload in n/a","id":"CVE-2006-4935","kev_date_added":null,"published":"2006-09-23"},{"cvss_score":10,"headline":"Moodle does not properly validate module instance id","id":"CVE-2006-4936","kev_date_added":null,"published":"2006-09-23"},{"cvss_score":10,"headline":"Unknown \"front page vulnerability with Moodle servers\" for Moodle before 1.3.2 has unknown impact and attack vectors.","id":"CVE-2004-2233","kev_date_added":null,"published":"2005-07-17"},{"cvss_score":10,"headline":"Cross-site scripting in n/a","id":"CVE-2004-2235","kev_date_added":null,"published":"2005-07-17"},{"cvss_score":10,"headline":"Other in n/a","id":"CVE-2004-2236","kev_date_added":null,"published":"2005-07-17"},{"cvss_score":10,"headline":"Unknown vulnerability in Moodle before 1.3.4 has unknown impact and attack vectors, related to \"strings in Moodle texts.\"","id":"CVE-2004-2237","kev_date_added":null,"published":"2005-07-17"},{"cvss_score":10,"headline":"Multiple unknown vulnerabilities in Moodle before 1.5.1 have unknown impact and attack vectors.","id":"CVE-2005-2247","kev_date_added":null,"published":"2005-07-12"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"BSD-3-Clause","name":"Metasploit"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["n/a"]},"summary":"Teachers can improperly assign themselves the manager role in a course, allowing unauthorized privilege escalation within the Moodle learning platform.","url":"https://insights.sbomify.com/CVE-2020-14321/"}