Skip to content
Heist/ feed
Back to feed
High

Arbitrary File Read via Absolute Path Input in nltk.util.filestring()

Type: advisorySources: OSV

A vulnerability in the `filestring()` function of the `nltk.util` module in nltk version 3.9.2 allows arbitrary file read due to improper validation of input paths. The function directly opens files specified by user input without sanitization, enabling attackers to access sensitive system files by providing absolute paths or traversal paths. This vulnerability can be exploited locally or remotely, particularly in scenarios where the function is used in web APIs or other interfaces that accept user-supplied input.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-0846
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 17:53 UTC · Revision 1

Source evidence

Arbitrary File Read via Absolute Path Input in nltk.util.filestring()

core-osv · Original source

Published 9 Mar 2026, 19:19 UTC

A vulnerability in the `filestring()` function of the `nltk.util` module in nltk version 3.9.2 allows arbitrary file read due to improper validation of input paths. The function directly opens files specified by user input without sanitization, enabling attackers to access sensitive system files by providing absolute paths or traversal paths. This vulnerability can be exploited locally or remotely, particularly in scenarios where the function is used in web APIs or other interfaces that accept user-supplied input.

osv:CVE-2026-0846
Complete source record
{
  "id": "58d6f075d9713df64732e81080eaf13a54b89bdfb2457053103809d8e00be0a2",
  "url": "https://osv.dev/vulnerability/CVE-2026-0846",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Arbitrary File Read via Absolute Path Input in nltk.util.filestring()",
    "summary": "A vulnerability in the `filestring()` function of the `nltk.util` module in nltk version 3.9.2 allows arbitrary file read due to improper validation of input paths. The function directly opens files specified by user input without sanitization, enabling attackers to access sensitive system files by providing absolute paths or traversal paths. This vulnerability can be exploited locally or remotely, particularly in scenarios where the function is used in web APIs or other interfaces that accept user-supplied input.",
    "evidence": "osv:CVE-2026-0846",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-0846",
      "aliases": [
        "CVE-2026-0846",
        "GHSA-h8wq-7xc4-p3qx",
        "PYSEC-2026-97"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/nltk/nltk",
              "type": "GIT",
              "events": [
                {
                  "introduced": "4e17ea390c526ec9cb9e5ef5eb3733ac118dbb8d"
                },
                {
                  "last_affected": "4e17ea390c526ec9cb9e5ef5eb3733ac118dbb8d"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:nltk:nltk:3.9.2:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.9.2"
                      },
                      {
                        "last_affected": "3.9.2"
                      }
                    ],
                    "source": "CPE_STRING"
                  }
                ]
              }
            }
          ],
          "versions": [
            "3.9.2",
            "v3.9.2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-0846.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:51.325966607Z",
      "provider": "osv",
      "references": [
        "https://huntr.com/bounties/007b84f8-418e-4300-99d0-bf504c2f97eb",
        "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-0846.json",
        "https://access.redhat.com/errata/RHSA-2026:10184",
        "https://access.redhat.com/errata/RHSA-2026:19712",
        "https://access.redhat.com/security/cve/CVE-2026-0846",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/0xxx/CVE-2026-0846.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-0846",
        "https://bugzilla.redhat.com/show_bug.cgi?id=2445826"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-36"
        ],
        "cna_assigner": "@huntr_ai",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/0xxx/CVE-2026-0846.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-0846",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 520028,
  "published_at": "2026-03-09T19:19:09.464+00:00"
}