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

Joomla! 4.1.0 Zip Slip File Overwrite / Path Traversal

Joomla! 4.1.0 Zip Slip File Overwrite / Path Traversal
Posted Mar 30, 2022
Authored by EgiX | Site karmainsecurity.com

Joomla! versions 4.1.0 and below suffer from path traversal and file overwrite vulnerabilities due to misplaced trust in the handling of compressed archives.

tags | exploit, vulnerability
advisories | CVE-2022-23793
SHA-256 | 3659bb2a193b54ec58750cfb109d9f00cfd739f7828d6a6d4fdff0e0ff2be911

Joomla! 4.1.0 Zip Slip File Overwrite / Path Traversal

Change Mirror Download
-------------------------------------------------
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

Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    34 Files
  • 18
    Jul 18th
    6 Files
  • 19
    Jul 19th
    34 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    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