Home[1] Files[2] News[3] &[SERVICES_TAB] Contact[4] Add New[5]
- XenForo 2.2.13 ArchiveImport.php Zip Slip[6]
- Authored by EgiX[7] | Site karmainsecurity.com[8]
-
XenForo versions 2.2.13 and below suffer from a zip slip filename traversal vulnerability in ArchiveImport.php.
- SHA-256 |
5deccbdac2cfe207ec995833b611569397b53b3acedb61fbd211edfe7bb16b0d
- Download[9] | Favorite[10] | View[11]
Change Mirror[12] Download[13]
------------------------------------------------------------
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
File Tags
- ActiveX[19] (932)
- Advisory[20] (84,024)
- Arbitrary[21] (16,514)
- BBS[22] (2,859)
- Bypass[23] (1,810)
- CGI[24] (1,031)
- Code Execution[25] (7,528)
- Conference[26] (685)
- Cracker[27] (843)
- CSRF[28] (3,365)
- DoS[29] (24,242)
- Encryption[30] (2,380)
- Exploit[31] (52,473)
- File Inclusion[32] (4,241)
- File Upload[33] (982)
- Firewall[34] (822)
- Info Disclosure[35] (2,819)
- Intrusion Detection[36] (903)
- Java[37] (3,111)
- JavaScript[38] (884)
- Kernel[39] (6,905)
- Local[40] (14,630)
- Magazine[41] (586)
- Overflow[42] (12,955)
- Perl[43] (1,430)
- PHP[44] (5,168)
- Proof of Concept[45] (2,359)
- Protocol[46] (3,680)
- Python[47] (1,587)
- Remote[48] (31,201)
- Root[49] (3,611)
- Rootkit[50] (517)
- Ruby[51] (615)
- Scanner[52] (1,646)
- Security Tool[53] (7,952)
- Shell[54] (3,224)
- Shellcode[55] (1,216)
- Sniffer[56] (898)
- Spoof[57] (2,236)
- SQL Injection[58] (16,468)
- TCP[59] (2,420)
- Trojan[60] (688)
- UDP[61] (896)
- Virus[62] (667)
- Vulnerability[63] (32,357)
- Web[64] (9,819)
- Whitepaper[65] (3,763)
- x86[66] (966)
- XSS[67] (18,088)
- Other[68]
File Archives
- January 2024[69]
- December 2023[70]
- November 2023[71]
- October 2023[72]
- September 2023[73]
- August 2023[74]
- July 2023[75]
- June 2023[76]
- May 2023[77]
- April 2023[78]
- March 2023[79]
- February 2023[80]
- Older[81]
Systems
- AIX[82] (429)
- Apple[83] (2,058)
- BSD[84] (375)
- CentOS[85] (57)
- Cisco[86] (1,926)
- Debian[87] (6,955)
- Fedora[88] (1,693)
- FreeBSD[89] (1,246)
- Gentoo[90] (4,430)
- HPUX[91] (880)
- iOS[92] (369)
- iPhone[93] (108)
- IRIX[94] (220)
- Juniper[95] (69)
- Linux[96] (48,442)
- Mac OS X[97] (691)
- Mandriva[98] (3,105)
- NetBSD[99] (256)
- OpenBSD[100] (487)
- RedHat[101] (14,999)
- Slackware[102] (941)
- Solaris[103] (1,611)
- SUSE[104] (1,444)
- Ubuntu[105] (9,257)
- UNIX[106] (9,360)
- UnixWare[107] (187)
- Windows[108] (6,621)
- Other[109]
- Services
- Security Services[120]
- Hosting By
- Rokasec[121]