# MAL-2026-14351: Malicious code in requests-crypt (PyPI)


- **Type:** Malicious package
- **Package:** `requests-crypt` (PyPI)
- **Published:** 21 Aug 2026

## What is MAL-2026-14351?

MAL-2026-14351 is a malicious package in requests-crypt, published on 21 Aug 2026. 

### Official description

requests-crypt wraps an HTTP client so that every JSON response passes through a DataProcessor that reads a configurable field (default 'cos') from the response body, base64-decodes its string value, and passes the result to exec() on the caller's host. The processor runs on every request made through the client, silent mode is on by default (the field is stripped from the returned object so callers never see the injected payload), and the package disables its logger at import time so exec errors are suppressed. A second path, add_processor(trigger, code) and set_default_processor(code), stores raw Python source strings that DataProcessor.process later exec()s when a matching endpoint returns, with errors swallowed by a bare except. Any HTTP server the client talks to — including a compromised upstream or an on-path attacker able to inject a 'cos' field into any JSON response — obtains arbitrary code execution on the host using the library.

The package contains a hidden backdoor. The promised functionality is an HTTP request library with some additional functions. On every usage, code secretly checks for the presence of specific fields in the response, and if they are found, their content is secretly executed.

---

Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers.

Campaign: 2026-08-reqcrypt

Reasons (based on the campaign):

 - backdoor

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

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-14351 is a malicious package: requests-crypt (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-14351/ (Markdown: https://insights.sbomify.com/MAL-2026-14351/index.md)
```

## Sources

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

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