Skip to main content
SkillTotal

Is nltk safe?

Low risk - review the findings before installing
Notable — review in context (a capability is not a malicious indicator):
  • Unsafe deserialization
  • Python dynamic code execution
  • Python shell/command execution

What to do: Nothing here argues against installing it. Grant the capabilities it lists only if you expect the tool to need them.

nltk is a PyPI package analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators, though 1 risky construct is reported for review. It can: dynamic code execution, filesystem read, filesystem write, network egress and shell execution — capabilities are what the code can do, not a verdict on intent. Risk score 20/100 (low).

nltk 3.10.4

PyPI package · pypi:nltk
LOW
20
/ 100 risk score
Snapshot · scanned Nov 20, 2026 · nltk@3.10.4 · engine 1.8.0 / ruleset 107

Get notified when this component changes

Change alerts aren't live yet. Leave your email and we'll let you know when they launch. We use it only for this and delete it on request.

Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of nltk's authors. Report a false positive.

Capabilities — what this component can do (not a risk score):
dynamic code executionfilesystem readfilesystem writenetwork egressshell execution

Behavioral traits

How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.

Execution authority
Tool Access Control / Direct Tool Access
Filesystem reach
Tool Execution Context
Network egress
Interaction & Communication / Direct Communication
Unsafe deserialization
General Protections / Input Validation

Findings (6)

HIGHUnsafe deserializationST-DESERIALIZE-PY

It loads data with a format that can rebuild arbitrary objects (e.g. pickle, or unsafe YAML).

inner = shelve.open(db, flag)
db_out = shelve.open(os.path.join(staging, stem), "n")

Why it matters: Feeding such a loader untrusted data can execute code hidden inside that data.

Fix: Deserialize untrusted data with a safe format/loader: JSON, or yaml.safe_load / Loader=SafeLoader. Reserve pickle/marshal for data you fully control.

CapabilityPython dynamic code executionnot scored · severity highST-DYN-PY

The code turns strings into live code at runtime (eval / new Function / exec).

funcopy = eval(
        src, dict(_wrapper_=wrapper)
    )  # bare-exec ok: _assert_safe_signature fenced src (CVE-2026-14727)
dec_func = eval(
            src, dict(_func_=func, _call_=caller)
        )  # bare-exec ok: _assert_safe_signature fenced src (CVE-2026-14727)
return compile(src, flags)
return compile(pattern, flags)
return compile(source_of(pattern), flags)

Why it matters: If those strings aren't fixed and trusted, they become a way to run arbitrary code.

Fix: Avoid evaluating dynamically constructed code; if unavoidable, ensure the input is a trusted constant and never derived from external data.

CapabilityPython shell/command executionnot scored · severity highST-SHELL-PY

The component can run operating-system commands or spawn processes.

return subprocess.Popen([invoked, *args], executable=real, **popen_kw)

Why it matters: Powerful and often legitimate — confirm the commands aren't built from untrusted input.

Fix: Confirm the command and its arguments are fully controlled and not derived from untrusted input; avoid shell=True.

CapabilityPython filesystem readnot scored · severity mediumST-FS-PY-READ

The component reads files from disk.

with open(
            filename, "rb"
        ) as infile:  # sandboxed-open ok: operator-chosen GUI file path
with open(
                filename, "rb"
            ) as infile:  # sandboxed-open ok: operator-chosen GUI file path
with open(
                    filename, "rb"
                ) as infile:  # sandboxed-open ok: operator-chosen GUI file path
with open(
                    filename
                ) as infile:  # sandboxed-open ok: operator-chosen GUI file path
with open(
            filename
        ) as infile:  # sandboxed-open ok: operator-chosen GUI file path
with open(
                        usp
                    ) as infile:  # sandboxed-open ok: fixed db-info filename (exact-string gated)
"text": _ieer_read_text(m.group("text"), root_label),
"headline": _ieer_read_text(m.group("headline"), root_label),
return _ieer_read_text(s, root_label)
with self.abspath(framefile).open() as fp:
with self.abspath(framefile).open() as fp:
with self.abspath(framefile).open() as fp:
with self.abspath(framefile).open() as fp:
with self.abspath(fileid).open() as fp:
return find(path_).open()
return find(local_path).open()
with super().open(info, mode="r", pwd=pwd) as raw:
return super().open(name, mode, pwd, force_zip64=force_zip64)
raw = super().open(info, mode="r", pwd=pwd, force_zip64=force_zip64)
pins[name] = open(
                name, "rb", context=context
            )  # sandboxed-open ok: pathsec.open
with open(
            self.creds_fullpath, encoding="utf8"
        ) as infile:  # sandboxed-open ok: operator credentials path, not attacker input

Why it matters: Usually legitimate, but worth confirming it can't be steered into reading sensitive files.

Fix: Confirm which files are read and that paths cannot be influenced by untrusted input to reach sensitive locations.

CapabilityPython filesystem write/deletenot scored · severity mediumST-FS-PY-WRITE

The component writes or deletes files on disk.

with open(
                filename, "wb"
            ) as outfile:  # sandboxed-open ok: operator-chosen GUI file path
with open(
                filename, "wb"
            ) as outfile:  # sandboxed-open ok: operator-chosen GUI file path
with open(
                    filename, "wb"
                ) as outfile:  # sandboxed-open ok: operator-chosen GUI file path
with open(
                    filename, "w"
                ) as outfile:  # sandboxed-open ok: operator-chosen GUI file path
with open(
            filename, "w"
        ) as outfile:  # sandboxed-open ok: operator-chosen GUI file path
with open(
            filename, "w"
        ) as outfile:  # sandboxed-open ok: operator-chosen GUI file path
logfile = open(
                logfilename, "a", buffering=1
            )  # sandboxed-open ok: operator log path
with open(
            filename, "wb"
        ) as f:  # sandboxed-open ok: operator-chosen GUI file path
os.unlink(leaf, dir_fd=dir_fd)
_shutil.copyfileobj(source, sink)
os.unlink(leaf, dir_fd=dir_fd)
shutil.rmtree(text, ignore_errors=ignore_errors)
os.unlink(name, dir_fd=dir_fd)
outf = open(
            outfile, "w", newline="", encoding=encoding, errors=errors
        )  # sandboxed-open ok: operator output path
self.output = open(
                    self.fname, "w"
                )  # sandboxed-open ok: operator output path
with open(
        creds_file, "a", encoding="utf8"
    ) as infile:  # sandboxed-open ok: operator credentials path, not attacker input

Why it matters: Usually legitimate, but worth confirming the paths can't be controlled by untrusted input.

Fix: Confirm which files are written/deleted and that paths cannot be influenced by untrusted input.

CapabilityPython network egressnot scored · severity mediumST-NET-PY

The component makes outbound network requests.

import urllib.request
from urllib.request import url2pathname
rewritten = url2pathname(name)
p = os.path.join(path_, url2pathname(resource_name))
pkg_dir = os.path.join(path_, url2pathname(pkg))
pkg_zip = os.path.join(path_, url2pathname(pkg + ".zip"))
p = os.path.join(path_, url2pathname(zipfile))
local_path = url2pathname(path_)
return requests.exceptions.HTTPError(message, response=response)
response = requests.get(
                    requests.compat.urljoin(self.url, "live"), timeout=5
                )
requests.compat.urljoin(self.url, "live"), timeout=5
response = requests.get(
                    requests.compat.urljoin(self.url, "ready"), timeout=5
                )
requests.compat.urljoin(self.url, "ready"), timeout=5
self.session = requests.Session()
import urllib.request
proxies = urllib.request.getproxies()
return bool(host) and not urllib.request.proxy_bypass(host)
handlers.append(urllib.request.ProxyHandler(isolated_proxies))
handlers.append(urllib.request.ProxyBasicAuthHandler(handler.passwd))
handlers.append(urllib.request.ProxyDigestAuthHandler(handler.passwd))
handlers.append(urllib.request.ProxyHandler({}))
opener = urllib.request.build_opener(*handlers)

Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.

Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.

How attackers abuse these capabilities

Interactive labs on the attack class behind the rules above. They show the technique, not anything found in nltk.

Maintain nltk?

Check the next package before your agent installs it

The free Claude Code plugin scans each npm, PyPI or MCP package with this report's open-source engine before the install command runs. It runs on your machine and needs no account.

Check your own component

Run the same evidence-backed scan on any MCP server, agent skill, or package.

Scan your own component

How we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →