Skip to main content

Malicious code in img-to-native (npm)

0
Critical
Published: 09/28/2026 (09/28/2026, 16:07:38 UTC)
Source: GCVE Database
Product: img-to-native

Description

The npm package img-to-native contains malicious code that decrypts and writes a Windows executable to the local filesystem with execute permissions. This executable is hidden as an encrypted payload appended to an image file in a dependency, and the package installs attacker-controlled code without verification. Installing or loading this package can lead to full system compromise. The package versions 1.0.0, 1.0.1, 1.0.2, and 1.0.3 are affected.

Affected software

npmghsa
img-to-native
Affected versions
=1.0.0=1.0.1=1.0.3=1.0.2

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: 09/29/2026, 04:46:54 UTC

Technical Analysis

The img-to-native npm package, when required, reads a PNG image from its dependency cdn-img-fetch and extracts a hidden payload appended after the PNG IEND marker. This payload is base64-decoded and AES-256-CBC decrypted using a key derived from sha256('nif-runtime-2027'). The decrypted payload is then written as an executable file (%LOCALAPPDATA%\Programs\NodeRuntime\node_runtime_helper.exe) with execute permissions. The source image is deleted afterward. The package does not verify the payload's integrity or authenticity, allowing attacker-controlled code to be silently installed and executed. The dependency cdn-img-fetch is specified with a caret range (^1.0.0), permitting future versions to alter the payload. The advertised functionality does not require such behavior, indicating malicious intent. This results in full system compromise upon installation or loading of the package.

Potential Impact

Installing or loading the img-to-native package results in attacker-controlled executable code being written and potentially executed on the victim's system. This leads to full system compromise, including potential unauthorized access to secrets and keys stored on the computer. The malicious payload is installed without verification, and the package's dependency versioning allows future payload changes without user consent.

Mitigation Recommendations

No official patch or fix is indicated. The package should be removed immediately from any affected systems. Due to the high risk of full system compromise, all secrets and keys stored on the affected computer should be rotated from a different, trusted machine. Users should avoid installing or using this package and its dependency cdn-img-fetch. Monitor for any suspicious executables in the indicated path and consider full system remediation.

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-17216
Osv Schema Version
1.7.4
Aliases
["GHSA-pv7p-ghgv-268x"]
Ecosystems
["npm"]

Threat ID: 6abb4186f7a7c54106cc2f74

Added to database: 09/29/2026, 04:41:42 UTC

Last enriched: 09/29/2026, 04:46:54 UTC

Last updated: 09/29/2026, 10:20:17 UTC

Views: 3

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