Malicious code in @latlongid/location (npm)
The npm package @latlongid/location version 1.0.1 contains malicious code that executes automatically upon installation. The postinstall script runs a JavaScript file that encodes the installer's hostname and sends it as part of a DNS query to an external domain, effectively exfiltrating host identification data. This behavior is consistent with reconnaissance activity aimed at identifying internal build environments, potentially for dependency confusion attacks.
AI Analysis
Technical Summary
@latlongid/[email protected] declares a postinstall script in its package.json that runs index.js automatically on every npm install. The script hex-encodes the installer's os.hostname() and constructs a DNS query name embedding this encoded hostname as a subdomain of dns.gl0b.xyz. It then performs a dns.lookup on this constructed name, leaking the host identifier via the DNS query regardless of resolution success. This technique aligns with a dependency-confusion reconnaissance beacon designed to enumerate internal build environments accessible from the compromised machine.
Potential Impact
The malicious code exfiltrates the hostname of the machine installing the package by embedding it in DNS queries to an attacker-controlled domain. This can reveal internal host identifiers and potentially expose internal network topology or build environments. While no direct code execution beyond the postinstall script is described, the information leakage can facilitate further targeted attacks such as dependency confusion or supply chain compromise.
Mitigation Recommendations
No official patch or remediation is currently documented for this package version. Users should avoid installing @latlongid/[email protected] and remove it from their dependency trees if present. Consider auditing dependencies for malicious postinstall scripts and restrict installation of untrusted or unknown npm packages. Monitor for updates or advisories from the package maintainers or npm registry regarding remediation.
Malicious code in @latlongid/location (npm)
Description
The npm package @latlongid/location version 1.0.1 contains malicious code that executes automatically upon installation. The postinstall script runs a JavaScript file that encodes the installer's hostname and sends it as part of a DNS query to an external domain, effectively exfiltrating host identification data. This behavior is consistent with reconnaissance activity aimed at identifying internal build environments, potentially for dependency confusion attacks.
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
@latlongid/[email protected] declares a postinstall script in its package.json that runs index.js automatically on every npm install. The script hex-encodes the installer's os.hostname() and constructs a DNS query name embedding this encoded hostname as a subdomain of dns.gl0b.xyz. It then performs a dns.lookup on this constructed name, leaking the host identifier via the DNS query regardless of resolution success. This technique aligns with a dependency-confusion reconnaissance beacon designed to enumerate internal build environments accessible from the compromised machine.
Potential Impact
The malicious code exfiltrates the hostname of the machine installing the package by embedding it in DNS queries to an attacker-controlled domain. This can reveal internal host identifiers and potentially expose internal network topology or build environments. While no direct code execution beyond the postinstall script is described, the information leakage can facilitate further targeted attacks such as dependency confusion or supply chain compromise.
Mitigation Recommendations
No official patch or remediation is currently documented for this package version. Users should avoid installing @latlongid/[email protected] and remove it from their dependency trees if present. Consider auditing dependencies for malicious postinstall scripts and restrict installation of untrusted or unknown npm packages. Monitor for updates or advisories from the package maintainers or npm registry regarding remediation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-12506
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a735740bf8831d539153773
Added to database: 08/05/2026, 15:31:12 UTC
Last enriched: 08/05/2026, 16:57:31 UTC
Last updated: 08/05/2026, 16:57:31 UTC
Views: 2
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.