Twenty Year Anniversary

Kohana Framework 2.3.3 Directory Traversal

Kohana Framework 2.3.3 Directory Traversal
Posted Jan 28, 2013
Authored by Karim H.B. | Site

Kohana Framework version 2.3.3 suffers from a directory traversal vulnerability.

tags | exploit
MD5 | 711c3eebf996a214047a7c42a6a4d9d8

Kohana Framework 2.3.3 Directory Traversal

Change Mirror Download
Kohana Framework v2.3.3 - Directory Traversal Vulnerability




Common Vulnerability Scoring System:

Kohana is an open source, object oriented MVC web framework built using PHP5 by a team of volunteers that aims to be
swift, secure, and small. (copy from vendor website) This is an OOP framework that is extremely DRY. Everything is built
using strict PHP 5 classes and objects. Many common components are included: translation tools, database access, code
profiling, encryption, validation, and more.

Extending existing components and adding new libraries is very easy. Uses the BSD license, so you can use and modify it for
commercial purposes. Benchmarking a framework is hard and rarely reflects the real world, but Kohana is very efficient and
carefully optimized for real world usage. Very well commented code and a simple routing structure makes it easy to understand
what is happening. Simple and effective tools help identify and solve performance issues quickly.

(Copy of the Vendor Homepage: )

The Vulnerability Laboratory Research Team discovered a Directory Traversal web vulnerability in the Kohana v2.3.3 Content Management System.

2013-01-27: Public Disclosure


Affected Products:
Product: Framework - Content Management System 2.3.3



A Directory Traversal web vulnerability is detected in the Kohana Content Management System web application.
The vulnerability allows remote attackers to request local directories and files of the web server application system.

The vulnerability is located in the `master/classes/Kohana/Filebrowser.php` file in line 90 when processing to request
the path dir via replace. The filter replaces `../` by null and it applies on file reading requests.

Review: Kohana/Filebrowser.php

$thumb = Route::get('wysiwyg/filebrowser')
'action' => 'thumb',
'path' => str_replace(array($dir, DIRECTORY_SEPARATOR), array('', '/'), $filename)

Remote attackers can bypass the validation with the vulnerable replace function in the file browser to read local
web server files via directory (path) traversal attack.

Exploitaton of the vulnerability requires no privileged application user account and no user interaction.
Successful exploitation of the vulnerability results in read of arbitrary system files to compromise web server.

Vulnerable Module(s):
[+] Filebrowser

Vulnerable Function(s):
[+] str_replace > dir

Vulnerable Parameter(s):
[+] ?path

Proof of Concept:
The vulnerability can be exploited by remote attackers without privileged application user account and without required user interaction.
For demonstration or reproduce ...

Review: Kohana/Filebrowser.php

$thumb = Route::get('wysiwyg/filebrowser')
'action' => 'thumb',
'path' => str_replace(array($dir, DIRECTORY_SEPARATOR), array('', '/'), $filename)

Review: GET Request
GET http://media.[server].com/directory/graphics/?path=..%2F..%2F..%2F%2F..%2F..
Host: media.[server].com
User-Agent: Kami VL


The security risk of the directory traversal web vulnerability is estimated as high(+).

Vulnerability Laboratory [Research Team] - Karim B. (

The information provided in this advisory is provided as it is without any warranty. Vulnerability-Lab disclaims all warranties,
either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-
Lab or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business
profits or special damages, even if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some
states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation
may not apply. We do not approve or encourage anybody to break any vendor licenses, policies, deface websites, hack into databases
or trade with fraud/stolen material.

Domains: - -
Contact: - -
Section: - -
Social:!/vuln_lab - -
Feeds: - -

Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory.
Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other
media, are reserved by Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, sourcecode, videos and
other information on this website is trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed),
modify, use or edit our material contact ( or to get a permission.

Copyright © 2012 | Vulnerability Laboratory



RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

Want To Donate?

Bitcoin: 18PFeCVLwpmaBuQqd5xAYZ8bZdvbyEWMmU

File Archive:

August 2018

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

Top Authors In Last 30 Days

File Tags


packet storm

© 2018 Packet Storm. All rights reserved.

Security Services
Hosting By