Malicious code in friendly-tools (PyPI)
The PyPI package 'friendly-tools' masquerades as a utility for greetings but contains obfuscated malicious code designed to steal data from Snowflake environments. When its run_demo() function is executed, it decodes and runs hidden Python code that accesses the installer's Snowflake OAuth session token, uses elevated ACCOUNTADMIN privileges to create an external S3 stage pointing to an attacker-controlled bucket, and copies Snowflake table data to that bucket. This behavior enables unauthorized exfiltration of sensitive Snowflake database data. The package versions 0.1 and 0.2 are affected.
AI Analysis
Technical Summary
The 'friendly-tools' package on PyPI contains two gzip+base64 encoded blobs embedded in main.py, which are decoded and executed via the run_demo() API. The decoded code reads the Snowflake OAuth session token from /snowflake/session/token, connects to Snowflake with ACCOUNTADMIN role, creates an external S3 stage using a hardcoded attacker AWS IAM role, and copies data from Snowflake tables to the attacker's S3 bucket. The obfuscation and hardcoded attacker resources indicate a targeted data theft payload against Snowflake environments, leveraging the installer's credentials and privileges.
Potential Impact
If run_demo() is invoked in a Snowflake or Snowpark environment where the session token is accessible, the attacker's code can exfiltrate sensitive Snowflake database data to an external S3 bucket under the attacker's control. This results in unauthorized data disclosure and potential compromise of sensitive information stored in Snowflake. The attacker leverages the installer's ACCOUNTADMIN privileges, increasing the severity of the impact.
Mitigation Recommendations
No official patch or remediation is indicated in the provided data. Users should avoid installing or running the 'friendly-tools' package versions 0.1 and 0.2. Review and remove any instances of this package from environments with Snowflake credentials. Monitor for unauthorized external stage creation and data egress in Snowflake environments. Patch status is not yet confirmed — check the vendor advisory or PyPI for current remediation guidance.
Malicious code in friendly-tools (PyPI)
Description
The PyPI package 'friendly-tools' masquerades as a utility for greetings but contains obfuscated malicious code designed to steal data from Snowflake environments. When its run_demo() function is executed, it decodes and runs hidden Python code that accesses the installer's Snowflake OAuth session token, uses elevated ACCOUNTADMIN privileges to create an external S3 stage pointing to an attacker-controlled bucket, and copies Snowflake table data to that bucket. This behavior enables unauthorized exfiltration of sensitive Snowflake database data. The package versions 0.1 and 0.2 are affected.
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 'friendly-tools' package on PyPI contains two gzip+base64 encoded blobs embedded in main.py, which are decoded and executed via the run_demo() API. The decoded code reads the Snowflake OAuth session token from /snowflake/session/token, connects to Snowflake with ACCOUNTADMIN role, creates an external S3 stage using a hardcoded attacker AWS IAM role, and copies data from Snowflake tables to the attacker's S3 bucket. The obfuscation and hardcoded attacker resources indicate a targeted data theft payload against Snowflake environments, leveraging the installer's credentials and privileges.
Potential Impact
If run_demo() is invoked in a Snowflake or Snowpark environment where the session token is accessible, the attacker's code can exfiltrate sensitive Snowflake database data to an external S3 bucket under the attacker's control. This results in unauthorized data disclosure and potential compromise of sensitive information stored in Snowflake. The attacker leverages the installer's ACCOUNTADMIN privileges, increasing the severity of the impact.
Mitigation Recommendations
No official patch or remediation is indicated in the provided data. Users should avoid installing or running the 'friendly-tools' package versions 0.1 and 0.2. Review and remove any instances of this package from environments with Snowflake credentials. Monitor for unauthorized external stage creation and data egress in Snowflake environments. Patch status is not yet confirmed — check the vendor advisory or PyPI for current remediation guidance.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-17419
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["PyPI"]
Threat ID: 6abeb3f2a43b0b3b89ed47ba
Added to database: 10/01/2026, 19:26:42 UTC
Last enriched: 10/01/2026, 19:33:22 UTC
Last updated: 10/02/2026, 03:18:02 UTC
Views: 10
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.
External Links
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.