.pth file (Python)
A small text file in a Python site-packages directory that the interpreter reads at start-up to extend the import path, and that can also execute code.
Because .pth files run before any user code and whether or not the package that installed them is ever imported, they are a favoured way to plant persistent malware in a Python environment. The November 2026 poisoning of Microsoft's agent-framework package on PyPI used one to launch a credential stealer at every interpreter start. Supply-chain scanners should flag any install that writes a .pth file.
Get the brief in your inbox
One email every morning: the stories that mattered in AI, each with a one-line "why it matters" for your role. Free, no ads, unsubscribe any time.
Published daily by AI Briefing. We never share your address.