MAL-2026-4501

    Dashboard / Malicious Package / MAL-2026-4501

    MAL-2026-4501

    Published: 19 May 2026Last Modified: 6 Jul 2026Aliases: 
    GHSA-m4m6-q4p8-3vjv

    Summary: Malicious code in btd-smart (npm)

    Details: Source: amazon-inspector (3ad22b27351879a89349a1232ee5abb46bc589399ea710b9769526a8080b3199) The package presents itself as a clone of juliangruber/balanced-match (stolen author identity 'Julian Gruber <[email protected]>', verbatim README, identical API renamed btdSmart, placeholder homepage 'github.com/your-org/btd-smart'). Appended to the legitimate code in index.js is an obfuscated block that runs unconditionally when the module is required. A custom string-shuffle decoder reconstructs the identifier 'constructor' (and other strings) without any literal occurrences in the file, retrieves the Function constructor from a string prototype, builds a function from a decoded source body, and invokes it. Before invocation, the code stashes `require` and `module` onto `global` under decoder-produced keys so the Function-built code — which otherwise has no closure scope — gains filesystem, network, and process capabilities. The payload body is opaque (deterministic numerical shuffle with 0x7F-based escape tricks across two nested decoders), executes on every `require('btd-smart')`, and the legitimate balanced-match code above it has no obfuscation, confirming the appended block is purposefully hidden. Combined signals — typosquat with stolen identity, custom obfuscator, dynamic Function eval of a decoded blob at module load, deliberate global-smuggling of require/module — match the documented active-attack shape; no legitimate brace-matching utility needs any of these mechanisms. Source: ghsa-malware (8edce8a8e04e183f3bd29cb37d2f3916debf1ebd05c0cbe50fb5f1920f2fa932) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

    Affected packages

    Package

    Name: btd-smart

    Purl: pkg:npm/btd-smart

    Affected ranges

    Type: N/A

    Events:

    Introduced- None
    Fixed -None

    Affected versions

    1.0.2
    1.0.3
    MAL-2026-4501 | CVE-DB