Lucene search
K

Joomla! 4.1.0 Zip Slip File Overwrite / Path Traversal

🗓️ 30 Mar 2022 00:00:00Reported by EgiX, karmainsecurity.comType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 257 Views

Joomla 4.1.0 Zip Slip File Overwrite / Path Traversal vulnerabilit

Related
Code
ReporterTitlePublishedViews
Family
0day.today
Joomla! 4.1.0 Zip Slip File Overwrite / Path Traversal Vulnerabilities
30 Mar 202200:00
zdt
ATTACKERKB
CVE-2022-23793
29 Mar 202218:00
attackerkb
Circl
CVE-2022-23793
21 Jan 202513:02
circl
CNNVD
Joomla! 路径遍历漏洞
29 Mar 202200:00
cnnvd
CNVD
Joomla! path traversal vulnerability (CNVD-2022-64100)
31 Mar 202200:00
cnvd
CVE
CVE-2022-23793
30 Mar 202215:20
cve
Cvelist
CVE-2022-23793 [20220301] - Core - Zip Slip within the Tar extractor
30 Mar 202215:20
cvelist
EUVD
EUVD-2022-1458
3 Oct 202520:07
euvd
Friends Of PHP
Path Traversal within joomla/archive tar class
29 Mar 202218:00
friendsofphp
Github Security Blog
Path Traversal within joomla/archive tar class
31 Mar 202200:00
github
Rows per page
`-------------------------------------------------  
Joomla! <= 4.1.0 (Tar.php) Zip Slip Vulnerability  
-------------------------------------------------  
  
  
[-] Software Link:  
  
http://www.joomla.org/  
  
  
[-] Affected Versions:  
  
Version 4.1.0 and prior versions.  
Version 3.10.6 and prior versions.  
  
  
[-] Vulnerability Description:  
  
The vulnerability is located in the   
/libraries/vendor/joomla/archive/src/Tar.php script. Specifically, into   
the Joomla\Archive\Tar::extract() method:  
  
113. $this->getTarInfo($this->data);  
114.  
115. for ($i = 0, $n = \count($this->metadata); $i < $n; $i++)  
116. {  
117. $type = strtolower($this->metadata[$i]['type']);  
118.  
119. if ($type == 'file' || $type == 'unix file')  
120. {  
121. $buffer = $this->metadata[$i]['data'];  
122. $path = Path::clean($destination . '/' .   
$this->metadata[$i]['name']);  
123.  
124. // Make sure the destination folder exists  
125. if (!Folder::create(\dirname($path)))  
126. {  
127. throw new \RuntimeException('Unable to create destination   
folder ' . \dirname($path));  
128. }  
129.  
130. if (!File::write($path, $buffer))  
131. {  
132. throw new \RuntimeException('Unable to write entry to file ' .   
$path);  
133. }  
134. }  
135. }  
  
The vulnerability exists because the above code is using the filename   
within the Tar archive ($path variable created at line 122) to write the   
extracted file by using File::write() at line 130, without properly   
verifying the destination path. This could be exploited to carry out Zip   
Slip (or Path Traversal) attacks and write/overwrite arbitrary files,   
potentially resulting in execution of arbitrary PHP code or other   
dangerous impacts. In the Joomla! core, successful exploitation of this   
vulnerability would require administrator privileges. However, there   
could be third-party components using the   
Joomla\Archive\Archive::extract() method. In such cases, this might   
potentially be exploited also by unauthenticated attackers, depending on   
the context.  
  
  
  
[-] Solution:  
  
Upgrade to version 3.10.7, 4.1.1, or later.  
  
  
[-] Disclosure Timeline:  
  
[19/02/2021] - Vendor notified  
[21/02/2021] - Vulnerability acknowledged by the vendor  
[21/02/2021] - Vendor sent details about a proposed patch  
[21/02/2021] - Sent feedback about the patch correctness  
[29/03/2022] - Vendor update released  
[29/03/2022] - Public disclosure  
  
  
[-] CVE Reference:  
  
The Common Vulnerabilities and Exposures project (cve.mitre.org)  
has assigned the name CVE-2022-23793 to this vulnerability.  
  
  
[-] Credits:  
  
Vulnerability discovered by Egidio Romano.  
  
  
[-] Other References:  
  
https://developer.joomla.org/security-centre/870-20220301  
  
  
[-] Original Advisory:  
  
http://karmainsecurity.com/KIS-2022-05  
  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation