Malicious code in yt-api-dlp (PyPI)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: kam193 (c3b9ca286cef4b241ded9603c192ce5b13e155cad9b017ee3f89b98674065374) During import, this malicious copy of a legitimate package downloads an encrypted data disguise as an image. It contains an archive with a next-stage script that uses the Polygon blockchain (contract 0xC7c9026a3a7e27ec6Ce2D09B19FC1FB4bc978BBb) to get the C2 address. The script then communicates with C2 over an encrypted channel to get further commands and ensures persistence. C2 delivers an executable that is executed by loading it into the memory of another process. During analysis, the encryption key and delivered binary contained test data suggesting the author experiments with building a botnet. The package has been briefly used as dependency of a Github project. --- Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers. Campaign: 2026-07-yt-api-dlp Reasons (based on the campaign): - peristence-autorun - Downloads and executes a remote malicious script. - clones-real-package - persistence - data-from-blockchain - custom-crypto
AI Analysis
Technical Summary
This threat involves a malicious PyPI package named yt-api-dlp, specifically versions 0.1.0 and 0.1.1. The package acts as a trojanized clone of a legitimate package. When imported, it downloads an encrypted archive disguised as an image file. This archive contains a next-stage script that leverages the Polygon blockchain smart contract (0xC7c9026a3a7e27ec6Ce2D09B19FC1FB4bc978BBb) to obtain the C2 server address. The malware establishes an encrypted communication channel with the C2 to receive commands and maintain persistence. The C2 server sends an executable payload that is injected into another process's memory for execution. Test data in the payload suggests the author is developing botnet capabilities. The package was briefly used as a dependency in a GitHub project, increasing exposure risk.
Potential Impact
The malicious package can lead to remote code execution on systems that import it, enabling attackers to establish persistent control. The use of blockchain to retrieve C2 addresses complicates detection and takedown. The delivered payload runs in memory, potentially evading traditional file-based detection. The overall impact includes unauthorized system compromise, potential data theft, and use of infected systems in a botnet.
Mitigation Recommendations
No official patch or fix is available since this is a malicious package impersonating a legitimate one. The best mitigation is to avoid installing or using yt-api-dlp versions 0.1.0 and 0.1.1 from PyPI. Remove any installations of this package immediately. Verify dependencies in projects to ensure no indirect inclusion of this malicious package. Monitor supply chain dependencies carefully to prevent inclusion of trojanized packages.
Malicious code in yt-api-dlp (PyPI)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: kam193 (c3b9ca286cef4b241ded9603c192ce5b13e155cad9b017ee3f89b98674065374) During import, this malicious copy of a legitimate package downloads an encrypted data disguise as an image. It contains an archive with a next-stage script that uses the Polygon blockchain (contract 0xC7c9026a3a7e27ec6Ce2D09B19FC1FB4bc978BBb) to get the C2 address. The script then communicates with C2 over an encrypted channel to get further commands and ensures persistence. C2 delivers an executable that is executed by loading it into the memory of another process. During analysis, the encryption key and delivered binary contained test data suggesting the author experiments with building a botnet. The package has been briefly used as dependency of a Github project. --- Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers. Campaign: 2026-07-yt-api-dlp Reasons (based on the campaign): - peristence-autorun - Downloads and executes a remote malicious script. - clones-real-package - persistence - data-from-blockchain - custom-crypto
Affected software
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
Technical Analysis
This threat involves a malicious PyPI package named yt-api-dlp, specifically versions 0.1.0 and 0.1.1. The package acts as a trojanized clone of a legitimate package. When imported, it downloads an encrypted archive disguised as an image file. This archive contains a next-stage script that leverages the Polygon blockchain smart contract (0xC7c9026a3a7e27ec6Ce2D09B19FC1FB4bc978BBb) to obtain the C2 server address. The malware establishes an encrypted communication channel with the C2 to receive commands and maintain persistence. The C2 server sends an executable payload that is injected into another process's memory for execution. Test data in the payload suggests the author is developing botnet capabilities. The package was briefly used as a dependency in a GitHub project, increasing exposure risk.
Potential Impact
The malicious package can lead to remote code execution on systems that import it, enabling attackers to establish persistent control. The use of blockchain to retrieve C2 addresses complicates detection and takedown. The delivered payload runs in memory, potentially evading traditional file-based detection. The overall impact includes unauthorized system compromise, potential data theft, and use of infected systems in a botnet.
Mitigation Recommendations
No official patch or fix is available since this is a malicious package impersonating a legitimate one. The best mitigation is to avoid installing or using yt-api-dlp versions 0.1.0 and 0.1.1 from PyPI. Remove any installations of this package immediately. Verify dependencies in projects to ensure no indirect inclusion of this malicious package. Monitor supply chain dependencies carefully to prevent inclusion of trojanized packages.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-6754
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["PyPI"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a498a6e27e9c7971936e0f8
Added to database: 07/04/2026, 22:34:22 UTC
Last enriched: 07/04/2026, 22:36:36 UTC
Last updated: 07/30/2026, 04:11:26 UTC
Views: 35
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.