# CVE-2022-23522: Arbitrary File Write when Extracting Tarballs retrieved from a remote location using in mindsdb

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.5
- **CVSS:** 8.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Changed (impact reaches other components); Confidentiality impact: High; Integrity impact: Low; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.93% (percentile 59, 2026-11-26)
- **CWE:** CWE-22
- **Aliases:** GHSA-7x45-phmr-9wqp, PYSEC-2023-26
- **Published:** 2023-03-30T18:04:56.599Z
- **Modified:** 2026-06-17T04:30:17.550Z

## Who should check

- Projects that depend on PyPI package mindsdb (\< 22.11.4.3)
- Anyone running mindsdb \< 22.11.4.3

## Description

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.

## Affected and fixed versions

- PyPI `mindsdb`: affected \< 22.11.4.3; fixed 22.11.4.3 (osv)
- mindsdb: \< 22.11.4.3 (cvelist)

## Mitigation

- Upgrade mindsdb to 22.11.4.3 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-23522. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-23522.md
Affected: mindsdb < 22.11.4.3
Fixed in: 22.11.4.3

Steps:
1. Search this machine and project for mindsdb (PyPI), mindsdb: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-23522 being exploited?

There is no confirmed exploitation: CVE-2022-23522 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.93% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-23522?

High: CVSS 8.5 (v3.1, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2022-23522?

mindsdb \< 22.11.4.3.

### Is there a fix for CVE-2022-23522?

Yes. Fixed in 22.11.4.3. Upgrade mindsdb to 22.11.4.3 or later.

### How do I check if I'm affected by CVE-2022-23522?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/mindsdb/mindsdb/security/advisories/GHSA-7x45-phmr-9wqp>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2022-23522>
- other: <https://github.com/mindsdb/mindsdb>
- other: <https://github.com/mindsdb/mindsdb/blob/69c76e727b8067f32b06ab83bb835a8c416c4f21/mindsdb/interfaces/storage/fs.py>
- other: <https://github.com/mindsdb/mindsdb/blob/69c76e727b8067f32b06ab83bb835a8c416c4f21/mindsdb/interfaces/storage/fs.py#L128..L129>
- other: <https://github.com/mindsdb/mindsdb/releases/tag/v22.11.4.3>
- other: <https://github.com/pypa/advisory-database/tree/main/vulns/mindsdb/PYSEC-2023-26.yaml>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-23522>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-7x45-phmr-9wqp> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2023-26> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2022-23522> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-23522>
