Malicious code in alphalend-layouts (PyPI)
The PyPI package alphalend-layouts (versions 4.0.0, 4.0.1, 4.0.2, and 4.1.0) contains malicious code that exfiltrates sensitive installer-side secrets and private keys related to the Sui blockchain environment. This exfiltration occurs both during package installation and on import, leveraging obfuscated code to evade detection. The stolen data is archived and uploaded to an attacker-controlled GitHub repository using a reconstructed personal access token. The package's stated purpose is unrelated to these malicious activities.
AI Analysis
Technical Summary
The alphalend-layouts package on PyPI includes malicious functionality that harvests sensitive files such as ~/.sui/sui.keystore, Sui configuration YAML files, and environment files containing secrets marked with SUI_, PK_B64, and PRIVATE_KEY. This data is collected during installation and import via custom setup.py commands and top-level import code. The collected files are archived and exfiltrated through an HTTP PUT request to a GitHub repository controlled by the attacker. The GitHub token used for upload is stealthily reconstructed from base64-encoded fragments hidden in fake checksum fields and source constants to evade secret scanning tools. The package abuses Python PTH files to trigger exfiltration on every Python startup, making it persistently malicious. The package's advertised functionality as a BCS layouts library is a cover for this malicious behavior.
Potential Impact
Sensitive cryptographic keys and configuration files related to the Sui blockchain environment are exfiltrated to an attacker-controlled GitHub repository. This compromises the confidentiality of private keys and secrets, potentially enabling unauthorized access or control over blockchain assets or services relying on these keys. The exfiltration occurs silently during installation and import, increasing the risk of unnoticed compromise. The abuse of PTH files causes repeated exfiltration on every Python startup, amplifying the data leak.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately uninstall the alphalend-layouts package versions 4.0.0, 4.0.1, 4.0.2, and 4.1.0 and avoid installing or importing this package. Review and revoke any potentially exposed credentials, especially GitHub tokens and Sui private keys. Monitor for unauthorized access related to these secrets. Check the vendor or PyPI advisories for updates or official fixes. Consider using trusted package sources and verifying package integrity before installation.
Malicious code in alphalend-layouts (PyPI)
Description
The PyPI package alphalend-layouts (versions 4.0.0, 4.0.1, 4.0.2, and 4.1.0) contains malicious code that exfiltrates sensitive installer-side secrets and private keys related to the Sui blockchain environment. This exfiltration occurs both during package installation and on import, leveraging obfuscated code to evade detection. The stolen data is archived and uploaded to an attacker-controlled GitHub repository using a reconstructed personal access token. The package's stated purpose is unrelated to these malicious activities.
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
The alphalend-layouts package on PyPI includes malicious functionality that harvests sensitive files such as ~/.sui/sui.keystore, Sui configuration YAML files, and environment files containing secrets marked with SUI_, PK_B64, and PRIVATE_KEY. This data is collected during installation and import via custom setup.py commands and top-level import code. The collected files are archived and exfiltrated through an HTTP PUT request to a GitHub repository controlled by the attacker. The GitHub token used for upload is stealthily reconstructed from base64-encoded fragments hidden in fake checksum fields and source constants to evade secret scanning tools. The package abuses Python PTH files to trigger exfiltration on every Python startup, making it persistently malicious. The package's advertised functionality as a BCS layouts library is a cover for this malicious behavior.
Potential Impact
Sensitive cryptographic keys and configuration files related to the Sui blockchain environment are exfiltrated to an attacker-controlled GitHub repository. This compromises the confidentiality of private keys and secrets, potentially enabling unauthorized access or control over blockchain assets or services relying on these keys. The exfiltration occurs silently during installation and import, increasing the risk of unnoticed compromise. The abuse of PTH files causes repeated exfiltration on every Python startup, amplifying the data leak.
Defensive Guidance
No official patch or remediation is currently documented. Users should immediately uninstall the alphalend-layouts package versions 4.0.0, 4.0.1, 4.0.2, and 4.1.0 and avoid installing or importing this package. Review and revoke any potentially exposed credentials, especially GitHub tokens and Sui private keys. Monitor for unauthorized access related to these secrets. Check the vendor or PyPI advisories for updates or official fixes. Consider using trusted package sources and verifying package integrity before installation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-13473
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["PyPI"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a7573b5bf8831d539d93ad4
Added to database: 08/07/2026, 05:57:09 UTC
Last enriched: 08/07/2026, 07:42:53 UTC
Last updated: 08/07/2026, 21:26:40 UTC
Views: 4
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.