Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

MAL-2026-6711: Malicious code in twrap-tool (PyPI)

0
Critical
Published: 07/01/2026 (07/01/2026, 20:05:39 UTC)
Source: GCVE Database
Product: twrap-tool

Description

The twrap-tool PyPI package version 1.0.0 contains malicious code that fetches and executes arbitrary Python code from a remote repository without verification. The package masquerades as a text-wrapping utility but actually runs attacker-controlled code with the privileges of the caller. This behavior allows remote code execution and potential data exfiltration. The malicious payload is fetched from a mutable tag reference, enabling the attacker to change the executed code at any time after the package is installed. No official patch or fix is currently documented.

Affected software

PyPIghsa
twrap-tool
Affected versions
=1.0.0

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: 07/02/2026, 23:35:19 UTC

Technical Analysis

The twrap-tool package on PyPI (version 1.0.0) defines functions that appear to perform text wrapping but instead download a Python script from raw.githubusercontent.com/TextStack-Devs/twrap-toolkit at tag v1.0.0 and execute it directly via exec() in the caller's process. This remote code execution occurs without any integrity checks such as hash or signature verification, allowing the repository owner to modify the payload post-publication. The package is identified as malicious, consistent with a typosquat of the standard library textwrap module, and is part of a campaign involving backdoors, obfuscation, crypto-related activity, and exfiltration.

Potential Impact

Any user or system that installs and runs twrap-tool version 1.0.0 and calls its public functions will execute attacker-controlled Python code with the same privileges as the user. This can lead to arbitrary code execution, backdoor installation, data exfiltration, and compromise of the host environment. The lack of code integrity verification increases the risk, as the payload can be changed at any time by the attacker.

Mitigation Recommendations

No official patch or remediation is currently available for twrap-tool version 1.0.0. Users should immediately uninstall this package if installed and avoid using it. Since this is a malicious package on PyPI, rely on trusted sources and verify package authenticity before installation. Monitor for updates from PyPI or security advisories for any future remediation guidance.

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-6711
Osv Schema Version
1.7.4
Aliases
[]
Ecosystems
["PyPI"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a46ed1527e9c7971944709b

Added to database: 07/02/2026, 22:58:29 UTC

Last enriched: 07/02/2026, 23:35:19 UTC

Last updated: 07/03/2026, 03:27:00 UTC

Views: 7

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