What happened

The application's initial configuration function (initPriceConfig) initiates an asynchronous call to https://api.jsonbin.io/v3/b/6a60970bf5f4af5e29b03d8d via the axios library. This call retrieves a JavaScript payload from the API, effectively executing remote code within the application's environment.

The returned payload, named record.model, is 24,686 characters long and is obfuscated with io.obfuscator.io. Upon deobfuscation, this reveals another layer of obfuscated JavaScript that includes modules like scdata (a RAT), node-pty for a full shell, ssh2 for pivoting, screenshot-desktop + sharp for screen capture, and @nut-tree-fork/nut-js for keyboard and mouse control. The response serves as a remote code execution loader, granting the attacker unprecedented access to the infected system.

Why it matters

The use of JSONBin.io in this manner represents a severe security breach. JSONBin is known for its developer sandbox environment and easy-to-use API, but it’s not intended for hosting and executing production code.

The attacker exploited this by leveraging the API to inject and run malicious JavaScript, bypassing standard security measures and granting complete control over the target system. This scenario underscores the importance of validating all external APIs, scrutinizing payload sources, and implementing robust input sanitization procedures to prevent similar attacks.

But, but, but…

The existence of a seemingly benign API call as the initial configuration step is a critical vulnerability – it’s not inherently wrong to use an API, but here it's exploited.

The lack of immediate awareness surrounding the JSONBin endpoint and its malicious utilization demonstrates a significant oversight in security practices. The risk lies in third-party dependencies without proper vetting and monitoring, which this application exposes itself to.

“The application's initial configuration function utilizes an API call to JSONBin.io, delivering a remotely hosted JavaScript payload that establishes a remote access trojan with capabilities for data theft and system control.”
— Dr Non

The counter-take

The assumption that a standard npm dependency chain is inherently secure is dangerously flawed. This case reveals how seemingly innocuous API calls can become critical attack vectors, demanding a fundamental shift in security thinking—one where every external interaction requires rigorous validation and continuous monitoring. Furthermore, relying on a developer sandbox like JSONBin.io without explicit restrictions represents an unacceptable level of risk.

The AI angle

This incident highlights an escalation of attack complexity driven by AI-powered automation. The attacker uses the RAT not just for immediate data theft but also for persistent monitoring and control, presenting significant upgrade risks in both human and operational security infrastructure. The asymmetry lies in the attacker's ability to remotely deploy and execute code without requiring direct access to the victim’s system.