This report shows the evidence for mock-datas-lib@1.0.1. 1 of 3 known versions is blocked or flagged. The newest version, 0.0.1-security, is allowed.
Blocked by malware advisory
OpenSSF/OSV malware advisory MAL-2026-18637 identifies this version as malicious and supplies the Firewall block. LPM AI assessed this version as suspicious; the assessments disagree.
What to do: remove this version and, if it ran, rotate the credentials it could reach. Remediation↓
OpenSSF/OSV malicious advisory
published · by OpenSSF/OSV
OpenSSF/OSV advisory MAL-2026-18637 confirms this npm version as malicious.
Advisory
MAL-2026-18637
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in mock-datas-lib (npm)
Details
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.
LPM's AI review found this version suspicious. That disagrees with the OpenSSF/OSV advisory, which supplies the block.
The package is presented as a mock data generator, but calling its main API also executes concealed, dynamically decoded code with Node.js access. The payload’s purpose is not established, so this warrants a warning rather than a malicious verdict.
Static reason
No blocking static signals were detected.
Trigger
Calling the exported `getTransactions` function.
Impact
The payload's behavior cannot be established from the reviewed excerpts; dynamic execution gives it access to Node.js capabilities.
Mechanism
The function schedules a loader that reads and decodes `database.js`, then executes the result through `Function` with access to Node.js globals.
Evidence
index.jsdatabase.js
Independent scan evidence
public snapshot
AI called this Suspicious at 96.0% confidence as Unknown with medium false-positive risk.
Evidence for AI warning decision
`load_transaction_data` decodes data from `database.js` into a string that it treats as code.
That function executes the decoded string with the `Function` constructor and passes it `Buffer`, `require` and `process`.
`getTransactions` calls the payload loader, which schedules execution after 100 ms.
Evidence against
The README describes the package as generating random mock data.
The manifest has no install, preinstall or postinstall hook.
The hidden code runs when `getTransactions` is called, not during import.
The versions list below shows the verdict for each recorded version.
Avoid installing mock-datas-lib@1.0.1. Remove it from direct dependencies and check your lockfile for transitive copies.
Choose an independently verified alternative or release. This report does not establish that other versions are safe.
If this version ran, investigate the affected machine and build environment. Rotate credentials it could access and rebuild from a trusted environment.