MAL-2026-6578: Malicious code in layerd-unit-codec-parser (npm)
The npm package 'layerd-unit-codec-parser' version 1.0.0 is a malicious package impersonating a legitimate package by using a similar name and re-exporting the real package's API. It contains an obfuscated payload encrypted with AES-GCM, but the ciphertext, passphrase, and salt are all shipped together, allowing the package to decrypt and execute arbitrary JavaScript code with full access to the require function. This behavior effectively enables remote code execution in the environment where the package is installed and run.
AI Analysis
Technical Summary
The 'layerd-unit-codec-parser' npm package (version 1.0.0) masquerades as 'postcss-minify-selector-parser', mimicking the legitimate 'postcss-selector-parser'. It re-exports the real package's API to appear benign. However, it includes a large AES-GCM encrypted payload along with the decryption key and salt, which it decrypts and executes dynamically using 'new Function'. This obfuscation conceals arbitrary JavaScript code execution with access to the require function, enabling potentially malicious actions in the consumer's environment. The malicious code execution is triggered via commands like 'npm start', 'npm run decode', 'node cjs-runner.js', or by invoking the exported run functions.
Potential Impact
This package enables arbitrary code execution in the environment where it is installed and run, potentially allowing attackers to execute any code with the privileges of the user running the package. This can lead to compromise of the system, data theft, or further malicious activity. The obfuscation via AES encryption does not prevent analysis since the key and salt are included, making the payload easily decrypted and executed.
Mitigation Recommendations
No official patch or remediation is currently available. Users should avoid installing or running the 'layerd-unit-codec-parser' package, especially version 1.0.0. Verify package authenticity before use and prefer official, well-known packages. Remove any installations of this package from your environment. Monitor for any unexpected executions of this package's code and audit systems for potential compromise if it was previously installed.
MAL-2026-6578: Malicious code in layerd-unit-codec-parser (npm)
Description
The npm package 'layerd-unit-codec-parser' version 1.0.0 is a malicious package impersonating a legitimate package by using a similar name and re-exporting the real package's API. It contains an obfuscated payload encrypted with AES-GCM, but the ciphertext, passphrase, and salt are all shipped together, allowing the package to decrypt and execute arbitrary JavaScript code with full access to the require function. This behavior effectively enables remote code execution in the environment where the package is installed and run.
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 'layerd-unit-codec-parser' npm package (version 1.0.0) masquerades as 'postcss-minify-selector-parser', mimicking the legitimate 'postcss-selector-parser'. It re-exports the real package's API to appear benign. However, it includes a large AES-GCM encrypted payload along with the decryption key and salt, which it decrypts and executes dynamically using 'new Function'. This obfuscation conceals arbitrary JavaScript code execution with access to the require function, enabling potentially malicious actions in the consumer's environment. The malicious code execution is triggered via commands like 'npm start', 'npm run decode', 'node cjs-runner.js', or by invoking the exported run functions.
Potential Impact
This package enables arbitrary code execution in the environment where it is installed and run, potentially allowing attackers to execute any code with the privileges of the user running the package. This can lead to compromise of the system, data theft, or further malicious activity. The obfuscation via AES encryption does not prevent analysis since the key and salt are included, making the payload easily decrypted and executed.
Mitigation Recommendations
No official patch or remediation is currently available. Users should avoid installing or running the 'layerd-unit-codec-parser' package, especially version 1.0.0. Verify package authenticity before use and prefer official, well-known packages. Remove any installations of this package from your environment. Monitor for any unexpected executions of this package's code and audit systems for potential compromise if it was previously installed.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-6578
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a42ed6d27e9c79719938ebf
Added to database: 06/29/2026, 22:10:53 UTC
Last enriched: 06/29/2026, 22:37:04 UTC
Last updated: 06/30/2026, 00:38:56 UTC
Views: 2
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.