UBUNTU-CVE-2021-43854

    Dashboard / Vulnerabilities / UBUNTU-CVE-2021-43854

    UBUNTU-CVE-2021-43854

    Published: 23 Dec 2021Last Modified: 4 Feb 2026
    Upstream:
    Aliases:

    Summary:

    Details: NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. Versions prior to 3.6.5 are vulnerable to regular expression denial of service (ReDoS) attacks. The vulnerability is present in PunktSentenceTokenizer, sent_tokenize and word_tokenize. Any users of this class, or these two functions, are vulnerable to the 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. 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. For users unable to upgrade the execution time can be bounded by limiting the maximum length of an input to any of the vulnerable functions. Our recommendation is to implement such a limit.

    Affected packages

    Package

    Name: nltk

    Purl: pkg:deb/ubuntu/[email protected]~b9-0ubuntu4.1~esm4?arch=source&distro=esm-infra-legacy/trusty

    Affected ranges

    Type: ECOSYSTEM

    Events:

    Introduced- 0
    Fixed -2.0~b9-0ubuntu4.1~esm4

    Affected versions

    2.0~b9-0ubuntu4
    2.0~b9-0ubuntu4.1~esm2

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    UBUNTU-CVE-2021-43854 | CVE-DB