# CVE-2026-32731: ApostropheCMS has Arbitrary File Write (Zip Slip / Path Traversal) in Import-Export Gzip Extraction

> Attackers with content modify permissions can upload malicious archives to write arbitrary files outside the intended directory, potentially executing code.

- **Severity:** Critical 10.0 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Mar 2026
- **Updated:** 19 Mar 2026
- **Also known as:** GHSA-mwxc-m426-3f78

## What is CVE-2026-32731?

CVE-2026-32731 is a critical path traversal vulnerability in apostrophecms import-export, published on 18 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

ApostropheCMS is an open-source content management framework. Prior to version 3.5.3 of `@apostrophecms/import-export`,
The `extract()` function in `gzip.js` constructs file-write paths using `fs.createWriteStream(path.join(exportPath, header.name))`. `path.join()` does not resolve or sanitise traversal segments such as `../`. It concatenates them as-is, meaning a tar entry named `../../evil.js` resolves to a path outside the intended extraction directory. No canonical-path check is performed before the write stream is opened. This is a textbook Zip Slip vulnerability. Any user who has been granted the Global Content Modify permission — a role routinely assigned to content editors and site managers — can upload a crafted `.tar.gz` file through the standard CMS import UI and write attacker-controlled content to any path the Node.js process can reach on the host filesystem. Version 3.5.3 of `@apostrophecms/import-export` fixes the issue.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2026-32731?

2 open source packages ship an affected version, including @apostrophecms/import-export. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@apostrophecms/import-export` | npm | All versions | 3.5.3 |
| `@apostrophecms/import-export` | npm | All versions | 3.5.3 |

Products: Apostrophecms Import-Export.

## How do I fix CVE-2026-32731?

Upgrade @apostrophecms/import-export to 3.5.3 or later.

## Is CVE-2026-32731 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-32731 exists.

Public exploit code:

- POC for CVE-2026-32731 (github_poc): https://github.com/0xEr3n/CVE-2026-32731

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-32731 and fix it if it is affected.

What it is: CVE-2026-32731 is a critical path traversal vulnerability in apostrophecms import-export, published on 18 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-32731 exists.

Affected packages and fixed versions:
- @apostrophecms/import-export (npm): affected all versions; fixed in 3.5.3
- @apostrophecms/import-export (npm): affected all versions; fixed in 3.5.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-32731/ (Markdown: https://insights.sbomify.com/CVE-2026-32731/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-32731
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-32731
- OSV: https://osv.dev/vulnerability/CVE-2026-32731

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-32731/
Summaries are generated and may contain mistakes; the official description above is the record.
