Skip to main content

Malicious code in 0requests (PyPI)

0
High
Published: 09/03/2026 (09/03/2026, 17:00:47 UTC)
Source: GCVE Database
Product: 0requests

Description

The PyPI package '0requests' is a typosquatting variant of the popular 'requests' package that contains malicious code. Upon import, it collects environment variables with names suggesting sensitive credentials and exfiltrates them to a host and port specified by environment variables. It also spawns a subprocess providing a remote shell to the attacker. Analysis indicates the exfiltration target was localhost, suggesting a test or low-harm scenario.

Affected software

PyPIghsa
0requests
Affected versions
=0.0.1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/07/2026, 16:08:23 UTC

Technical Analysis

The '0requests' package is a malicious typosquatting package targeting users who mistakenly install it instead of the legitimate 'requests' package. Its __init__.py script enumerates environment variables starting with SECRET, API, TOKEN, or KEY, serializes them, and sends them via a TCP socket to a host and port defined by TS_HOST and TS_PORT environment variables. Additionally, it spawns a subprocess that connects to the same host and port, sends a 'SHELL' marker, and maintains an open socket to provide a remote-controlled shell. Console logs confirm its intent to exfiltrate data and provide remote access. The exfiltration target in analyzed versions was localhost, indicating possible testing rather than active malicious use.

Potential Impact

If installed and imported, this package can leak sensitive environment variables containing credentials to an attacker-controlled host and provide a remote shell on the host system. This can lead to credential theft and unauthorized remote code execution. However, the known analyzed versions targeted localhost, which limits the immediate risk but does not eliminate the potential for harm if configured differently.

Mitigation Recommendations

Users should avoid installing packages with names similar to popular packages to prevent typosquatting attacks. Remove the '0requests' package if installed. Since no official patch or fix exists, rely on careful package name verification and use trusted package sources. Monitor environment variables and restrict sensitive data exposure in environment variables where possible.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-15859
Osv Schema Version
1.7.4
Ecosystems
["PyPI"]

Threat ID: 6a9ad4f4acd9273b49b679a0

Added to database: 09/04/2026, 14:25:56 UTC

Last enriched: 09/07/2026, 16:08:23 UTC

Last updated: 10/04/2026, 05:40:47 UTC

Views: 26

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses