NLTK patches denial of service vulnerability in semantic-logic type parser

  • NLTK
  • denial of service
  • RecursionError

Uncontrolled recursion triggered by nested type strings

Issue tracked as CWE-674 affects versions up to 3.10.3

Users advised to update to version 3.10.4

NLTK has confirmed a security vulnerability in its semantic-logic type parser that can lead to a denial of service. The flaw stems from uncontrolled recursion triggered when the parser processes nested type strings.

Applications that parse untrusted type strings or check expressions against attacker-influenced signatures are susceptible to this issue. When triggered, the library encounters an unhandled RecursionError, which terminates the affected operation or request worker. This vulnerability is limited to pure Python recursion and does not result in memory corruption or arbitrary code execution.

NLTK versions up to and including 3.10.3 are affected by this flaw. The organization has released version 3.10.4 to address the issue.