Malicious code in portal-backend (npm)
Description
The npm package named 'portal-backend' version 999.0.0 contains malicious code that executes during installation. Its preinstall hook runs a script that collects environment variables matching credential-related patterns and system information, then sends this data to an attacker-controlled server. This package is designed for dependency confusion attacks, masquerading as a legitimate internal package to trick developers or CI systems into installing it and leaking sensitive secrets.
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
This threat involves a malicious npm package 'portal-backend' at version 999.0.0. During 'npm install', the package's preinstall hook executes 'postinstall.js', which enumerates environment variables filtering keys with credential-related keywords (e.g., key, secret, token, pass, ssh, deploy, auth, api). It collects these values along with system details such as hostname, username, current working directory, and npm registry configuration. The collected data is sent via HTTPS POST to a suspicious IP address (185.130.46.35:8443) unrelated to any legitimate publisher domain. The package's code is minimal and designed to outrank private registry versions to induce dependency confusion, causing sensitive CI and developer environment secrets to be exfiltrated upon installation.
Potential Impact
Installing this malicious package results in immediate exfiltration of sensitive environment variables including CI secrets, deploy tokens, SSH credentials, and host identity information to an attacker-controlled server. This compromises the confidentiality of critical credentials and can lead to further unauthorized access or compromise of development and deployment infrastructure.
Mitigation Recommendations
No official patch or remediation is available for this malicious package. The best mitigation is to avoid installing the 'portal-backend' package version 999.0.0 from public npm registries. Organizations should audit their dependency sources to prevent dependency confusion attacks by properly configuring private registries and using package allowlists or integrity verification. Monitor for unexpected packages with suspicious versioning and verify package provenance before installation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-5781
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-6j4w-8j7h-8c6c"]
- Ecosystems
- ["npm"]
Threat ID: 6a96f318acd9273b49e49500
Added to database: 09/01/2026, 15:45:28 UTC
Last enriched: 09/08/2026, 12:09:18 UTC
Last updated: 10/01/2026, 22:41:43 UTC
Views: 26
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.