Let's see how we can help you!
Leave a message and our dedicated advisor will contact you.
Send us a message
0/10000
Leave a message and our dedicated advisor will contact you.
As engineers and system architects, we operate daily within a paradigm of trust in the open-source ecosystem. The pip install command has become as reflexive as breathing — thousands of times a day, on hundreds of thousands of machines, without a second thought. On March 24, 2026, that foundation of modern software engineering was brutally shaken.
The victim was litellm — a critical tool in the AI world, downloaded nearly 97 million times per month. Malicious versions (1.82.7 and 1.82.8) appeared on PyPI bypassing standard CI/CD processes — the attackers uploaded them directly, leaving no trace in the form of tags or releases on GitHub. Worse still, through the transitive dependency mechanism, the infected code reached every system that installed popular packages like dspy or MCP plugins for the Cursor editor.
As architects, we need to ask ourselves: do we really know what happens in our environment after we press Enter?
The most terrifying aspect of version 1.82.8 was the use of a litellm_init.pth file. Developers typically believe that malicious code in a library only becomes dangerous after an import statement. This attack proved that assumption wrong.
.pth files (Path Configuration Files) are processed by the site module during Python interpreter initialization. Their original purpose is adding directories to sys.path, but they allow arbitrary code execution via exec(). For an attacker, this is the "Holy Grail" of persistence — malicious code runs automatically on every interpreter start, as long as the file exists in site-packages.
Simply installing the package was enough — the malware activated when running any completely unrelated Python script on that machine. This entirely invalidates the doctrine of "I'm safe because I don't use that library."
The duality of this attack is worth examining closely, as it reveals the attackers' methodology.
Version 1.82.7 was subtle. It contained no .pth file, instead hiding its payload inside proxy/proxy_server.py. The malicious code activated only when the litellm proxy server was started — meaning it targeted production environments where the library was actively running. A quiet, surgically precise strike.
Version 1.82.8 went for total takeover. The .pth mechanism automatically infected every environment where the package existed — from developer laptops to CI/CD servers. This dualism suggests the attacker was iterating through infection methods, moving from stealthy infiltration to aggressive domination.
Checking only one version during an audit could lull your SOC team into a false sense of security.
The world learned about the attack just one hour after the malicious package was published, entirely thanks to the attackers' incompetence. Their code contained a critical logic bug.
The .pth mechanism called subprocess.Popen to launch a data theft process in the background. Since every new Python process reloaded the same .pth file, the system entered a recursive process-spawning loop — a classic fork bomb. Instead of silent data exfiltration, the malware instantly devoured all available RAM and CPU resources, crashing the machine immediately.
Callum McMahon from FutureSearch discovered the attack precisely because engineers using Cursor and MCP plugins (which pulled in litellm) started reporting unexplained mass system hangs. Had the code been written properly, the malware could have resided in environments for weeks, silently draining secrets from thousands of companies. The irony — it was the hackers' lack of craftsmanship that saved the entire community.
Payload analysis reveals frightening precision in target selection. The malware was designed as a total "vacuum cleaner," meant to strip the machine of everything valuable in modern infrastructure. Collected data was packed into a tpcp.tar.gz archive, encrypted with AES-256-CBC (session key protected by 4096-bit RSA), and exfiltrated in the background via curl.
The shopping list included:
The attack didn't stop at the local machine. The malware had logic to detect Kubernetes environments — if it found a service token, it attempted to read cluster secrets across all namespaces.
To ensure persistence, the malware tried to create privileged pods named node-setup-* in the kube-system namespace using the alpine:latest image. These pods mounted the host filesystem, installing a backdoor at /root/.config/sysmon/sysmon.py. The sysmon name was deliberate — meant to suggest a legitimate system monitoring tool, a classic masquerading technique in Linux environments.
If your K8s cluster had any contact with an infected environment, treat it as compromised.
The attack wasn't limited to code — it was backed by a calculated disinformation campaign.
Data was exfiltrated to models.litellm.cloud. To a tired engineer, this looks like official infrastructure, while the project's legitimate domain is litellm.ai. A subtle but effective distinction.
On GitHub, things were worse. When users opened issue #24512 to alert about the malware, it was suddenly closed as "not planned" by a presumably compromised maintainer account. Moments later, the discussion was flooded by hundreds of bots posting generic comments like "Thanks, that helped!" and "Great explanation!" — a deliberate disinformation operation designed to bury warnings under a pile of digital noise and paralyze incident response.
A textbook example of modern information warfare waged within the Open Source community.
If AI libraries were installed in your environment (local, CI/CD, or production) around March 24, 2026, take these steps:
The litellm incident is a warning signal we cannot ignore. In the age of the AI arms race, supply chain security is becoming our greatest weakness. Traditional architecture built on thousands of dependency "bricks" is a minefield — if just one brick at the foundation is poisoned, the entire structure becomes a weapon aimed at its creator.
Increasingly, a sound architectural strategy is "yoinking" — instead of adding yet another heavy dependency for a single function, it's better to use an LLM to generate clean, local code that does the same thing. We reduce the attack surface and regain control over what our interpreter actually executes.
When was the last time you checked what your next dependency actually installs?
Aleksander

Chief Technology Officer at SecurHub.pl
PhD candidate in neuroscience. Psychologist and IT expert specializing in cybersecurity.
Artificial intelligence was supposed to make our lives easier, but it has also become a powerful tool in the hands of cybercriminals. Discover the behind-the-scenes of a fascinating attack where a hacker used Claude and ChatGPT models to bypass security and steal sensitive Mexican government data.
Artificial intelligence is not just about medicine and productivity. It also involves specialized, malicious LLMs that democratize cybercrime and create perfect scams.
Forget phishing with typos. 2025 has ushered in the era of "agentic AI." We analyze how developer tools like Claude Code have become weapons for APT groups and why "Vibe Hacking" is a term you need to know.
Loading comments...