Malicious code in prettier_v1 (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (1ae1d77d25db3af85295c48a446f6c0f2f65252ea2483c45ce81df12c75b1fcb) Package name 'prettier_v1' closely resembles the widely-used 'prettier' formatter package, a classic typosquat naming pattern. The file lib/mirror.js contains a Buffer.from(..., 'base64').toString('utf8') decode primitive at line 16, which is commonly used to obscure embedded payloads. Tracing of the decoded content and its downstream use (whether it is passed to eval/exec, written to disk, or executed) was not completed, so the actual installer-side impact has not been confirmed. The combination of a typosquat-shaped name plus a base64 decode in a file named 'mirror.js' warrants human review before this package is allowed into installer environments. ## Source: ghsa-malware (ea8303f0cea5f415b8a0ba74e959d0501fcb3142ee9320fa50668674c578e4bb) 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 'prettier_v1' package on npm, specifically version 3.8.5, is a malicious typosquatting package designed to resemble the legitimate 'prettier' formatter. It includes obfuscated code that decodes base64-encoded content in 'lib/mirror.js', a common technique to hide malicious payloads. Although the exact execution path of the decoded payload is not fully traced, the presence of this code combined with the typosquatting pattern indicates a high likelihood of malicious intent. According to the GHSA advisory, any system with this package installed should be considered fully compromised, requiring immediate secret and key rotation and package removal. There is no known patch or fix since this is a malicious package rather than a vulnerability in legitimate software.
Potential Impact
Systems with 'prettier_v1' version 3.8.5 installed are at risk of full compromise. Attackers may have obtained complete control over the affected system, potentially accessing all stored secrets and keys. Removal of the package alone may not eliminate all malicious components, as the attacker could have installed additional backdoors or malware.
Mitigation Recommendations
Remove the 'prettier_v1' package version 3.8.5 immediately from all affected systems. Rotate all secrets, keys, and credentials from a separate, uncompromised system to prevent further unauthorized access. Conduct a thorough security assessment of the affected systems to identify and remediate any additional malicious artifacts. Since this is a malicious package, no official patch or fix exists; prevention relies on avoiding installation of typosquatting packages and using trusted sources.
Malicious code in prettier_v1 (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (1ae1d77d25db3af85295c48a446f6c0f2f65252ea2483c45ce81df12c75b1fcb) Package name 'prettier_v1' closely resembles the widely-used 'prettier' formatter package, a classic typosquat naming pattern. The file lib/mirror.js contains a Buffer.from(..., 'base64').toString('utf8') decode primitive at line 16, which is commonly used to obscure embedded payloads. Tracing of the decoded content and its downstream use (whether it is passed to eval/exec, written to disk, or executed) was not completed, so the actual installer-side impact has not been confirmed. The combination of a typosquat-shaped name plus a base64 decode in a file named 'mirror.js' warrants human review before this package is allowed into installer environments. ## Source: ghsa-malware (ea8303f0cea5f415b8a0ba74e959d0501fcb3142ee9320fa50668674c578e4bb) 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 'prettier_v1' package on npm, specifically version 3.8.5, is a malicious typosquatting package designed to resemble the legitimate 'prettier' formatter. It includes obfuscated code that decodes base64-encoded content in 'lib/mirror.js', a common technique to hide malicious payloads. Although the exact execution path of the decoded payload is not fully traced, the presence of this code combined with the typosquatting pattern indicates a high likelihood of malicious intent. According to the GHSA advisory, any system with this package installed should be considered fully compromised, requiring immediate secret and key rotation and package removal. There is no known patch or fix since this is a malicious package rather than a vulnerability in legitimate software.
Potential Impact
Systems with 'prettier_v1' version 3.8.5 installed are at risk of full compromise. Attackers may have obtained complete control over the affected system, potentially accessing all stored secrets and keys. Removal of the package alone may not eliminate all malicious components, as the attacker could have installed additional backdoors or malware.
Mitigation Recommendations
Remove the 'prettier_v1' package version 3.8.5 immediately from all affected systems. Rotate all secrets, keys, and credentials from a separate, uncompromised system to prevent further unauthorized access. Conduct a thorough security assessment of the affected systems to identify and remediate any additional malicious artifacts. Since this is a malicious package, no official patch or fix exists; prevention relies on avoiding installation of typosquatting packages and using trusted sources.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-5845
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-q835-5j9v-22qg"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a4f6c3d68715ace431589c1
Added to database: 07/09/2026, 09:39:09 UTC
Last enriched: 07/09/2026, 09:53:44 UTC
Last updated: 07/25/2026, 09:26:17 UTC
Views: 46
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.