nltk@2.0.1rc2-git

Natural Language Toolkit

  • latest version

    3.9.4

  • latest non vulnerable version

  • first published

    16 years ago

  • latest version published

    1 months ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the nltk package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • C
    Unsafe Dependency Resolution

    nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

    Affected versions of this package are vulnerable to Unsafe Dependency Resolution due to lack of verification or sandboxing in the StanfordSegmenter module, when unvalidated Java Archive (JAR) files are dynamically loaded. An attacker can execute arbitrary Java bytecode by supplying or replacing a JAR file, potentially through model poisoning, Man-in-the-Middle (MITM) attacks, or dependency poisoning.

    How to fix Unsafe Dependency Resolution?

    Upgrade nltk to version 3.9.3 or higher.

    [,3.9.3)
    • M
    Uncontrolled Recursion

    nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

    Affected versions of this package are vulnerable to Uncontrolled Recursion via the JSONTaggedDecoder.decode_obj() function in jsontags.py. An attacker can cause the application to crash by submitting a deeply nested JSON structure that exceeds the recursion limit, resulting in an unhandled exception.

    How to fix Uncontrolled Recursion?

    Upgrade nltk to version 3.9.4 or higher.

    [0,3.9.4)
    • M
    Cross-site Scripting (XSS)

    nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the lookup_... route in the web interface, where attacker-controlled input is reflected into the HTML response without proper escaping. An attacker can execute arbitrary JavaScript in the browser context of the application by convincing a user to open a crafted URL.

    How to fix Cross-site Scripting (XSS)?

    Upgrade nltk to version 3.9.4 or higher.

    [0,3.9.4)
    • H
    Directory Traversal

    nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

    Affected versions of this package are vulnerable to Directory Traversal via the XML index file downloader. An attacker can overwrite arbitrary files and create directories at unintended locations by supplying malicious values for the subdir and id attributes containing path traversal sequences in a remote XML index file.

    How to fix Directory Traversal?

    Upgrade nltk to version 3.9.4 or higher.

    [0,3.9.4)
    • H
    Missing Authentication for Critical Function

    nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

    Affected versions of this package are vulnerable to Missing Authentication for Critical Function in WordNet Browser HTTP server in default configuration. An attacker can cause the service to terminate immediately by sending a specially crafted unauthenticated HTTP GET request (e.g. http://127.0.0.1:8004/SHUTDOWN%20THE%20SERVER) to the listening port.

    How to fix Missing Authentication for Critical Function?

    Upgrade nltk to version 3.9.4 or higher.

    [0,3.9.4)
    • H
    Directory Traversal

    nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

    Affected versions of this package are vulnerable to Directory Traversal via the filestring function. An attacker can access sensitive files by supplying specially crafted input paths, such as absolute paths or directory traversal sequences, to bypass input validation and read arbitrary files on the system.

    Note:

    This is only exploitable if the function processes untrusted user input, such as in web APIs or network-accessible services.

    How to fix Directory Traversal?

    Upgrade nltk to version 3.9.3 or higher.

    [,3.9.3)
    • H
    Directory Traversal

    nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

    Affected versions of this package are vulnerable to Directory Traversal due to improper sanitization of file paths in the CorpusReader classes. An attacker can gain unauthorized access to sensitive files by supplying crafted file paths to applications that process user-controlled file inputs.

    How to fix Directory Traversal?

    Upgrade nltk to version 3.9.3 or higher.

    [,3.9.3)
    • H
    Arbitrary Code Injection

    nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

    Affected versions of this package are vulnerable to Arbitrary Code Injection via the _unzip_iter() function due to the lack of validation before unpacking untrusted downloaded packages. An attacker can execute arbitrary code by supplying a specially crafted zip file.

    How to fix Arbitrary Code Injection?

    Upgrade nltk to version 3.9.3 or higher.

    [,3.9.3)
    • H
    Remote Code Execution (RCE)

    nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

    Affected versions of this package are vulnerable to Remote Code Execution (RCE) through the integrated data package download functionality. An attacker with control over the NLTK data index can execute arbitrary code by supplying pickled Python code within untrusted packages and trick a user into loading the malicious pickle.

    Some packages found to be vulnerable if compromised are averaged_perceptron_tagger, punkt, maxent_ne_chunker, help/tagsets, and maxent_treebank_pos_tagger.

    How to fix Remote Code Execution (RCE)?

    Upgrade nltk to version 3.9 or higher.

    [0,3.9)
    • H
    Remote Code Execution (RCE)

    nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

    Affected versions of this package are vulnerable to Remote Code Execution (RCE) in the local WordNet browser. When a user opens a malicious link while the WordNet browser is active, it can result in the exploitation of this vulnerability on their system.

    How to fix Remote Code Execution (RCE)?

    Upgrade nltk to version 3.8.1 or higher.

    [,3.8.1)
    • M
    Cross-site Scripting (XSS)

    nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) due to improper input sanitization in the local Wordnet browser via the MyServerHandler class. Exploiting this vulnerability is possible by creating a maliciously crafted URL.

    Note: This only affects users of this browser interface to Wordnet, and not other users of Wordnet.

    How to fix Cross-site Scripting (XSS)?

    Upgrade nltk to version 3.8.1 or higher.

    [,3.8.1)
    • M
    Regular Expression Denial of Service (ReDoS)

    nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the RegexpTagger method.

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade nltk to version 3.6.6 or higher.

    [0,3.6.6)
    • H
    Regular Expression Denial of Service (ReDoS)

    nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via word_tokenize() in nltk/tokenize/punkt.py.

    PoC

    from nltk.tokenize import word_tokenize
    import nltk
    nltk.download('punkt')
    import time
    
    for length in [1000*2**n for n in range(1000)]:
        text = "a" * length
        start_t = time.time()
        word_tokenize(text)
        print(f"payload length: {length} takes {time.time()-start_t}s")
    

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade nltk to version 3.6.6 or higher.

    [0,3.6.6)
    • M
    Regular Expression Denial of Service (ReDoS)

    nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) in the CorpusReader for the Comparative Sentences Dataset.

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade nltk to version 3.6.4 or higher.

    [,3.6.4)
    • M
    Regular Expression Denial of Service (ReDoS)

    nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). _XML_TAG_NAME regex operator is vulnerable mainly due to the sub-pattern \s*/?\s* and can be exploited with an input such as "<"+" " * 5000

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade nltk to version 3.6 or higher.

    [0,3.6)
    • M
    Arbitrary File Write via Archive Extraction (Zip Slip)

    nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

    Affected versions of this package are vulnerable to Arbitrary File Write via Archive Extraction (Zip Slip). It allows attackers to write arbitrary files via a ../ (dot dot slash) in an NLTK package (ZIP archive) that is mishandled during extraction.

    How to fix Arbitrary File Write via Archive Extraction (Zip Slip)?

    Upgrade nltk to version 3.4.5 or higher.

    [,3.4.5)