CVE-2026-113664
ApostropheCMS import-export tar guard misses './..' because it is a literal '../' substring test
ApostropheCMS is an open-source Node.js content management system. Prior to 3.7.0 of the import-export module, an authenticated importer can submit a tar entry whose normalized destination targets a directory while bypassing the literal parent-path substring guard. Opening that directory as a write stream emits an unhandled filesystem error that can terminate the Node.js process; the source establishes this static primitive but not an end-to-end exploit or controlled arbitrary file read or write. This issue is fixed in version 3.7.0.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
5.3
ApostropheCMS import-export tar guard misses './..' because it is a literal '../' substring test
ApostropheCMS is an open-source Node.js content management system. Prior to 3.7.0 of the import-export module, an authenticated importer can submit a tar entry whose normalized destination targets a directory while bypassing the literal parent-path substring guard. Opening that directory as a write stream emits an unhandled filesystem error that can terminate the Node.js process; the source establishes this static primitive but not an end-to-end exploit or controlled arbitrary file read or write. This issue is fixed in version 3.7.0.
- Record
CVE-2026-113664- CVSS 4.0
- 5.3 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N - Weakness
- CWE-22
- Updated
- 2026-11-02
EUVDEUVD-2026-105211
5.3
ApostropheCMS is an open-source Node.js content management system. Prior to 3.7.0 of the import-export module, an authenticated importer can submit a tar entry whose normalized destination targets a directory while bypassing the literal parent-path substring guard. Opening that directory as a write stream emits an unhandled filesystem error that can terminate the Node.js process; the source establishes this static primitive but not an end-to-end exploit or controlled arbitrary file read or write. This issue is fixed in version 3.7.0.
- Record
EUVD-2026-105211- CVSS 4.0
- 5.3 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-97wv-p4xx-c7mg
5.3
ApostropheCMS import-export tar guard misses './..' because it is a literal '../' substring test
Summary
The tar-extraction guard added to @apostrophecms/import-export for GHSA-mwxc-m426-3f78 is a literal substring test for ../, and ./.. does not contain that substring. An entry named ./.. therefore passes the guard, path.join normalizes it to the parent of the export directory, and the resulting fs.WriteStream opens a directory and emits EISDIR with no error listener attached, which terminates the Node process.
Confirmed on default-branch HEAD 1bd5d0a7a6fe880836fa75adad6964f1c577d640, package version 3.6.2.
Details
packages/import-export/lib/formats/gzip.js, in the tar-stream entry handler inside extract(filepath, exportPath):
const name = header.name.replace(/\\/g, '/');
if (name.includes('../')) {
// skipped
}
...
stream.pipe(fs.WriteStream(path.join(exportPath, name)));
Two separate problems sit in those four lines. The guard tests the raw entry name for a substring instead of resolving the joined path and requiring containment, and the write stream has no error handler, so any stream error becomes an unhandled 'error' event.
Reaching it needs an account that can import, nothing more. packages/import-export/modules/@apostrophecms/import-export-page/index.js exposes post.importExportImport, which calls into lib/methods/import.js; that handler requires req.user and then calls format.input(exportPath), which for a .gz upload is gzip.js calling extract() on the uploaded archive.
PoC
This is not an end-to-end exploit. What follows is each of the three primitives the crash depends on, executed individually, plus a source-level trace of the route. The chain from post.importExportImport to extract() was read, not observed.
The guard misses the payload:
node -e "console.log('./..'.includes('../')); console.log('..'.includes('../')); console.log('a/./..'.includes('../'));"
false
false
false
path.join then resolves it out of the export directory:
node -e "const path=require('path'); const exportPath='/tmp/exportRoot'; console.log(path.join(exportPath,'./..'));"
/tmp
And a write stream opened on a directory, with no error listener, kills the process rather than failing the request:
node -e "const fs=require('fs'); const s=fs.createWriteStream('/tmp'); s.write('x'); s.end(); setTimeout(()=>console.log('still alive'),500);"
events.js:291
throw er; // Unhandled 'error' event
^
Error: EISDIR: illegal operation on a directory, open '/tmp'
Emitted 'error' event on WriteStream instance at:
at internal/fs/streams.js:361:12
at FSReqCallback.oncomplete (fs.js:156:23) {
errno: -21,
code: 'EISDIR',
syscall: 'open',
path: '/tmp'
}
The events.js:291 frame shows that transcript came off the Node 14 line my audit box had. The unhandled-error-event behavior is not version specific, but the exact message on your supported Node versions is worth a re-run.
Source-side confirmation without running anything:
grep -n "includes('../')" packages/import-export/lib/formats/gzip.js
grep -n "WriteStream" packages/import-export/lib/formats/gzip.js
Impact
An authenticated user who can reach the import UI uploads one crafted archive and takes down the Node process handling it. Every worker that picks up such an archive dies the same way.
Suggested fix
Resolve the target and require containment, and attach an error handler:
const base = path.resolve(exportPath);
const target = path.resolve(path.join(exportPath, name));
if (target !== base && !target.startsWith(base + path.sep)) {
stream.on('end', next);
stream.resume();
return;
}
if (header.type === 'directory') {
fsp.mkdir(target).then(next).catch(reject);
} else {
const out = fs.WriteStream(target);
out.on('error', reject);
stream.pipe(out);
stream.on('end', next);
}
The error handler earns its place independently. Any tar entry that lands on an existing…
- Record
GHSA-97wv-p4xx-c7mg- CVSS 4.0
- 5.3 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N - Weakness
- CWE-22
- Updated
- 2026-11-02
NVD
5.3
ApostropheCMS is an open-source Node.js content management system. Prior to 3.7.0 of the import-export module, an authenticated importer can submit a tar entry whose normalized destination targets a directory while bypassing the literal parent-path substring guard. Opening that directory as a write stream emits an unhandled filesystem error that can terminate the Node.js process; the source establishes this static primitive but not an end-to-end exploit or controlled arbitrary file read or write. This issue is fixed in version 3.7.0.
- Record
CVE-2026-113664- CVSS 4.0
- 5.3 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Weakness
- CWE-22
- Updated
- 2026-11-02
OSV
5.3
ApostropheCMS import-export tar guard misses './..' because it is a literal '../' substring test
ApostropheCMS is an open-source Node.js content management system. Prior to 3.7.0 of the import-export module, an authenticated importer can submit a tar entry whose normalized destination targets a directory while bypassing the literal parent-path substring guard. Opening that directory as a write stream emits an unhandled filesystem error that can terminate the Node.js process; the source establishes this static primitive but not an end-to-end exploit or controlled arbitrary file read or write. This issue is fixed in version 3.7.0.
- Record
CVE-2026-113664- CVSS 4.0
- 5.3 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVGHSA-97wv-p4xx-c7mg
5.3
ApostropheCMS import-export tar guard misses './..' because it is a literal '../' substring test
Summary
The tar-extraction guard added to @apostrophecms/import-export for GHSA-mwxc-m426-3f78 is a literal substring test for ../, and ./.. does not contain that substring. An entry named ./.. therefore passes the guard, path.join normalizes it to the parent of the export directory, and the resulting fs.WriteStream opens a directory and emits EISDIR with no error listener attached, which terminates the Node process.
Confirmed on default-branch HEAD 1bd5d0a7a6fe880836fa75adad6964f1c577d640, package version 3.6.2.
Details
packages/import-export/lib/formats/gzip.js, in the tar-stream entry handler inside extract(filepath, exportPath):
const name = header.name.replace(/\\/g, '/');
if (name.includes('../')) {
// skipped
}
...
stream.pipe(fs.WriteStream(path.join(exportPath, name)));
Two separate problems sit in those four lines. The guard tests the raw entry name for a substring instead of resolving the joined path and requiring containment, and the write stream has no error handler, so any stream error becomes an unhandled 'error' event.
Reaching it needs an account that can import, nothing more. packages/import-export/modules/@apostrophecms/import-export-page/index.js exposes post.importExportImport, which calls into lib/methods/import.js; that handler requires req.user and then calls format.input(exportPath), which for a .gz upload is gzip.js calling extract() on the uploaded archive.
PoC
This is not an end-to-end exploit. What follows is each of the three primitives the crash depends on, executed individually, plus a source-level trace of the route. The chain from post.importExportImport to extract() was read, not observed.
The guard misses the payload:
node -e "console.log('./..'.includes('../')); console.log('..'.includes('../')); console.log('a/./..'.includes('../'));"
false
false
false
path.join then resolves it out of the export directory:
node -e "const path=require('path'); const exportPath='/tmp/exportRoot'; console.log(path.join(exportPath,'./..'));"
/tmp
And a write stream opened on a directory, with no error listener, kills the process rather than failing the request:
node -e "const fs=require('fs'); const s=fs.createWriteStream('/tmp'); s.write('x'); s.end(); setTimeout(()=>console.log('still alive'),500);"
events.js:291
throw er; // Unhandled 'error' event
^
Error: EISDIR: illegal operation on a directory, open '/tmp'
Emitted 'error' event on WriteStream instance at:
at internal/fs/streams.js:361:12
at FSReqCallback.oncomplete (fs.js:156:23) {
errno: -21,
code: 'EISDIR',
syscall: 'open',
path: '/tmp'
}
The events.js:291 frame shows that transcript came off the Node 14 line my audit box had. The unhandled-error-event behavior is not version specific, but the exact message on your supported Node versions is worth a re-run.
Source-side confirmation without running anything:
grep -n "includes('../')" packages/import-export/lib/formats/gzip.js
grep -n "WriteStream" packages/import-export/lib/formats/gzip.js
Impact
An authenticated user who can reach the import UI uploads one crafted archive and takes down the Node process handling it. Every worker that picks up such an archive dies the same way.
Suggested fix
Resolve the target and require containment, and attach an error handler:
const base = path.resolve(exportPath);
const target = path.resolve(path.join(exportPath, name));
if (target !== base && !target.startsWith(base + path.sep)) {
stream.on('end', next);
stream.resume();
return;
}
if (header.type === 'directory') {
fsp.mkdir(target).then(next).catch(reject);
} else {
const out = fs.WriteStream(target);
out.on('error', reject);
stream.pipe(out);
stream.on('end', next);
}
The error handler earns its place independently. Any tar entry that lands on an existing…
- Record
GHSA-97wv-p4xx-c7mg- CVSS 4.0
- 5.3 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N - Weakness
- CWE-22
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
@apostrophecms/import-exportnpm |
before 3.7.0 | 3.7.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-113664 is a medium vulnerability (CVSS 5.3) in @apostrophecms Import-export, published October 20, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.48%, the 42nd percentile. Fixed in @apostrophecms/import-export 3.7.0.
References
github.com/apostrophecms/apostrophe/security/advisories/GHSA-97wv-p4xx-c7mg
github.com/apostrophecms/apostrophe/commit/9500b8b0e1d630d5e07fbb5fd2c25ed0943845ce
github.com/apostrophecms/apostrophe/commit/f84fd41cbf6c22eb8d0008fc9c25df1f7130b350
github.com/apostrophecms/apostrophe/releases/tag/@apostrophecms/[email protected]
github.com/advisories/GHSA-97wv-p4xx-c7mg
github.com/CVEProject/cvelistV5/tree/main/cves/2026/113xxx/CVE-2026-113664.json
nvd.nist.gov/vuln/detail/CVE-2026-113664
github.com/apostrophecms/apostrophe
Left out here: the rest of 2 source descriptions. The JSON record has them.