Supply-chain threat intelligence

Incident detail

criticalpypi·typosquatting·osv

Malicious code in twrap-tool (PyPI)

twrap-tool

Risk score

92

AI summary

Indexed incident for twrap-tool (pypi).

Description

twrap_tool/init.py defines two public functions, format_block and align_columns, whose real behavior is to fetch a Python file from raw.githubusercontent.com/TextStack-Devs/twrap-toolkit at v1.0.0 via urllib.request.urlopen, read the response body, and pass it directly to exec() in the caller's Python process. The advertised text-wrapping logic is a decoy (format_block only returns text[:width]). The fetch target is a mutable tag reference with no hash or signature verification, so the served payload can be changed by the repository owner at any time after publish. Any consumer that calls the library runs arbitrary attacker-controlled Python with the caller's privileges. The package name and generic 'advanced text wrapping' description are consistent with a typosquat of Python's stdlib textwrap.

Package is a copy of a previous malicious package, but the remote code URL was not yet active during the analysis.


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

Campaign: 2026-06-textwrap-toolkit-stager

Reasons (based on the campaign):

  • backdoor

  • obfuscation

  • crypto-related

  • Downloads and executes a remote malicious script.

  • exfiltration-crypto

Technical details

Affected versions

=1.0.0

Indicators

  • affected version=1.0.075%

Timeline

  1. Advisory published
  2. Indexed by ThreatPkg

Related incidents