Skip to main content

Malicious code in oauth-connect (npm)

0
High
Published: 06/25/2024 (06/25/2024, 12:53:40 UTC)
Source: GCVE Database
Product: oauth-connect

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

oauth-connect
pkg:npm/oauth-connect
Affected versions
=2.0.1=0.1.1

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

AILast updated: 09/08/2026, 11:37:58 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses