Malicious code in mutex-core (npm)
Description
The npm package mutex-core version 2.1.2 contains malicious code disguised as legitimate mutex functionality. It includes a staged loader that decrypts and executes an opaque payload when triggered by a specific jobId hash. The malicious payload is AES-256-GCM encrypted and dropped to disk before execution, making its behavior opaque to users. This backdoor functionality is hidden in obfuscated code and is not part of the legitimate package features.
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 mutex-core npm package (version 2.1.2) masquerades as a legitimate async-mutex library but contains a malicious staged loader. The runExclusive method checks if a callback's meta.jobId matches a hardcoded SHA-256 hash. If matched, it decrypts an encrypted payload file (lib/withMutex.min.js) using AES-256-GCM with a key derived from jobId via scryptSync, writes the decrypted code to disk, and executes it detached from the main process. The decryption and execution code is obfuscated and unrelated to the legitimate mutex functionality, indicating deliberate malicious intent. The actual payload remains opaque without the trigger key, preventing inspection of the executed code.
Potential Impact
This malicious package can execute arbitrary code on the host system when triggered by a specific jobId, potentially leading to unauthorized code execution and compromise. Because the payload is encrypted and only decrypted at runtime, its full impact is unknown but could include any malicious activity. The presence of such a backdoor in a dependency poses a significant supply chain risk to projects using this package.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately remove and replace mutex-core version 2.1.2 from their dependencies. Avoid using this package until a trusted, clean version is available. Monitor for any unusual activity related to this package and audit your supply chain dependencies for similar malicious code. Patch status is not yet confirmed — check the vendor advisory or trusted sources for updates.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-14280
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6a85b4b4acd9273b49251559
Added to database: 08/19/2026, 13:50:44 UTC
Last enriched: 08/19/2026, 14:17:04 UTC
Last updated: 10/02/2026, 13:51:49 UTC
Views: 27
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.