@or-sdk/agents@4.21.5
Malicious code in @or-sdk/agents (npm)
Analysis
The package's preinstall hook (setup.mjs) runs on install: it detects the platform/architecture, downloads the Bun JavaScript runtime from the oven-sh GitHub releases, and uses it to execute a bundled 727KB obfuscated script (math_init.js). The script is obfuscated with a large encoded string array and a custom base-N decoder, and contains eval, Function-constructor, and child_process calls, indicating it executes dynamically-decoded code. The package also depends on three sibling packages (@or-sdk/base, @or-sdk/bots, @or-sdk/deployer) that are known-malicious. The exact command-and-control endpoints are encoded inside the obfuscated payload and are not visible in the plaintext source.
- analyzed by
- Leitwacht
- first seen
- Aug 4, 2026, 11:57 AM
- analyzed
- Aug 4, 2026, 05:45 PM
- weekly installs
- 1,120
Related advisories
- @or-sdk/base@0.44.6
- @or-sdk/sdk-api@0.29.4
- @or-sdk/providers@0.3.8
- @or-sdk/druid@1.4.9
- @or-sdk/data-hub-svc@2.3.7
- @or-sdk/key-value-storage@0.28.8
- @or-sdk/sku-builder@2.5.3
- @or-sdk/account-settings@1.3.8
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.