CVE-2022-23522 json
Arbitrary File Write when Extracting Tarballs retrieved from a remote location using in mindsdb
published 2023-03-30 3 y ago modified 2026-06-17 4 mo ago also GHSA-7x45-phmr-9wqp , PYSEC-2023-26 , EUVD-2023-0147
- cvss
- 8.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.9%
- EPSS 0.9% chance of exploitation in 30 days, percentile 59%
- public exploits
- 0
- none known
Summary
MindsDB is an open source machine learning platform. An unsafe extraction is being performed using `shutil.unpack_archive()` from a remotely retrieved tarball. Which may lead to the writing of the extracted files to an unintended location. This vulnerability is sometimes called a **TarSlip** or a **ZipSlip variant**. Unpacking files using the high-level function `shutil.unpack_archive()` from a potentially malicious tarball without validating that the destination file path remained within the intended destination directory may cause files to be overwritten outside the destination directory. An attacker could craft a malicious tarball with a filename path, such as `../../../../../../../../etc/passwd`, and then serve the archive remotely using a personal bucket `s3`, thus, retrieve the tarball through **mindsdb** and overwrite the system files of the hosting server. This issue has been addressed in version 22.11.4.3. Users are advised to upgrade. Users unable to upgrade should avoid ingesting archives from untrusted sources.
Patch / fix
- pypi mindsdb 22.11.4.3
- mindsdb mindsdb 22.11.4.3
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 20 mo ago
Exploit prediction
0.88% chance of exploitation in the next 30 days, higher than 59% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/mindsdb/mindsdb/security/advisories/GHSA-7x45-phmr-9wqp referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N |
| NVD | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 8.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | mindsdb | <22.11.4.3 |
22.11.4.3 |
Affected products
- mindsdb mindsdb
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
-
github.com
/mindsdb/mindsdb/security/advisories/GHSA-7x45-phmr-9wqp
web, exploit, vendor-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-23522
advisory
-
github.com
/mindsdb/mindsdb
package
-
github.com
/mindsdb/mindsdb/blob/69c76e727b8067f32b06ab83bb835a8c416c4f21/mindsdb/interfaces/storage/fs.py
web
-
github.com
/mindsdb/mindsdb/blob/69c76e727b8067f32b06ab83bb835a8c416c4f21/mindsdb/interfaces/storage/fs.py#L128..L129
web
-
github.com
/mindsdb/mindsdb/releases/tag/v22.11.4.3
web
-
github.com
/pypa/advisory-database/tree/main/vulns/mindsdb/PYSEC-2023-26.yaml
web
Sources
- CVE List CVE-2022-23522
- GitHub Advisory GHSA-7x45-phmr-9wqp
- NVD CVE-2022-23522
- OSV PYSEC-2023-26
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.