# MAL-2026-15861: Malicious code in py-1requests (PyPI)


- **Type:** Malicious package
- **Package:** `py-1requests` (PyPI)
- **Published:** 3 Sep 2026

## What is MAL-2026-15861?

MAL-2026-15861 is a malicious package in py-1requests, published on 3 Sep 2026. 

### Official description

py_1requests is a typosquat of the popular `requests` library (leading `1` inserted inside the name). On import, py_1requests/__init__.py iterates os.environ and collects every variable whose name starts with SECRET, API, TOKEN, or KEY, then opens a TCP socket to HOST:PORT and sends the serialized dict; HOST and PORT default to 127.0.0.1:9999 but are overridable via the TS_HOST and TS_PORT environment variables. The same __init__.py spawns a python subprocess that connects to the same host/port and sends a 'SHELL' marker, holding the connection open — a reverse-shell staging path. cli.py prints 'py_1requests installed -- targeting requests' and __init__.py prints '[typosquat] exfiltrating:...', in-source admissions of purpose. Both behaviors fire unconditionally on import with no documented purpose.

During import, the code exfiltrates potentially sensitive env variables. In all analyzed versions the exfiltration target was a localhost, suggesting it was just a test.

---

Category: PROBABLY_PENTEST - Packages looking like typical pentest packages, but also anything that looks like testing, exploring pre-prepared kits, research & co, with clearly low-harm possibilities.

Campaign: 2026-09-0requests

Reasons (based on the campaign):

 - exfiltration-env-variables

 - typosquatting

## What should I do about MAL-2026-15861?

Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.

## Fix prompt for AI coding agents

```text
MAL-2026-15861 is a malicious package: py-1requests (PyPI). Every version was published to cause harm.

Task:
1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.
2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.
3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.
4. If the package is not used anywhere, say so and change nothing.

Reference: https://insights.sbomify.com/MAL-2026-15861/ (Markdown: https://insights.sbomify.com/MAL-2026-15861/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/MAL-2026-15861

---
From sbomify Insights: https://insights.sbomify.com/MAL-2026-15861/
Summaries are generated and may contain mistakes; the official description above is the record.
