CVE-2016-3734: Moodle Cross-site request forgery (CSRF) vulnerability
Summary
CVE-2016-3734: Moodle Cross-site request forgery (CSRF) vulnerability. Affects moodle/moodle across 4 version ranges.
< 2.7.14
>= 2.8, < 2.8.12
>= 2.9, < 2.9.6
>= 3.0, < 3.0.4
Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Moodle is an open-source learning management system (LMS) used by educational institutions worldwide. It provides a platform for creating and managing online courses, allowing educators to deliver content, interact with students, and assess their progress. Moodle is written in PHP and utilizes a database backend. This vulnerability affects Moodle versions 2.7 through 3.0.3, allowing remote attackers to exploit a cross-site request forgery (CSRF) vulnerability in the markposts.php script. This vulnerability enables attackers to hijack the authentication of users and perform unauthorized actions on their behalf, specifically marking forum posts as read.
Vulnerability Detail
The CSRF vulnerability in Moodle's markposts.php script allows attackers to trick authenticated users into unknowingly performing actions on the Moodle platform. By crafting a malicious request and enticing a user to visit a specially crafted webpage or click on a malicious link, an attacker can exploit this vulnerability to mark forum posts as read without the user's consent. This can lead to a loss of data integrity and privacy, as users may not be aware that their posts have been marked as read. Additionally, this vulnerability can be leveraged to perform other unauthorized actions on behalf of the user, depending on the functionality provided by the markposts.php script.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
< 2.7.142.7.14composer require moodle/moodle:2.7.14 -
>= 2.8, < 2.8.122.8.12composer require moodle/moodle:2.8.12 -
>= 2.9, < 2.9.62.9.6composer require moodle/moodle:2.9.6 -
>= 3.0, < 3.0.43.0.4composer require moodle/moodle:3.0.4
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a temporary workaround, users can disable the markposts.php script or restrict access to it. This can be achieved by modifying the server configuration or using access control mechanisms provided by the web server. However, it is recommended to apply the official fix by upgrading to the latest version of Moodle to ensure comprehensive protection against this vulnerability.
Conclusion
The CSRF vulnerability in Moodle's markposts.php script poses a significant risk to the integrity and privacy of user data. It is crucial for Moodle users to promptly upgrade to the latest version and apply the provided fix to mitigate this vulnerability. Regularly monitoring for security updates and following best practices for secure coding can help maintain a secure Moodle installation. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for moodle/moodle →
FAQ
Moodle is an open-source learning management system (LMS) used by educational institutions to create and manage online courses.
A CSRF vulnerability allows attackers to perform unauthorized actions on behalf of authenticated users by tricking them into unknowingly submitting malicious requests.
Attackers can exploit this vulnerability by crafting a malicious request and tricking a user into visiting a specially crafted webpage or clicking on a malicious link.
This vulnerability can lead to a loss of data integrity and privacy, as attackers can mark forum posts as read without the user's consent. It can also be leveraged to perform other unauthorized actions on behalf of the user.
To protect against this vulnerability, it is recommended to upgrade to the latest version of Moodle and apply the provided fix. Additionally, implementing secure coding practices and regularly updating Moodle can help mitigate the risk of CSRF vulnerabilities.
References
Related vulnerabilities
Recent vulnerabilities recorded for moodle/moodle.