Advisory

MAL-2026-18637

Also known as: GHSA-33jq-j4x3-75pc

Malicious package Its source marks this package as malicious: it is not a vulnerability in a legitimate one.

Summary

Malicious code in mock-datas-lib (npm)

Details

---
_-= Per source details. Do not edit below this line.=-_

Source: amazon-inspector (acbce1629b1a23a1dd82a3143a008b18c8c944982c5a006e4e64d40bb283ac59)
Package advertised as a mock-data generator ships an obfuscated loader in index.js and an encoded payload in database.js disguised as a product catalog. The exported getTransactions API invokes load_transaction_data, which iterates records in database.js, applies a Caesar-shift transform (keyed on the caller's count argument) to each record's base64 mark field, concatenates and base64-decodes the result, then passes the decoded source to the Function constructor with Buffer, require, and process bound as arguments and immediately invokes it. The Function constructor is obtained indirectly via globalThis.constructor.constructor, and the identifiers setTimeout, new Function, Buffer, require, process, try, catch, and clearTimeout are reconstructed by index from a split-token string array (_0x1a2b / _str) to defeat static analysis for Function(/eval(. The declared runtime dependencies python-shell (shell command execution) and axios (HTTP) are not referenced from the readable source and are only reachable from the decoded blob, consistent with hidden shell execution and network I/O against the installer. The data-file cover story, indirect Function acquisition, split-token identifier reconstruction, and unused shell/HTTP dependencies together form a supply-chain dropper that executes attacker-controlled code on any consumer that calls the library's documented API.

Source: ghsa-malware (7795c5ecb71c77fcb6d7630bfb136c7edef41a13036dd6ae6ebb02dfe4b60618)
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.

Severity

Not rated by the source.

Dates

Published
2026-11-04 18:02 UTC
Modified
2026-11-13 03:45 UTC

Affected packages and fixes

mock-datas-lib

npm · All systems

Affected

  • introduced 0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: OpenSSF Malicious Packages · Apache-2.0

Sources & licences