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

XenForo 2.2.13 ArchiveImport.php Zip Slip

XenForo 2.2.13 ArchiveImport.php Zip Slip
Posted Jan 31, 2024
Authored by EgiX | Site karmainsecurity.com

XenForo versions 2.2.13 and below suffer from a zip slip filename traversal vulnerability in ArchiveImport.php.

tags | exploit, php
SHA-256 | 5deccbdac2cfe207ec995833b611569397b53b3acedb61fbd211edfe7bb16b0d

XenForo 2.2.13 ArchiveImport.php Zip Slip

Change Mirror Download
------------------------------------------------------------
XenForo <= 2.2.13 (ArchiveImport.php) Zip Slip Vulnerability
------------------------------------------------------------


[-] Software Link:

https://xenforo.com


[-] Affected Versions:

Version 2.2.13 and prior versions.


[-] Vulnerability Description:

The vulnerability is located in the
/src/XF/Service/Style/ArchiveImport.php script. Specifically, into the
"ArchiveImport::extractFilesToTempDir()" method:

198. public function extractFilesToTempDir()
199. {
200. $zip = $this->zip();
201. $DS = \XF::$DS;
202.
203. if ($this->extracted)
204. {
205. return;
206. }
207.
208. for ($i = 0; $i < $zip->numFiles; $i++)
209. {
210. $zipFileName = $zip->getNameIndex($i);
211. $fsFileName = $this->getFsFileNameFromZipName($zipFileName);
212. if ($fsFileName === null)
213. {
214. continue;
215. }
216.
217. $finalFileName = $this->tempDir . $DS . $fsFileName;
218.
219. $dataStream = $zip->getStream($zipFileName);
220. @File::writeFile($finalFileName, $dataStream, false);
221. }

The vulnerability exists because the above code is using the filename
provided within the Zip archive ($zipFileName variable created at line
210) to write the extracted file by using "File::writeFile()" at line
220, without properly verifying whether it contains Path Traversal
sequences. This could be exploited to carry out Zip Slip (or Path
Traversal) attacks and write/overwrite arbitrary files on the web
server, resulting in execution of arbitrary PHP code or other security
impacts. Successful exploitation of this vulnerability requires an
account with permissions to administer styles.


[-] Solution:

Upgrade to version 2.2.14 or later.


[-] Disclosure Timeline:

[02-01-2024] - Vendor notified
[17-01-2024] - CVE identifier requested
[24-01-2024] - Vendor replied a fix will be available in the next release
[30-01-2024] - Version 2.2.14 released
[30-01-2024] - Publication of this advisory


[-] CVE Reference:

The Common Vulnerabilities and Exposures project (cve.mitre.org) has
not assigned a CVE identifier for this vulnerability.


[-] Credits:

Vulnerability discovered by Egidio Romano.


[-] Other References:

https://xenforo.com/tickets/BC37EB98/?v=5da7bd5728


[-] Original Advisory:

http://karmainsecurity.com/KIS-2024-01
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
    16 Files
  • 26
    Apr 26th
    14 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    20 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