Skip to content

← Public intelligence

PyPI package

nltk

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

53 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 8.7PyPIAmendedPublished

    Inefficient Regular Expression Complexity in nltk (word_tokenize, sent_tokenize)

    CVE-2021-43854 · GHSA-f8m6-h2c7-8h9x

    Affected
    • PyPI nltk < 3.6.6
    Fixed in
    3.6.6· Vendor fix available
    Issue
    Impact The vulnerability is present in PunktSentenceTokenizer, senttokenize and wordtokenize. Any users of this class, or these two functions, are vulnerable to a Regular Expression Denial of Service (ReDoS) attack. In short, a specifically crafted long input to any of these vulnerable functions will cause them to take a significant amount of execution time. The effect of this vulnerability is noticeable with the following example: Which gave the following output during testing: I canceled the execution of the program after running it for several hours. If your program relies on any of the vulnerable functions for tokenizing unpredictable user input, then we would strongly recommend upgrading to a version of NLTK without the vulnerability, or applying the workaround described below. Patches The problem has been patched in NLTK 3.6.6. After the fix, running the above program gives the following result: This output shows a linear relationship in execution time versus input length,…

    Recommended action: Upgrade to 3.6.6 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. High, CVSS 8.7PyPIAmendedPublished

    NLTK Vulnerable to REDoS

    CVE-2021-3828 · GHSA-2ww3-fxvq-293j

    Affected
    • PyPI nltk < 3.6.4
    Fixed in
    3.6.4· Vendor fix available
    Issue
    The nltk package is vulnerable to ReDoS (regular expression denial of service). An attacker that is able to provide as an input to the readcomparisonblock()(https://github.com/nltk/nltk/blob/23f4b1c4b4006b0cb3ec278e801029557cec4e82/nltk/corpus/reader/comparativesents.py#L259) function in the file nltk/corpus/reader/comparativesents.py may cause an application to consume an excessive amount of CPU.

    Recommended action: Upgrade to 3.6.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. High, CVSS 8.7PyPIAmendedPublished

    NLTK Vulnerable To Path Traversal

    CVE-2019-14751 · GHSA-mr7p-25v2-35wr

    Affected
    • PyPI nltk < 3.4.5
    Fixed in
    3.4.5· Vendor fix available
    Issue
    NLTK Downloader before 3.4.5 is vulnerable to a directory traversal, allowing attackers to write arbitrary files via a ../ (dot dot slash) in an NLTK package (ZIP archive) that is mishandled during extraction.

    Recommended action: Upgrade to 3.4.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →