Common Weakness Enumeration

CWE-59

Allowed

Improper Link Resolution Before File Access ('Link Following')

Abstraction: Base · Status: Draft

The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.

2615 vulnerabilities reference this CWE, most recent first.

GHSA-XJ7G-33M8-GRPW

Vulnerability from github – Published: 2024-07-30 00:34 – Updated: 2024-07-30 00:34
VLAI
Details

Comodo Firewall Link Following Local Privilege Escalation Vulnerability. This vulnerability allows local attackers to escalate privileges on affected installations of Comodo Firewall. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.

The specific flaw exists within the cmdagent executable. By creating a symbolic link, an attacker can abuse the application to delete a file. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of SYSTEM. Was ZDI-CAN-21794.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-7249"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-59"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-07-29T22:15:05Z",
    "severity": "HIGH"
  },
  "details": "Comodo Firewall Link Following Local Privilege Escalation Vulnerability. This vulnerability allows local attackers to escalate privileges on affected installations of Comodo Firewall. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.\n\nThe specific flaw exists within the cmdagent executable. By creating a symbolic link, an attacker can abuse the application to delete a file. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of SYSTEM. Was ZDI-CAN-21794.",
  "id": "GHSA-xj7g-33m8-grpw",
  "modified": "2024-07-30T00:34:24Z",
  "published": "2024-07-30T00:34:24Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-7249"
    },
    {
      "type": "WEB",
      "url": "https://www.zerodayinitiative.com/advisories/ZDI-24-954"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-XJC3-VJH6-M283

Vulnerability from github – Published: 2025-02-25 21:31 – Updated: 2025-02-25 21:31
VLAI
Details

Symlink following in the installer for some Zoom apps for macOS before version 6.1.5 may allow an authenticated user to conduct an escalation of privilege via network access.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-45418"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-59",
      "CWE-61"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-02-25T20:15:35Z",
    "severity": "MODERATE"
  },
  "details": "Symlink following in the installer for some Zoom apps for macOS before version 6.1.5 may allow an authenticated user to conduct an escalation of privilege via network access.",
  "id": "GHSA-xjc3-vjh6-m283",
  "modified": "2025-02-25T21:31:43Z",
  "published": "2025-02-25T21:31:43Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-45418"
    },
    {
      "type": "WEB",
      "url": "https://www.zoom.com/en/trust/security-bulletin/zsb-24040"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-XJVF-W7H7-789H

Vulnerability from github – Published: 2026-05-29 00:38 – Updated: 2026-05-29 00:38
VLAI
Details

Improper handling of symbolic links in the installer of CUPS Printer Driver for macOS(*) may allow a local attacker with login privileges to exploit a specially crafted symbolic link during installation to modify permissions of directories for which they would not normally have authorization. 

*:Canon PIXUS iX6800 Series CUPS Printer Driver for macOS Version 16.91.0.0 or earlier (Japan)

Canon PIXMA MG2500 Series and iX6800 Series CUPS Printer Driver for macOS Version 16.91.0.0 or earlier (US and Europe)

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-6892"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-59"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-05-29T00:16:16Z",
    "severity": "MODERATE"
  },
  "details": "Improper handling of symbolic links in the installer of CUPS Printer Driver for macOS(*) may allow a local attacker with login privileges to exploit a specially crafted symbolic link during installation to modify permissions of directories for which they would not normally have authorization.\u00a0\n\n*:Canon PIXUS iX6800 Series CUPS Printer Driver for macOS Version 16.91.0.0 or earlier (Japan)\n\nCanon PIXMA MG2500 Series and iX6800 Series CUPS Printer Driver for macOS Version 16.91.0.0 or earlier (US and Europe)",
  "id": "GHSA-xjvf-w7h7-789h",
  "modified": "2026-05-29T00:38:39Z",
  "published": "2026-05-29T00:38:39Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-6892"
    },
    {
      "type": "WEB",
      "url": "https://canon.jp/support/support-info/260528-1vulnerability-response"
    },
    {
      "type": "WEB",
      "url": "https://psirt.canon/advisory-information/cp2026-004"
    },
    {
      "type": "WEB",
      "url": "https://www.canon-europe.com/support/product-security"
    },
    {
      "type": "WEB",
      "url": "https://www.usa.canon.com/support/canon-product-advisories/CPA2026-004-Vulnerability-Remediation-for-My-Image-Garden-for-macOS-and-CUPS-Printer-Driver-for-macOS"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:P/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-XJX4-CPVW-9JMX

Vulnerability from github – Published: 2022-05-17 05:31 – Updated: 2022-05-17 05:31
VLAI
Details

The getSkillname function in the eve module in Conky 1.8.1 and earlier allows local users to overwrite arbitrary files via a symlink attack on /tmp/.cesf.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2011-3616"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-59"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2011-11-04T21:55:00Z",
    "severity": "MODERATE"
  },
  "details": "The getSkillname function in the eve module in Conky 1.8.1 and earlier allows local users to overwrite arbitrary files via a symlink attack on /tmp/.cesf.",
  "id": "GHSA-xjx4-cpvw-9jmx",
  "modified": "2022-05-17T05:31:39Z",
  "published": "2022-05-17T05:31:39Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2011-3616"
    },
    {
      "type": "WEB",
      "url": "https://bugs.launchpad.net/ubuntu/+source/conky/+bug/607309"
    },
    {
      "type": "WEB",
      "url": "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=612033"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/43225"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/46353"
    },
    {
      "type": "WEB",
      "url": "http://www.gentoo.org/security/en/glsa/glsa-201110-09.xml"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2011/10/09/4"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2011/10/10/8"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-XM9P-Q7G6-FM6P

Vulnerability from github – Published: 2022-05-17 02:17 – Updated: 2022-05-17 02:17
VLAI
Details

The AcquireDaemonLock function in ipcdUnix.cpp in Sun Innotek VirtualBox before 2.0.6 allows local users to overwrite arbitrary files via a symlink attack on a /tmp/.vbox-$USER-ipc/lock temporary file.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2008-5256"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-59"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2008-11-27T00:30:00Z",
    "severity": "MODERATE"
  },
  "details": "The AcquireDaemonLock function in ipcdUnix.cpp in Sun Innotek VirtualBox before 2.0.6 allows local users to overwrite arbitrary files via a symlink attack on a /tmp/.vbox-$USER-ipc/lock temporary file.",
  "id": "GHSA-xm9p-q7g6-fm6p",
  "modified": "2022-05-17T02:17:59Z",
  "published": "2022-05-17T02:17:59Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2008-5256"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/46826"
    },
    {
      "type": "WEB",
      "url": "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504149"
    },
    {
      "type": "WEB",
      "url": "http://lists.opensuse.org/opensuse-security-announce/2009-02/msg00002.html"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/32851"
    },
    {
      "type": "WEB",
      "url": "http://sunsolve.sun.com/search/document.do?assetkey=1-26-247326-1"
    },
    {
      "type": "WEB",
      "url": "http://www.mandriva.com/security/advisories?name=MDVSA-2009:011"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/32444"
    },
    {
      "type": "WEB",
      "url": "http://www.securitytracker.com/id?1021384"
    },
    {
      "type": "WEB",
      "url": "http://www.virtualbox.org/changeset?new=trunk%2Fsrc%2Flibs%2Fxpcom18a4%2Fipc%2Fipcd%2Fdaemon%2Fsrc%2FipcdUnix.cpp%4013810"
    },
    {
      "type": "WEB",
      "url": "http://www.virtualbox.org/wiki/Changelog"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2008/3410"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-XMF5-8JHR-2Q75

Vulnerability from github – Published: 2024-08-31 09:30 – Updated: 2024-08-31 09:30
VLAI
Details

Dell PowerScale OneFS versions 8.2.2.x through 9.8.0.1 contains a UNIX symbolic link (symlink) following vulnerability. A local high privileged attacker could potentially exploit this vulnerability, leading to denial of service, information tampering.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-39578"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-59",
      "CWE-61"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-08-31T08:15:04Z",
    "severity": "MODERATE"
  },
  "details": "Dell PowerScale OneFS versions 8.2.2.x through 9.8.0.1 contains a UNIX symbolic link (symlink) following vulnerability. A local high privileged attacker could potentially exploit this vulnerability, leading to denial of service, information tampering.",
  "id": "GHSA-xmf5-8jhr-2q75",
  "modified": "2024-08-31T09:30:44Z",
  "published": "2024-08-31T09:30:44Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-39578"
    },
    {
      "type": "WEB",
      "url": "https://www.dell.com/support/kbdoc/en-us/000228207/dsa-2024-346-security-update-for-dell-powerscale-onefs-for-multiple-security-vulnerabilities"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:L/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-XMFG-F9CM-W86Q

Vulnerability from github – Published: 2026-11-16 14:47 – Updated: 2026-11-16 14:47
VLAI
Summary
NLTK: Symlink escape in chat80.sql_query bypasses the pathsec data-root sandbox to read out-of-root SQLite databases
Details

Summary

nltk.sem.chat80.sql_query() opens a SQLite database by handing the result of nltk.data.find(dbname) straight to sqlite3.connect() without the path-containment check that the NLTK data sandbox (nltk.pathsec) is meant to enforce. nltk.data.find() applies only lexical checks to the resource name and returns a FileSystemPathPointer whose path is normalized with os.path.abspath but never resolved for symlinks. As a result, an in-root symbolic link that points at a SQLite file outside every registered NLTK data root is followed by SQLite, and the caller receives query results from the out-of-sandbox database. An attacker who can place a file inside a directory the application trusts as an NLTK data root can read SQLite databases that the pathsec sandbox is supposed to keep out of reach.

Root Cause

The security invariant is that file access performed through NLTK data resolution must stay within the configured data roots; the sandbox enforces this in nltk.pathsec via validate_path and pathsec.open, which resolve the real path (Path(...).resolve()) and reject targets outside the allowed roots. sql_query() never reaches that enforcement point. It calls nltk.data.find(dbname), whose guards operate purely on the resource-name string, and FileSystemPathPointer.__init__ performs only os.path.abspath plus an existence check, which does not collapse symlinks. The pointer is then passed to sqlite3.connect(str(path)), so the containment decision that FileSystemPathPointer.open() would delegate to pathsec.open is bypassed entirely. The sibling functions in the same module that create or write databases (cities2table, val_dump, val_load) obtain their protection from a validation call in later development, but the read sink sql_query performs no equivalent check in any published release.

nltk/sem/chat80.py  -> sql_query(): path = nltk.data.find(dbname); sqlite3.connect(str(path))
nltk/data.py        -> find(): lexical name guards only; returns FileSystemPathPointer
nltk/data.py        -> FileSystemPathPointer.__init__(): os.path.abspath + os.path.exists (no symlink resolution)
nltk/data.py        -> FileSystemPathPointer.open() -> nltk.pathsec.open (the containment guard that sql_query never calls)

Impact

An attacker who can write into a directory the application registers as an NLTK data root (a shared or writable corpus directory, or a downloaded corpus) can plant a symbolic link at the expected resource location that points at a SQLite database elsewhere on the filesystem. When the application invokes sql_query() (directly or via sql_demo()) for that resource, SQLite follows the link and the query executes against the out-of-sandbox database, returning its rows to the caller. This escapes the pathsec confidentiality boundary. The read primitive is bounded to SQLite-format files that are readable by the process user: a non-SQLite target raises sqlite3.DatabaseError rather than leaking content. A caller-supplied write query would be redirected onto the out-of-sandbox target and SQLite may create sidecar files (-wal, -journal) next to it, which is a plausible integrity side effect rather than a demonstrated arbitrary-write primitive. Exploitation requires the same local write capability into a trusted data root as the related symlink-read sandbox-escape issues already recorded for this project.

Proof of Concept

Requires the published nltk 3.10.3 wheel and a writable directory registered as an NLTK data root. No network access is needed.

  1. Create a throwaway data root with the expected corpus subdirectory.
  2. Create a SQLite database outside that root and populate it.
  3. Plant an in-root symbolic link at corpora/city_database/city.db pointing at the outside database.
  4. Register the data root and call sql_query() for the in-root resource name.
import os, tempfile, sqlite3, nltk, nltk.data
from nltk.sem import chat80

work = tempfile.mkdtemp()
root = os.path.join(work, "nltk_data")
corp = os.path.join(root, "corpora", "city_database")
os.makedirs(corp)

secret = os.path.join(work, "outside", "secret.db")
os.makedirs(os.path.dirname(secret))
con = sqlite3.connect(secret)
con.execute("CREATE TABLE t (x text)")
con.execute("INSERT INTO t VALUES ('OUT-OF-SANDBOX-SECRET')")
con.commit(); con.close()

os.symlink(secret, os.path.join(corp, "city.db"))
nltk.data.path.insert(0, root)

ptr = nltk.data.find("corpora/city_database/city.db")
try:
    ptr.open().read()            # pathsec route: blocked
except Exception as e:
    print("open() blocked:", type(e).__name__)

cur = chat80.sql_query("corpora/city_database/city.db", "SELECT * FROM t")
print("sql_query rows:", cur.fetchall())   # sink route: follows the symlink
open() blocked: PermissionError
sql_query rows: [('OUT-OF-SANDBOX-SECRET',)]

Attack Chain

  1. Exposure: The application exposes sql_query() (or sql_demo(), which calls it) and resolves the target database through nltk.data.find, using at least one directory the attacker can write to as a data root.
  2. Control: The attacker controls the on-disk object at the in-root resource path, replacing it with a symbolic link whose target is chosen freely. The resource-name argument stays a clean, in-root string.
  3. Path: nltk.data.find applies its lexical name guards (_UNSAFE_NO_PROTOCOL_RE, encoded and normalized-form checks), which inspect only the name string and pass, then returns a FileSystemPathPointer whose __init__ applies os.path.abspath and an existence check without resolving the symlink.
  4. Guard: The containment guard (FileSystemPathPointer.open() delegating to nltk.pathsec.open, which resolves the real path and rejects out-of-root targets) is never invoked, because sql_query() passes the raw pointer string to sqlite3.connect() instead of opening through the pointer.
  5. Primitive: sqlite3.connect(str(path)) opens the symlink target; the kernel follows the link out of every data root and the cursor executes the query against the outside database.
  6. Result: Rows from a SQLite database outside the sandbox are returned to the caller, escaping the pathsec confidentiality boundary for SQLite-format files readable by the process user.

Bypass Evidence

The relevant guard is the pathsec containment enforced by nltk.pathsec.open/validate_path, reached through FileSystemPathPointer.open(). On an identical pointer produced from the planted symlink, ptr.open() raises PermissionError with an "Unauthorized path" security violation, confirming the guard is active and correct for the sandbox route. sql_query() does not call .open() and does not call validate_path; it passes the unresolved pointer string directly to sqlite3.connect(), so the guard never runs on this path and the read succeeds. Attempts to invalidate the finding were made and failed: nltk.data.find was checked for a hidden containment or real-path resolution and has none (its guards are name-string only, and FileSystemPathPointer.__init__ uses abspath, not realpath); SQLite was confirmed to follow the link and read the outside file rather than opening the link node; and the possibility that an existing published fix already covers this sink was refuted by inspecting the published artifacts, where no containment check is present on sql_query. The behavior was reproduced against the exact published 3.10.3 wheel (verified by its published SHA-256 digest).

Affected Versions

  • Ecosystem: PyPI
  • Package: nltk
  • Confirmed affected range: >= 3.9.4, <= 3.10.3
  • Latest release checked: 3.10.3 (PyPI, wheel SHA-256 ff9598a8e20518ee0d557745890cc4435b9578489e2dcbc69c4f81fa060caf7c)
  • Fix status: 3.10.4

The pathsec sandbox that this issue bypasses was introduced in 3.9.4; the immediately preceding release 3.9.3 does not ship nltk/pathsec.py and therefore does not present this sandbox-escape surface. Every published release from 3.9.4 through the current latest 3.10.3 ships nltk/pathsec.py with ENFORCE = True and ships sql_query() without any containment check, so all of them are affected. Each affected wheel was fetched from PyPI and inspected directly. No published release removes the sink or adds the guard, so no fixed version exists at the time of review.

Suggested Fix

Enforce the data-root containment invariant on the resolved database path before opening it. In sql_query(), validate the path through the same mechanism the sibling functions use (for example validate_path(str(path), context="chat80.sql_query")) or open the database through the pointer's sandboxed open path rather than passing the raw string to sqlite3.connect(). The remediation should resolve symbolic links (real-path resolution) and reject targets outside the registered data roots, and it should cover any other read sinks that connect to on-disk databases resolved through nltk.data.find. As an interim mitigation, applications should ensure that no attacker-writable directory is registered as an NLTK data root and should avoid calling sql_query/sql_demo on resources that live in shared or untrusted locations.

Reported by zx (GitHub: @manus-pi).

Fix status (2026-09-28)

Status: IN PROGRESS (fix on an open pull request, not yet on develop).

PR: #3888 "Validate chat80.sql_query dbname for path containment (CWE-59/73)", open; head e0e890f51 at the time of this note. This is the same sink and vector as GHSA-xv54-447f-mj22 (now closed).

Fix commits: 9f5d2ea6d (sql_query calls validate_path before nltk.data.find, as cities2table, val_dump and val_load already do) and 47bd0476e (the file behind a sql_query resource name is resolved through the data roots and validated, and its store is pinned).

The advisory PoC (an in-root corpora/city_database/city.db symlink to an out-of-root SQLite file, resolved through find()) re-run on the PR head e0e890f51: refused with PermissionError (Security Violation [chat80.sql_query]: Unauthorized path, naming the symlink's resolved out-of-root target); the same resource name backed by a real in-root database still returns its rows on that head. On develop 2fa3f48fe the PoC returns the rows of the out-of-root database, so develop is VULNERABLE.

Probe: nltk/test/unit/security_probes/ghsa_xv54_447f_mj22.py on the PR (the sibling advisory GHSA-xv54-447f-mj22), FIXED on the PR head (absolute path, traversal and a symlink inside a scratch directory are all security-rejected). Those three cases are also rejected on develop by find() itself; the in-root symlink above is the case that only the PR closes.

Release: none.

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 3.10.3"
      },
      "package": {
        "ecosystem": "PyPI",
        "name": "nltk"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "3.9.4"
            },
            {
              "fixed": "3.10.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-126302"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22",
      "CWE-59"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-16T14:47:23Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "## Summary\n\n`nltk.sem.chat80.sql_query()` opens a SQLite database by handing the result of `nltk.data.find(dbname)` straight to `sqlite3.connect()` without the path-containment check that the NLTK data sandbox (`nltk.pathsec`) is meant to enforce. `nltk.data.find()` applies only lexical checks to the resource name and returns a `FileSystemPathPointer` whose path is normalized with `os.path.abspath` but never resolved for symlinks. As a result, an in-root symbolic link that points at a SQLite file outside every registered NLTK data root is followed by SQLite, and the caller receives query results from the out-of-sandbox database. An attacker who can place a file inside a directory the application trusts as an NLTK data root can read SQLite databases that the pathsec sandbox is supposed to keep out of reach.\n\n## Root Cause\n\nThe security invariant is that file access performed through NLTK data resolution must stay within the configured data roots; the sandbox enforces this in `nltk.pathsec` via `validate_path` and `pathsec.open`, which resolve the real path (`Path(...).resolve()`) and reject targets outside the allowed roots. `sql_query()` never reaches that enforcement point. It calls `nltk.data.find(dbname)`, whose guards operate purely on the resource-name string, and `FileSystemPathPointer.__init__` performs only `os.path.abspath` plus an existence check, which does not collapse symlinks. The pointer is then passed to `sqlite3.connect(str(path))`, so the containment decision that `FileSystemPathPointer.open()` would delegate to `pathsec.open` is bypassed entirely. The sibling functions in the same module that create or write databases (`cities2table`, `val_dump`, `val_load`) obtain their protection from a validation call in later development, but the read sink `sql_query` performs no equivalent check in any published release.\n\n```text\nnltk/sem/chat80.py  -\u003e sql_query(): path = nltk.data.find(dbname); sqlite3.connect(str(path))\nnltk/data.py        -\u003e find(): lexical name guards only; returns FileSystemPathPointer\nnltk/data.py        -\u003e FileSystemPathPointer.__init__(): os.path.abspath + os.path.exists (no symlink resolution)\nnltk/data.py        -\u003e FileSystemPathPointer.open() -\u003e nltk.pathsec.open (the containment guard that sql_query never calls)\n```\n\n## Impact\n\nAn attacker who can write into a directory the application registers as an NLTK data root (a shared or writable corpus directory, or a downloaded corpus) can plant a symbolic link at the expected resource location that points at a SQLite database elsewhere on the filesystem. When the application invokes `sql_query()` (directly or via `sql_demo()`) for that resource, SQLite follows the link and the query executes against the out-of-sandbox database, returning its rows to the caller. This escapes the pathsec confidentiality boundary. The read primitive is bounded to SQLite-format files that are readable by the process user: a non-SQLite target raises `sqlite3.DatabaseError` rather than leaking content. A caller-supplied write query would be redirected onto the out-of-sandbox target and SQLite may create sidecar files (`-wal`, `-journal`) next to it, which is a plausible integrity side effect rather than a demonstrated arbitrary-write primitive. Exploitation requires the same local write capability into a trusted data root as the related symlink-read sandbox-escape issues already recorded for this project.\n\n## Proof of Concept\n\n`Requires the published nltk 3.10.3 wheel and a writable directory registered as an NLTK data root. No network access is needed.`\n\n1. Create a throwaway data root with the expected corpus subdirectory.\n2. Create a SQLite database outside that root and populate it.\n3. Plant an in-root symbolic link at `corpora/city_database/city.db` pointing at the outside database.\n4. Register the data root and call `sql_query()` for the in-root resource name.\n\n```python\nimport os, tempfile, sqlite3, nltk, nltk.data\nfrom nltk.sem import chat80\n\nwork = tempfile.mkdtemp()\nroot = os.path.join(work, \"nltk_data\")\ncorp = os.path.join(root, \"corpora\", \"city_database\")\nos.makedirs(corp)\n\nsecret = os.path.join(work, \"outside\", \"secret.db\")\nos.makedirs(os.path.dirname(secret))\ncon = sqlite3.connect(secret)\ncon.execute(\"CREATE TABLE t (x text)\")\ncon.execute(\"INSERT INTO t VALUES (\u0027OUT-OF-SANDBOX-SECRET\u0027)\")\ncon.commit(); con.close()\n\nos.symlink(secret, os.path.join(corp, \"city.db\"))\nnltk.data.path.insert(0, root)\n\nptr = nltk.data.find(\"corpora/city_database/city.db\")\ntry:\n    ptr.open().read()            # pathsec route: blocked\nexcept Exception as e:\n    print(\"open() blocked:\", type(e).__name__)\n\ncur = chat80.sql_query(\"corpora/city_database/city.db\", \"SELECT * FROM t\")\nprint(\"sql_query rows:\", cur.fetchall())   # sink route: follows the symlink\n```\n\n```text\nopen() blocked: PermissionError\nsql_query rows: [(\u0027OUT-OF-SANDBOX-SECRET\u0027,)]\n```\n\n## Attack Chain\n\n1. **Exposure:** The application exposes `sql_query()` (or `sql_demo()`, which calls it) and resolves the target database through `nltk.data.find`, using at least one directory the attacker can write to as a data root.\n2. **Control:** The attacker controls the on-disk object at the in-root resource path, replacing it with a symbolic link whose target is chosen freely. The resource-name argument stays a clean, in-root string.\n3. **Path:** `nltk.data.find` applies its lexical name guards (`_UNSAFE_NO_PROTOCOL_RE`, encoded and normalized-form checks), which inspect only the name string and pass, then returns a `FileSystemPathPointer` whose `__init__` applies `os.path.abspath` and an existence check without resolving the symlink.\n4. **Guard:** The containment guard (`FileSystemPathPointer.open()` delegating to `nltk.pathsec.open`, which resolves the real path and rejects out-of-root targets) is never invoked, because `sql_query()` passes the raw pointer string to `sqlite3.connect()` instead of opening through the pointer.\n5. **Primitive:** `sqlite3.connect(str(path))` opens the symlink target; the kernel follows the link out of every data root and the cursor executes the query against the outside database.\n6. **Result:** Rows from a SQLite database outside the sandbox are returned to the caller, escaping the pathsec confidentiality boundary for SQLite-format files readable by the process user.\n\n## Bypass Evidence\n\nThe relevant guard is the pathsec containment enforced by `nltk.pathsec.open`/`validate_path`, reached through `FileSystemPathPointer.open()`. On an identical pointer produced from the planted symlink, `ptr.open()` raises `PermissionError` with an \"Unauthorized path\" security violation, confirming the guard is active and correct for the sandbox route. `sql_query()` does not call `.open()` and does not call `validate_path`; it passes the unresolved pointer string directly to `sqlite3.connect()`, so the guard never runs on this path and the read succeeds. Attempts to invalidate the finding were made and failed: `nltk.data.find` was checked for a hidden containment or real-path resolution and has none (its guards are name-string only, and `FileSystemPathPointer.__init__` uses `abspath`, not `realpath`); SQLite was confirmed to follow the link and read the outside file rather than opening the link node; and the possibility that an existing published fix already covers this sink was refuted by inspecting the published artifacts, where no containment check is present on `sql_query`. The behavior was reproduced against the exact published 3.10.3 wheel (verified by its published SHA-256 digest).\n\n## Affected Versions\n\n- `Ecosystem: PyPI`\n- `Package: nltk`\n- `Confirmed affected range: \u003e= 3.9.4, \u003c= 3.10.3`\n- `Latest release checked: 3.10.3 (PyPI, wheel SHA-256 ff9598a8e20518ee0d557745890cc4435b9578489e2dcbc69c4f81fa060caf7c)`\n- `Fix status: 3.10.4`\n\nThe pathsec sandbox that this issue bypasses was introduced in 3.9.4; the immediately preceding release 3.9.3 does not ship `nltk/pathsec.py` and therefore does not present this sandbox-escape surface. Every published release from 3.9.4 through the current latest 3.10.3 ships `nltk/pathsec.py` with `ENFORCE = True` and ships `sql_query()` without any containment check, so all of them are affected. Each affected wheel was fetched from PyPI and inspected directly. No published release removes the sink or adds the guard, so no fixed version exists at the time of review.\n\n## Suggested Fix\n\nEnforce the data-root containment invariant on the resolved database path before opening it. In `sql_query()`, validate the path through the same mechanism the sibling functions use (for example `validate_path(str(path), context=\"chat80.sql_query\")`) or open the database through the pointer\u0027s sandboxed open path rather than passing the raw string to `sqlite3.connect()`. The remediation should resolve symbolic links (real-path resolution) and reject targets outside the registered data roots, and it should cover any other read sinks that connect to on-disk databases resolved through `nltk.data.find`. As an interim mitigation, applications should ensure that no attacker-writable directory is registered as an NLTK data root and should avoid calling `sql_query`/`sql_demo` on resources that live in shared or untrusted locations.\n\nReported by zx (GitHub: @manus-pi).\n\n## Fix status (2026-09-28)\n\nStatus: IN PROGRESS (fix on an open pull request, not yet on develop).\n\nPR: #3888 \"Validate chat80.sql_query dbname for path containment (CWE-59/73)\", open; head e0e890f51 at the time of this note. This is the same sink and vector as GHSA-xv54-447f-mj22 (now closed).\n\nFix commits: 9f5d2ea6d (sql_query calls validate_path before nltk.data.find, as cities2table, val_dump and val_load already do) and 47bd0476e (the file behind a sql_query resource name is resolved through the data roots and validated, and its store is pinned).\n\nThe advisory PoC (an in-root corpora/city_database/city.db symlink to an out-of-root SQLite file, resolved through find()) re-run on the PR head e0e890f51: refused with PermissionError (Security Violation [chat80.sql_query]: Unauthorized path, naming the symlink\u0027s resolved out-of-root target); the same resource name backed by a real in-root database still returns its rows on that head. On develop 2fa3f48fe the PoC returns the rows of the out-of-root database, so develop is VULNERABLE.\n\nProbe: nltk/test/unit/security_probes/ghsa_xv54_447f_mj22.py on the PR (the sibling advisory GHSA-xv54-447f-mj22), FIXED on the PR head (absolute path, traversal and a symlink inside a scratch directory are all security-rejected). Those three cases are also rejected on develop by find() itself; the in-root symlink above is the case that only the PR closes.\n\nRelease: none.",
  "id": "GHSA-xmfg-f9cm-w86q",
  "modified": "2026-11-16T14:47:23Z",
  "published": "2026-11-16T14:47:23Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/nltk/nltk/security/advisories/GHSA-xmfg-f9cm-w86q"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126302"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/nltk/nltk"
    },
    {
      "type": "WEB",
      "url": "https://www.vulncheck.com/advisories/nltk-3.9.4-before-3.10.4-symlink-sandbox-escape-via-chat80-sql-query"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "NLTK: Symlink escape in chat80.sql_query bypasses the pathsec data-root sandbox to read out-of-root SQLite databases"
}

GHSA-XMV6-R34M-62P4

Vulnerability from github – Published: 2026-03-03 22:08 – Updated: 2026-03-03 22:08
VLAI
Summary
OpenClaw: Sandbox media fallback tmp symlink alias bypass allows host file reads outside sandboxRoot
Details

Summary

A sandbox path validation bypass in openclaw allows host file reads outside sandboxRoot via the media path fallback tmp flow when the fallback tmp root is a symlink alias.

Affected Packages / Versions

  • Package: npm openclaw
  • Affected versions: <= 2026.2.24
  • Latest published npm version at triage time (February 26, 2026): 2026.2.24
  • Patched version : 2026.2.25

Details

When /tmp/openclaw is unavailable or unsafe, resolvePreferredOpenClawTmpDir() in src/infra/tmp-openclaw-dir.ts fell back to os.tmpdir()/openclaw-<uid> without verifying that fallback path was a trusted non-symlink directory.

resolveSandboxedMediaSource() (src/agents/sandbox-paths.ts) allows absolute tmp media paths under the OpenClaw tmp root using lexical containment and alias checks. If the fallback tmp root is a symlink alias (for example to /), inputs like $TMPDIR/openclaw-<uid>/etc/passwd can pass validation and resolve to host files outside sandboxRoot.

Impact

This can break sandbox media path confinement and permit unauthorized host file reads (confidentiality impact).

Reproduction (high level)

  1. Force resolver fallback (make /tmp/openclaw unavailable/invalid).
  2. Make fallback root ($TMPDIR/openclaw-<uid>) a symlink alias to /.
  3. Submit media path under fallback root (for example $TMPDIR/openclaw-<uid>/etc/passwd).
  4. Observe accepted path and read outside sandboxRoot.

Fix Commit(s)

  • 496a76c03ba85e15ea715e5a583e498ae04d36e3

Release Process Note

Patched version is pre-set to release 2026.2.25; once npm publish for 2026.2.25 is complete, this advisory can be published without further metadata edits.

OpenClaw thanks @tdjackey for reporting.

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 2026.2.24"
      },
      "package": {
        "ecosystem": "npm",
        "name": "openclaw"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2026.2.25"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-22",
      "CWE-59"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-03T22:08:54Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "### Summary\nA sandbox path validation bypass in `openclaw` allows host file reads outside `sandboxRoot` via the media path fallback tmp flow when the fallback tmp root is a symlink alias.\n\n### Affected Packages / Versions\n- Package: `npm openclaw`\n- Affected versions: `\u003c= 2026.2.24`\n- Latest published npm version at triage time (February 26, 2026): `2026.2.24`\n- Patched version : `2026.2.25`\n\n### Details\nWhen `/tmp/openclaw` is unavailable or unsafe, `resolvePreferredOpenClawTmpDir()` in `src/infra/tmp-openclaw-dir.ts` fell back to `os.tmpdir()/openclaw-\u003cuid\u003e` without verifying that fallback path was a trusted non-symlink directory.\n\n`resolveSandboxedMediaSource()` (`src/agents/sandbox-paths.ts`) allows absolute tmp media paths under the OpenClaw tmp root using lexical containment and alias checks. If the fallback tmp root is a symlink alias (for example to `/`), inputs like `$TMPDIR/openclaw-\u003cuid\u003e/etc/passwd` can pass validation and resolve to host files outside `sandboxRoot`.\n\n### Impact\nThis can break sandbox media path confinement and permit unauthorized host file reads (confidentiality impact).\n\n### Reproduction (high level)\n1. Force resolver fallback (make `/tmp/openclaw` unavailable/invalid).\n2. Make fallback root (`$TMPDIR/openclaw-\u003cuid\u003e`) a symlink alias to `/`.\n3. Submit media path under fallback root (for example `$TMPDIR/openclaw-\u003cuid\u003e/etc/passwd`).\n4. Observe accepted path and read outside `sandboxRoot`.\n\n### Fix Commit(s)\n- `496a76c03ba85e15ea715e5a583e498ae04d36e3`\n\n### Release Process Note\nPatched version is pre-set to release `2026.2.25`; once npm publish for `2026.2.25` is complete, this advisory can be published without further metadata edits.\n\nOpenClaw thanks @tdjackey for reporting.",
  "id": "GHSA-xmv6-r34m-62p4",
  "modified": "2026-03-03T22:08:54Z",
  "published": "2026-03-03T22:08:54Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/openclaw/openclaw/security/advisories/GHSA-xmv6-r34m-62p4"
    },
    {
      "type": "WEB",
      "url": "https://github.com/openclaw/openclaw/commit/496a76c03ba85e15ea715e5a583e498ae04d36e3"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/openclaw/openclaw"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "OpenClaw: Sandbox media fallback tmp symlink alias bypass allows host file reads outside sandboxRoot"
}

GHSA-XPCC-F29M-W2XX

Vulnerability from github – Published: 2024-10-08 18:33 – Updated: 2024-10-08 18:33
VLAI
Details

Windows Storage Elevation of Privilege Vulnerability

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-43551"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-59"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-10-08T18:15:20Z",
    "severity": "HIGH"
  },
  "details": "Windows Storage Elevation of Privilege Vulnerability",
  "id": "GHSA-xpcc-f29m-w2xx",
  "modified": "2024-10-08T18:33:16Z",
  "published": "2024-10-08T18:33:16Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-43551"
    },
    {
      "type": "WEB",
      "url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-43551"
    }
  ],
  "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-XPF3-P7GM-7756

Vulnerability from github – Published: 2026-10-14 19:34 – Updated: 2026-10-14 19:34
VLAI
Summary
BBOT's Symlink guard bypass in unarchive module allows planting symlinks during extraction
Details

BBOT's unarchive module rejects archives containing symlink entries before extraction, but for zip and 7z archives it failed to detect symlinks whose listing carries a DOS-attribute prefix before the unix mode, as produced by legacy versions of p7zip. Such an archive, downloaded and extracted during a scan (for example via filedownload), bypassed the guard and caused an attacker-controlled symlink to be written into the extraction directory. The effect is limited to planting the symlink (its target is not written through), and only hosts using such a legacy p7zip build are affected; current mainline 7-Zip is not.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "bbot"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.3.1"
            },
            {
              "fixed": "3.0.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-14966"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22",
      "CWE-59"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-10-14T19:34:31Z",
    "nvd_published_at": "2026-07-08T16:16:27Z",
    "severity": "LOW"
  },
  "details": "BBOT\u0027s `unarchive` module rejects archives containing symlink entries before extraction, but for zip and 7z archives it failed to detect symlinks whose listing carries a DOS-attribute prefix before the unix mode, as produced by legacy versions of p7zip. Such an archive, downloaded and extracted during a scan (for example via `filedownload`), bypassed the guard and caused an attacker-controlled symlink to be written into the extraction directory. The effect is limited to planting the symlink (its target is not written through), and only hosts using such a legacy p7zip build are affected; current mainline 7-Zip is not.",
  "id": "GHSA-xpf3-p7gm-7756",
  "modified": "2026-10-14T19:34:31Z",
  "published": "2026-10-14T19:34:31Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/blacklanternsecurity/bbot/security/advisories/GHSA-xpf3-p7gm-7756"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-14966"
    },
    {
      "type": "WEB",
      "url": "https://github.com/blacklanternsecurity/bbot/commit/3bc8d3a96f34f312853c9fcf8decee2a4e905f26"
    },
    {
      "type": "WEB",
      "url": "https://github.com/blacklanternsecurity/bbot/commit/a3f1a2292e2b0a553827c6175b761abe28807735"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/blacklanternsecurity/bbot"
    },
    {
      "type": "WEB",
      "url": "https://github.com/pypa/advisory-database/tree/main/vulns/bbot/PYSEC-2026-3719.yaml"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "BBOT\u0027s Symlink guard bypass in unarchive module allows planting symlinks during extraction"
}

Mitigation MIT-48.1
Architecture and Design

Strategy: Separation of Privilege

  • Follow the principle of least privilege when assigning access rights to entities in a software system.
  • Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.
CAPEC-132: Symlink Attack

An adversary positions a symbolic link in such a manner that the targeted user or application accesses the link's endpoint, assuming that it is accessing a file with the link's name.

CAPEC-17: Using Malicious Files

An attack of this type exploits a system's configuration that allows an adversary to either directly access an executable file, for example through shell access; or in a possible worst case allows an adversary to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.

CAPEC-35: Leverage Executable Code in Non-Executable Files

An attack of this type exploits a system's trust in configuration and resource files. When the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high.

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.