exploit the possibilities

Mantis Bug Tracker 1.2.17 PHP Code Injection

Mantis Bug Tracker 1.2.17 PHP Code Injection
Posted Dec 31, 2014
Authored by EgiX

Mantis Bug Tracker versions 1.2.0 through 1.2.17 suffer from a PHP code injection vulnerability.

tags | exploit, php
advisories | CVE-2014-7146
MD5 | 673ab348d712c0f346dee0bed801dc1b

Mantis Bug Tracker 1.2.17 PHP Code Injection

Change Mirror Download
-----------------------------------------------------------------------------
Mantis Bug Tracker <= 1.2.17 (ImportXml.php) PHP Code Injection Vulnerability
-----------------------------------------------------------------------------


[-] Software Link:

http://www.mantisbt.org/


[-] Affected Versions:

All versions from 1.2.0 to 1.2.17.


[-] Vulnerability Description:

The vulnerable code is located in the /plugins/XmlImportExport/ImportXml.php script:

106. printf( "Processing cross-references for %s issues...", count( $importedIssues ) );
107. foreach( $importedIssues as $oldId => $newId ) {
108. $bugData = bug_get( $newId, true );
109.
110. $bugLinkRegexp = '/(^|[^\w])(' . preg_quote( $this->source_->issuelink, '/' ) . ')(\d+)\b/e';
111. $replacement = '"\\1" . $this->getReplacementString( "\\2", "\\3" )';
112.
113. $bugData->description = preg_replace( $bugLinkRegexp, $replacement, $bugData->description );
114. $bugData->update( true, true );
115. }

User input passed through the "description" field (and the "issuelink" attribute) of the uploaded XML
file when importing data through the Import/Export plugin is not properly sanitized before being used
in a "preg_replace()" call with the 'e' modifier at line 113. This can be exploited by unauthenticated
attackers to inject and execute arbitrary PHP code by uploading a specially crafted XML file. Successful
exploitation of this vulnerability requires the Import/Export plugin to be enabled (disabled by default).


[-] Solution:

Update to version 1.2.18.


[-] Disclosure Timeline:

[04/10/2014] - Issue reported to http://www.mantisbt.org/bugs/view.php?id=17725
[05/10/2014] - CVE number requested
[06/10/2014] - CVE number assigned
[01/11/2014] - Issue fixed on GitHub
[08/11/2014] - Public disclosure by the vendor on the OSS mailing list
[23/12/2014] - Publication of this advisory


[-] CVE Reference:

The Common Vulnerabilities and Exposures project (cve.mitre.org)
has assigned the name CVE-2014-7146 to this vulnerability.


[-] Credits:

Vulnerability discovered by Egidio Romano.


[-] Original Advisory:

http://karmainsecurity.com/KIS-2014-18


Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

August 2019

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    10 Files
  • 2
    Aug 2nd
    8 Files
  • 3
    Aug 3rd
    2 Files
  • 4
    Aug 4th
    1 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    79 Files
  • 7
    Aug 7th
    16 Files
  • 8
    Aug 8th
    10 Files
  • 9
    Aug 9th
    10 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    6 Files
  • 12
    Aug 12th
    26 Files
  • 13
    Aug 13th
    15 Files
  • 14
    Aug 14th
    19 Files
  • 15
    Aug 15th
    52 Files
  • 16
    Aug 16th
    11 Files
  • 17
    Aug 17th
    1 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

Systems

packet storm

© 2019 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close