Malicious code in mailconfirmer (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (dfb184ffa15fd011b84658a6b5cd68582e78827258a8373f0da1ef34248bfb09) The package advertises itself as an email-confirmation utility, but index.js contains only no-op stubs that console.log demo messages. The real behavior is in scripts.postinstall, which runs install-hook.js. That script holds a 280KB+ base64 string, XOR-decodes it with key 0x42, writes the resulting Windows PE to %TEMP%\tmp_<timestamp>.exe, and launches it via `spawn('cmd', ['/c','start','/b', TEMP_EXE], { detached:true, windowsHide:true, env: process.env })` — detached, hidden window, with the installer's full environment passed in. The dropped binary is opaque, unsigned, and not justified by the package's stated purpose. Immediately after launching the binary, install-hook.js writes a cleanup_<ts>.js to %TEMP% and spawns it detached. The cleanup script waits ~90 seconds, then deletes `mailconfirmer` from the host project's package.json and package-lock.json (with a `findstr /v` fallback), recursively removes the module's own folder under node_modules via `cmd /c rmdir /s /q`, and registers a `schtasks /create` fallback to retry the deletion. This self-erasing behavior is anti-forensics intended to hide the dropper after detonation, tampering with the installer's project manifests in the process. Installer impact on Windows hosts: arbitrary attacker-controlled native code executes on `npm install` with the user's full environment, and traces of the offending package are scrubbed from the project tree. ## Source: ghsa-malware (9ee8735a788175ac76593cc58d41a253a19b86d2fdb8cc38cb3517ed6963219d) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
AI Analysis
Technical Summary
The mailconfirmer npm package, advertised as an email confirmation utility, contains no-op stubs in its main code but executes malicious behavior in its postinstall script. This script decodes a large base64-encoded payload, XOR-decodes it, writes a Windows PE executable to the temporary directory, and launches it in a hidden, detached process with the installer's full environment. After execution, a cleanup script is spawned that waits approximately 90 seconds before removing the mailconfirmer package from package.json, package-lock.json, and the node_modules folder, using fallback scheduled tasks to ensure deletion. This self-erasing behavior is designed to hide the malicious dropper and tamper with project manifests. The impact on Windows hosts is arbitrary attacker-controlled native code execution during npm install, with subsequent anti-forensic cleanup.
Potential Impact
Installation of the mailconfirmer package on Windows systems results in arbitrary native code execution with the user's full environment privileges. The malicious payload is a hidden, unsigned Windows executable dropped and launched during installation. The package then attempts to remove all traces of itself from the project files and node_modules directory, making detection and forensic analysis difficult. Any system with this package installed or running should be considered fully compromised, and all secrets and keys stored on that system should be rotated immediately from a separate, trusted machine.
Mitigation Recommendations
No official patch or fix is currently available for this malicious package. The recommended mitigation is to immediately remove the mailconfirmer package from all projects and systems. Due to the nature of the compromise, assume full system compromise and rotate all secrets and credentials that may have been exposed. Conduct a thorough incident response and forensic investigation to identify and remediate any additional malware or persistence mechanisms. Monitor for any scheduled tasks or processes related to the cleanup fallback mechanism described. Avoid reinstalling or using this package.
Malicious code in mailconfirmer (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (dfb184ffa15fd011b84658a6b5cd68582e78827258a8373f0da1ef34248bfb09) The package advertises itself as an email-confirmation utility, but index.js contains only no-op stubs that console.log demo messages. The real behavior is in scripts.postinstall, which runs install-hook.js. That script holds a 280KB+ base64 string, XOR-decodes it with key 0x42, writes the resulting Windows PE to %TEMP%\tmp_<timestamp>.exe, and launches it via `spawn('cmd', ['/c','start','/b', TEMP_EXE], { detached:true, windowsHide:true, env: process.env })` — detached, hidden window, with the installer's full environment passed in. The dropped binary is opaque, unsigned, and not justified by the package's stated purpose. Immediately after launching the binary, install-hook.js writes a cleanup_<ts>.js to %TEMP% and spawns it detached. The cleanup script waits ~90 seconds, then deletes `mailconfirmer` from the host project's package.json and package-lock.json (with a `findstr /v` fallback), recursively removes the module's own folder under node_modules via `cmd /c rmdir /s /q`, and registers a `schtasks /create` fallback to retry the deletion. This self-erasing behavior is anti-forensics intended to hide the dropper after detonation, tampering with the installer's project manifests in the process. Installer impact on Windows hosts: arbitrary attacker-controlled native code executes on `npm install` with the user's full environment, and traces of the offending package are scrubbed from the project tree. ## Source: ghsa-malware (9ee8735a788175ac76593cc58d41a253a19b86d2fdb8cc38cb3517ed6963219d) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
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 mailconfirmer npm package, advertised as an email confirmation utility, contains no-op stubs in its main code but executes malicious behavior in its postinstall script. This script decodes a large base64-encoded payload, XOR-decodes it, writes a Windows PE executable to the temporary directory, and launches it in a hidden, detached process with the installer's full environment. After execution, a cleanup script is spawned that waits approximately 90 seconds before removing the mailconfirmer package from package.json, package-lock.json, and the node_modules folder, using fallback scheduled tasks to ensure deletion. This self-erasing behavior is designed to hide the malicious dropper and tamper with project manifests. The impact on Windows hosts is arbitrary attacker-controlled native code execution during npm install, with subsequent anti-forensic cleanup.
Potential Impact
Installation of the mailconfirmer package on Windows systems results in arbitrary native code execution with the user's full environment privileges. The malicious payload is a hidden, unsigned Windows executable dropped and launched during installation. The package then attempts to remove all traces of itself from the project files and node_modules directory, making detection and forensic analysis difficult. Any system with this package installed or running should be considered fully compromised, and all secrets and keys stored on that system should be rotated immediately from a separate, trusted machine.
Mitigation Recommendations
No official patch or fix is currently available for this malicious package. The recommended mitigation is to immediately remove the mailconfirmer package from all projects and systems. Due to the nature of the compromise, assume full system compromise and rotate all secrets and credentials that may have been exposed. Conduct a thorough incident response and forensic investigation to identify and remediate any additional malware or persistence mechanisms. Monitor for any scheduled tasks or processes related to the cleanup fallback mechanism described. Avoid reinstalling or using this package.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-5750
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-4rw6-v77j-67gx"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a4f6c3d68715ace431589f2
Added to database: 07/09/2026, 09:39:09 UTC
Last enriched: 07/09/2026, 09:54:20 UTC
Last updated: 07/30/2026, 15:03:57 UTC
Views: 38
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.