NLTK's JSONTaggedDecoder contains an unbounded recursion vulnerability (CVE-2026-66393) that allows remote attackers to crash Python processes via deeply nested JSON payloads. The root cause is in the decode_obj() method, which recursively parses tagged JSON structures without any depth limiting mechanism.

This matters because Python's standard json module includes recursion protections by default, but custom decoders like this one strip those safeguards away. If you're wrapping NLTK in a web service or API endpoint that accepts JSON from untrusted sources, you're exposing a denial-of-service vector that looks like normal JSON processing but behaves differently than expected.

Check your codebase for any path that routes JSON input through NLTK's tagging system — specifically calls to JSONTaggedDecoder, TaggedDecoder, or any custom decode_obj implementation. The vulnerable code pattern is straightforward: recursive descent without a depth counter. The fix adds explicit depth tracking that raises an exception rather than stack-overflowing.

The broader risk is that NLTK has become infrastructure in production ML pipelines, containerized inference APIs, and data processing tools where developers assume the library handles JSON safely because it speaks JSON. It doesn't. Your deployment context — not NLTK's — is now responsible for that protection. Validate JSON depth before it reaches NLTK, or patch decode_obj() with a configurable recursion limit and ensure the exception propagates cleanly to your error handling. Treat any NLTK JSON parsing as potentially adversarial by default.