Malicious code in datefmt-pro (npm)
The npm package datefmt-pro masquerades as a date formatting utility but contains malicious code that executes during installation. Its postinstall script collects system information such as hostname, user identity, kernel details, current directory, and network interfaces, then sends this data unencrypted to a hardcoded external IP address. The package aims to appear legitimate to entice installation while performing reconnaissance on the host system.
AI Analysis
Technical Summary
The datefmt-pro npm package includes a postinstall.js script that runs automatically upon installation. This script executes system commands (hostname, whoami, uname -a, pwd) and enumerates non-internal IPv4 network interfaces using os.networkInterfaces(). It then sends the collected data as JSON via an HTTP POST request to a hardcoded IP address (http://129.204.76.212:9999/rce-poc). The main index.js file contains only a trivial date-formatting stub to disguise the malicious payload. The package name and advertised functionality are designed to appear legitimate, facilitating installation and execution of the reconnaissance beacon.
Potential Impact
The malicious postinstall script leaks sensitive host information including system identity and network details to an external attacker-controlled server over unencrypted HTTP. This reconnaissance data could be used for further targeted attacks or exploitation. The compromise occurs at install time without user consent or awareness. No direct code execution beyond data collection and exfiltration is described.
Mitigation Recommendations
Users should avoid installing the datefmt-pro package, especially versions 1.0.0, 1.0.1, and 1.0.2. Since no patch or official fix is indicated, remediation involves removing the package if installed and auditing systems for any unauthorized data exfiltration. Use trusted package sources and verify package authenticity before installation. Monitor for similar malicious packages that use deceptive names and postinstall scripts.
Malicious code in datefmt-pro (npm)
Description
The npm package datefmt-pro masquerades as a date formatting utility but contains malicious code that executes during installation. Its postinstall script collects system information such as hostname, user identity, kernel details, current directory, and network interfaces, then sends this data unencrypted to a hardcoded external IP address. The package aims to appear legitimate to entice installation while performing reconnaissance on the host system.
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 datefmt-pro npm package includes a postinstall.js script that runs automatically upon installation. This script executes system commands (hostname, whoami, uname -a, pwd) and enumerates non-internal IPv4 network interfaces using os.networkInterfaces(). It then sends the collected data as JSON via an HTTP POST request to a hardcoded IP address (http://129.204.76.212:9999/rce-poc). The main index.js file contains only a trivial date-formatting stub to disguise the malicious payload. The package name and advertised functionality are designed to appear legitimate, facilitating installation and execution of the reconnaissance beacon.
Potential Impact
The malicious postinstall script leaks sensitive host information including system identity and network details to an external attacker-controlled server over unencrypted HTTP. This reconnaissance data could be used for further targeted attacks or exploitation. The compromise occurs at install time without user consent or awareness. No direct code execution beyond data collection and exfiltration is described.
Mitigation Recommendations
Users should avoid installing the datefmt-pro package, especially versions 1.0.0, 1.0.1, and 1.0.2. Since no patch or official fix is indicated, remediation involves removing the package if installed and auditing systems for any unauthorized data exfiltration. Use trusted package sources and verify package authenticity before installation. Monitor for similar malicious packages that use deceptive names and postinstall scripts.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-12175
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a735730bf8831d53913cd98
Added to database: 08/05/2026, 15:30:56 UTC
Last enriched: 08/05/2026, 15:41:15 UTC
Last updated: 08/05/2026, 15:41:15 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.