what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

052004.txt

052004.txt
Posted May 19, 2004
Authored by Stefan Esser | Site security.e-matters.de

Within phpMyFAQ an input validation problem exists which allows an attacker to include arbitrary local files. With known tricks to inject PHP code into log or session files this could lead to remote PHP code execution. Versions affected are 1.3.12 and below for the stable releases, and 1.4.0-alpha1 and below for the developer releases.

tags | advisory, remote, arbitrary, local, php, code execution
SHA-256 | cc512101e9d54c9eba31343dacb2a44138d5ce10c2a326dca09787990a61a49c

052004.txt

Change Mirror Download
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

e-matters GmbH
www.e-matters.de

-= Security Advisory =-



Advisory: phpMyFAQ local file inclusion vulnerability
Release Date: 2004/05/18
Last Modified: 2004/05/18
Author: Stefan Esser [s.esser@e-matters.de]

Application: phpMyFAQ stable release <= 1.3.12
phpMyFAQ developer release <= 1.4.0-alpha1
Severity: A vulnerability within phpMyFAQ allows inclusion of
arbitrary local files
Risk: Medium
Vendor Status: Vendor has released a bugfixed version.
Reference: http://security.e-matters.de/advisories/052004.html


Overview:

Quote from: http://www.phpmyfaq.de

"phpMyFAQ is a multilingual, completely database-driven FAQ-system. For
the time being a MySQL database (support for other databases is under
development) is used to store all data, PHP 4.1.0 (or higher) is needed
in order to access this data. phpMyFAQ also offers a Content Management-
System, flexible multi-user support, a news-system, user-tracking,
language modules, templates, extensive XML-support, PDF-support, a
backup-system and an easy to use installation script."

Within phpMyFAQ an input validation problem exists which allows an
attacker to include arbitrary local files. With known tricks to inject
PHP code into log or session files this could lead to remote PHP code
execution.


Details:

While doing a fast audit of phpMyFAQ 1.3.12 and phpMyFAQ 1.4.0-alpha1
in both versions two different input validation problems were discovered.
Affected is in both cases index.php but in different places.

phpMyFAQ 1.3.12 constructs a template filename with userinput from the
$action variable. It prefixes some directory name and adds an extension.
This means it is not possible to include arbitrary remote files, but it
is possible to use relative paths combines with '\0' string cut attacks
to view any file on the system which is accessible and under some
circumstances this could result in arbitrary PHP code execution if the
attacker is able to inject PHP code into known files.

phpMyFAQ 1.4.0-alpha1 fails to validate that a supplied language code
is valid. When construction a language include filename the user supplied
$lang variable is used without sanity checks. Similar to the previous
issue this allows to view any file on the system. Exploiting this flaw
is possible because realpath supports paths like "dir/file.ext/../../.."


Proof of Concept:

e-matters is not going to release an exploit for this vulnerability to
the public.


Disclosure Timeline:

16. May 2004 - Vendor was notified via email.
18. May 2003 - Vendor has released new versions fixing this problem.


Recommendation:

To protect your server against similar problems with include and require
statements and remote files or '\0' cut attacks I recommened you have a
look at http://www.hardened-php.net which catches remote file includes
and '\0' attacks before they could cause damage.


GPG-Key:

Please notice that e-matters advisories will be signed from now
with this NEW key

http://security.e-matters.de/gpg_key.asc

pub 1024D/3004C4BC 2004-05-17 e-matters GmbH - Securityteam
Key fingerprint = 3FFB 7C86 7BE8 6981 D1DA A71A 6F7D 572D 3004 C4BC


Copyright 2004 Stefan Esser. All rights reserved.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFAqd/zb31XLTAExLwRAriHAKDSlRBk3ZUwPOjbtXx9l8CFy9pBrACfR4Rw
QFJt/SM5/FPT67SjuPpo5B4=
=U1Iv
-----END PGP SIGNATURE-----


--

--------------------------------------------------------------------------
Stefan Esser s.esser@e-matters.de
e-matters Security http://security.e-matters.de/

GPG-Key gpg --keyserver pgp.mit.edu --recv-key 0xCF6CAE69
Key fingerprint B418 B290 ACC0 C8E5 8292 8B72 D6B0 7704 CF6C AE69
--------------------------------------------------------------------------
Did I help you? Consider a gift: http://wishlist.suspekt.org/
--------------------------------------------------------------------------
Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    17 Files
  • 14
    May 14th
    0 Files
  • 15
    May 15th
    0 Files
  • 16
    May 16th
    0 Files
  • 17
    May 17th
    0 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 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