Vulnerabilities in pkg:npm/@apostrophecms/import-export
PACKAGECVE-2026-63667 is a MODERATE (CVSS 6.5) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting ApostropheCMS libraries in the npm ecosystem. The issue involves arbitrary file read via import-export attachment-name path traversal. Remediation is available by upgrading affected packages to version 3.6.2.
pkg:npm/@apostrophecms/import-export
Vulnerability advisories affecting package pkg:npm/@apostrophecms/import-export. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-79qf-vqgc-7xx3 | CVE-2026-63667 | MODERATE | ApostropheCMS: Arbitrary file read via import-export attachment-name path traversal |
| GHSA-mwxc-m426-3f78 | CVE-2026-32731 | CRITICAL | ApostropheCMS has Arbitrary File Write (Zip Slip / Path Traversal) in Import-Export Gzip Extraction |
CVE-2026-63667 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2026-63667
To remediate this vulnerability, upgrade all affected ApostropheCMS dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @apostrophecms/import-export@3.6.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @apostrophecms/import-export
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-63667, inspect your project dependencies using npm:
npm ls @apostrophecms/import-export
Analyze the terminal output to locate any version of ApostropheCMS in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.6.2), your application is affected.
Note: The npm ls @apostrophecms/import-export command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In ApostropheCMS, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-63667 Affected ApostropheCMS Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@apostrophecms/import-export
|
npm |
< 3.6.2
|
3.6.2
|
References
Frequently Asked Questions
What is CVE-2026-63667?
Which ApostropheCMS versions are affected?
What version fixes CVE-2026-63667?
Is @apostrophecms/import-export affected?
What is the CVSS score of CVE-2026-63667?
What CWE is associated with CVE-2026-63667?
How can I check npm dependencies for CVE-2026-63667?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-79qf-vqgc-7xx3",
"modified" : "2026-09-02T14:55:47Z",
"published" : "2026-09-02T14:55:47Z",
"aliases" : [ "CVE-2026-63667" ],
"summary" : "ApostropheCMS: Arbitrary file read via import-export attachment-name path traversal",
"details" : "## Summary\n\nThe `@apostrophecms/import-export` module reconstructs the on-disk source path of every imported attachment from JSON metadata contained in the uploaded archive.\n\nThe archive carries an `aposAttachments.json` file whose `name` and `extension` fields are concatenated into a filesystem path with no traversal check. The zip-slip guard that the module applies during tar extraction validates tar entry names only and does not cover this second path, which is built after extraction.\n\nThe file at the resulting path is read and copied into the public uploads directory, then served over HTTP without authentication. A `../` sequence in `name` makes the module read a file outside the extraction directory and publish it at an anonymous URL.\n\nResult: an authenticated contributor reads any file on the host whose name ends in an allowlisted extension (other users' uploaded documents, text or CSV dumps, PDFs) by importing a crafted archive and fetching the planted attachment anonymously.\n\n## Affected\n\napostrophecms/apostrophe with the `@apostrophecms/import-export` module installed and registered. Module version 3.6.1 (current latest), tested against Apostrophe 4.31.0 (monorepo HEAD 4d478d9). Requires an account with the contributor role or higher; guest and anonymous requests are rejected. The module is not part of the default starter kit, so sites that never installed it are not affected. Files whose real name lacks an accepted file-group extension are not reachable.\n\n## Root cause\n\nThe import parser builds each attachment's source path by concatenating attacker-controlled JSON fields: `lib/formats/gzip.js:46` sets `file.path = path.join(attachmentFilesPath, ${attachment._id}-${attachment.name}.${attachment.extension})` from the `aposAttachments.json` entries in the uploaded archive. That path flows unchanged through `lib/methods/import.js:832` (`insertAttachments`) into `lib/methods/import.js:1074` (`attachment.insert`), where uploadfs copies the referenced file into the public uploads directory served by `express.static`. The archive's only traversal guard, `lib/formats/gzip.js:143` (`if (name.includes('../'))`), validates tar entry names during extraction and never inspects the `name`/`extension` values used to construct the read path, so a `name` of `../../../../../../tmp/secret` escapes `attachmentFilesPath`. Reaching the sink requires only an authenticated session (`lib/methods/import.js:71`), view permission on the target type (`lib/methods/index.js:54`), and the `upload-attachment` permission enforced at `modules/@apostrophecms/attachment/index.js:442`, which the built-in contributor role holds. The trailing `.${extension}` is appended and checked against the file-group allowlist in `modules/@apostrophecms/attachment/index.js` (`getFileGroup`), so the target file's real name must end in an accepted extension (txt, csv, pdf, xls, doc, svg, and similar).\n\n## Reproduction\n\nApostrophe 4.31.0 starter-kit-essentials, MongoDB, default roles, `@apostrophecms/import-export` 3.6.1 installed, local uploadfs backend.\n\n1. Place a secret file outside the upload tree with an allowlisted extension.\n\n```\n$ cat /tmp/apos_victim_secret.txt\nTOP-SECRET DB DUMP\nDB_PASSWORD=Pr0d-Secret-9981\nAPI_KEY=sk_live_victim_abcdef\n```\n\n2. Build a gzip archive whose `aposAttachments.json` points the attachment `name` at that file through traversal (`aposDocs.json` is `[]`).\n\n```\n[{\"_id\":\"evilatt0001\",\"name\":\"../../../../../../../../../../../../tmp/apos_victim_secret\",\"extension\":\"txt\",\"title\":\"loot\",\"docIds\":[],\"crops\":[]}]\n```\n\n3. As a contributor, import the archive through the module's import action (`POST /api/v1/@apostrophecms/<type>/import-export-import`), then fetch the created attachment with no session.\n\n```\n$ curl -i http://localhost:3500/uploads/attachments/evilatt0001-apos-victim-secret.txt\nHTTP/1.1 200 OK\nContent-Type: text/plain; charset=UTF-8\n\nTOP-SECRET DB DUMP\nDB_PASSWORD=Pr0d-Secret-9981\nAPI_KEY=sk_live_victim_abcdef\n```\n\nLive-verified: a contributor-driven import reads `/tmp/apos_victim_secret.txt` (outside the extraction directory) and serves it at an anonymous URL; the same import run as a guest is rejected at the `upload-attachment` check (`modules/@apostrophecms/attachment/index.js:442`).\n\n## Impact\n\n- Read of arbitrary host files whose real name ends in an allowlisted extension (txt, csv, pdf, xls, doc, svg, and similar).\n- Disclosure of other users' uploaded documents and any allowlisted-extension file readable by the Node process.\n- The exfiltration target is copied to a public, unauthenticated URL.\n- Triggered by the contributor role in a single import, no admin interaction.\n\n## Credit\n\nJan Kahmen, [turingpoint](https://www.turingpoint.de) (jan@turingpoint.de)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@apostrophecms/import-export"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.6.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.6.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-79qf-vqgc-7xx3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-63667"
}, {
"type" : "WEB",
"url" : "https://github.com/apostrophecms/apostrophe/commit/87cccf44a23d09420875ca8a3765eb3db843836a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apostrophecms/apostrophe"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-02T14:55:47Z",
"nvd_published_at" : "2026-08-17T20:16:44Z"
}
}