Malicious code in @torbeck/priority-queue (npm)
The npm package @torbeck/priority-queue is a malicious repackaging of the legitimate @datastructures-js/priority-queue package. It uses namespace abuse by substituting the legitimate dependency @datastructures-js/heap with a similarly named but untrusted package @torbeck/heap. This substitution happens silently via npm alias syntax, causing consumers to unknowingly install and execute potentially malicious code from @torbeck/heap. The actual malicious payload, if any, resides in the @torbeck/heap package and requires separate analysis. The affected versions of @torbeck/priority-queue are 6.3.6, 6.3.7, and 6.3.9.
AI Analysis
Technical Summary
The @torbeck/priority-queue npm package republishes the legitimate @datastructures-js/priority-queue package under a different scope but modifies its package.json to alias the legitimate dependency @datastructures-js/heap to @torbeck/[email protected]. This aliasing causes the untrusted @torbeck/heap package to be installed and loaded in place of the legitimate heap package, enabling namespace abuse. The malicious behavior stems from this substitution mechanism rather than the priority-queue package itself. The actual malicious code, if present, is contained in the @torbeck/heap package, which must be analyzed separately. This threat affects specific versions of @torbeck/priority-queue and does not have a known CVSS score or documented exploits in the wild.
Potential Impact
Consumers installing @torbeck/priority-queue versions 6.3.6, 6.3.7, or 6.3.9 will unknowingly install the @torbeck/heap package under the guise of the legitimate @datastructures-js/heap dependency. This can lead to execution of untrusted code from @torbeck/heap, potentially compromising the security of the environment where the package is used. The direct impact depends on the payload within @torbeck/heap, which is not detailed here.
Mitigation Recommendations
No official patch or fix is indicated for @torbeck/priority-queue. Users should avoid installing or using the @torbeck/priority-queue package, especially versions 6.3.6, 6.3.7, and 6.3.9. Instead, use the legitimate @datastructures-js/priority-queue package from trusted sources. Review dependencies carefully to detect and prevent namespace abuse via npm aliasing. Monitor for updates or advisories regarding the @torbeck/heap package for further remediation guidance.
Malicious code in @torbeck/priority-queue (npm)
Description
The npm package @torbeck/priority-queue is a malicious repackaging of the legitimate @datastructures-js/priority-queue package. It uses namespace abuse by substituting the legitimate dependency @datastructures-js/heap with a similarly named but untrusted package @torbeck/heap. This substitution happens silently via npm alias syntax, causing consumers to unknowingly install and execute potentially malicious code from @torbeck/heap. The actual malicious payload, if any, resides in the @torbeck/heap package and requires separate analysis. The affected versions of @torbeck/priority-queue are 6.3.6, 6.3.7, and 6.3.9.
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 @torbeck/priority-queue npm package republishes the legitimate @datastructures-js/priority-queue package under a different scope but modifies its package.json to alias the legitimate dependency @datastructures-js/heap to @torbeck/[email protected]. This aliasing causes the untrusted @torbeck/heap package to be installed and loaded in place of the legitimate heap package, enabling namespace abuse. The malicious behavior stems from this substitution mechanism rather than the priority-queue package itself. The actual malicious code, if present, is contained in the @torbeck/heap package, which must be analyzed separately. This threat affects specific versions of @torbeck/priority-queue and does not have a known CVSS score or documented exploits in the wild.
Potential Impact
Consumers installing @torbeck/priority-queue versions 6.3.6, 6.3.7, or 6.3.9 will unknowingly install the @torbeck/heap package under the guise of the legitimate @datastructures-js/heap dependency. This can lead to execution of untrusted code from @torbeck/heap, potentially compromising the security of the environment where the package is used. The direct impact depends on the payload within @torbeck/heap, which is not detailed here.
Mitigation Recommendations
No official patch or fix is indicated for @torbeck/priority-queue. Users should avoid installing or using the @torbeck/priority-queue package, especially versions 6.3.6, 6.3.7, and 6.3.9. Instead, use the legitimate @datastructures-js/priority-queue package from trusted sources. Review dependencies carefully to detect and prevent namespace abuse via npm aliasing. Monitor for updates or advisories regarding the @torbeck/heap package for further remediation guidance.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10472
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a55ffa268715ace432f734d
Added to database: 07/14/2026, 09:21:38 UTC
Last enriched: 07/14/2026, 09:54:22 UTC
Last updated: 07/26/2026, 05:15:46 UTC
Views: 18
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.