Malicious code in oauth-connect (npm)
The npm package 'oauth-connect' versions 0.1.1 and 2.0.1 contain malicious code that executes automatically during installation. This code collects sensitive system information including hostname, user info, home directory, DNS configuration, and contents of /etc/passwd and /etc/hosts, as well as the consumer's package.json. The collected data is exfiltrated via HTTPS POST to an attacker-controlled domain. The package's stated function as an OAuth helper is unrelated to this behavior, indicating a dependency confusion or supply chain attack vector.
AI Analysis
Technical Summary
The 'oauth-connect' npm package versions 0.1.1 and 2.0.1 include a preinstall script that runs 'node index.js' on installation. This script gathers installer-side system data such as os.hostname(), os.userInfo(), home directory, DNS server settings, and sensitive files like /etc/passwd and /etc/hosts, along with the consumer's package.json contents. It then sends this information to a malicious external server controlled by an attacker. This behavior is unrelated to the package's advertised OAuth helper functionality and represents a reconnaissance and data exfiltration payload triggered automatically during npm install.
Potential Impact
This malicious code compromises the confidentiality of the installer's environment by exfiltrating sensitive system and configuration data to an attacker-controlled server. This can lead to reconnaissance on the victim system, potential further exploitation, and exposure of sensitive user and system information. The attack occurs silently during package installation without user consent or awareness.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing the affected versions (=0.1.1 and =2.0.1) of the 'oauth-connect' package. Verify package integrity and source before installation. Consider using package integrity verification tools and monitoring for suspicious preinstall scripts in dependencies. Patch status is not yet confirmed — check the vendor advisory or npm security advisories for updates.
Malicious code in oauth-connect (npm)
Description
The npm package 'oauth-connect' versions 0.1.1 and 2.0.1 contain malicious code that executes automatically during installation. This code collects sensitive system information including hostname, user info, home directory, DNS configuration, and contents of /etc/passwd and /etc/hosts, as well as the consumer's package.json. The collected data is exfiltrated via HTTPS POST to an attacker-controlled domain. The package's stated function as an OAuth helper is unrelated to this behavior, indicating a dependency confusion or supply chain attack vector.
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 'oauth-connect' npm package versions 0.1.1 and 2.0.1 include a preinstall script that runs 'node index.js' on installation. This script gathers installer-side system data such as os.hostname(), os.userInfo(), home directory, DNS server settings, and sensitive files like /etc/passwd and /etc/hosts, along with the consumer's package.json contents. It then sends this information to a malicious external server controlled by an attacker. This behavior is unrelated to the package's advertised OAuth helper functionality and represents a reconnaissance and data exfiltration payload triggered automatically during npm install.
Potential Impact
This malicious code compromises the confidentiality of the installer's environment by exfiltrating sensitive system and configuration data to an attacker-controlled server. This can lead to reconnaissance on the victim system, potential further exploitation, and exposure of sensitive user and system information. The attack occurs silently during package installation without user consent or awareness.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing the affected versions (=0.1.1 and =2.0.1) of the 'oauth-connect' package. Verify package integrity and source before installation. Consider using package integrity verification tools and monitoring for suspicious preinstall scripts in dependencies. Patch status is not yet confirmed — check the vendor advisory or npm security advisories for updates.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2024-2779
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-35fj-cp92-rv2m"]
- Ecosystems
- ["npm"]
Threat ID: 6a96f318acd9273b49e49552
Added to database: 09/01/2026, 15:45:28 UTC
Last enriched: 09/08/2026, 11:37:58 UTC
Last updated: 09/08/2026, 11:37:58 UTC
Views: 4
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.