MAL-2026-21085

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/random-transactions-sdk/MAL-2026-21085.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-21085
Published
2026-12-03T20:37:07Z
Modified
2026-12-03T20:45:10Z
Summary
Malicious code in random-transactions-sdk (npm)
Details

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

Source: amazon-inspector (425021c6510cafa34700a3f3e48030b56955aa3454bb39d9fb3d3341adad7513)

random-transactions-sdk@1.0.4 ships a database.js data file containing ~54KB of base64-encoded 'mark' fields. The documented getTransactions() API calls load_transaction_data(), which concatenates these fields, applies a Caesar shift keyed on the caller-supplied count argument, base64-decodes the result, and passes the resulting source into the Function constructor with Buffer, require, and process injected as parameters. The code uses a hex-named string-array (_0x1a2b) to reconstruct the identifiers 'setTimeout', 'Function', 'Buffer', 'require', 'process', and 'clearTimeout' from fragments rather than referencing them directly, and wraps the execution in a silent try/catch. A random-transaction generator has no legitimate reason to reconstruct and evaluate obfuscated JavaScript from a shipped data blob with full require and process access; the Caesar shift keyed on a user argument conceals the payload bytes from static inspection, and the identifier obfuscation of standard builtins is a canonical evasion pattern. The dynamic execution fires on normal use of the package's advertised export, giving the hidden payload full Node.js process capabilities (filesystem, network, child_process via require) in the installer's process.

Database specific
{
    "malicious-packages-origins":  [
        {
            "id":  "IN-MAL-2026-023220",
            "import_time":  "2026-12-03T20:41:50.106557232Z",
            "modified_time":  "2026-12-03T20:37:07Z",
            "sha256":  "425021c6510cafa34700a3f3e48030b56955aa3454bb39d9fb3d3341adad7513",
            "source":  "amazon-inspector",
            "versions":  [
                "1.0.4"
            ]
        },
        {
            "id":  "IN-MAL-2026-023221",
            "import_time":  "2026-12-03T20:41:50.184199400Z",
            "modified_time":  "2026-12-03T20:37:13Z",
            "sha256":  "c772fbb26078f89c012ffbd5cd2a9821742a79ef50b2784ec62e8104107aa92c",
            "source":  "amazon-inspector",
            "versions":  [
                "1.0.1"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / random-transactions-sdk

Package

Name
random-transactions-sdk
View open source insights on deps.dev
Purl
pkg:npm/random-transactions-sdk

Affected ranges

Affected versions

1.*
1.0.1
1.0.4

Database specific

cwes
[
    {
        "cweId":  "CWE-506",
        "description":  "The product contains code that appears to be malicious in nature.",
        "name":  "Embedded Malicious Code"
    },
    {
        "cweId":  "CWE-506",
        "description":  "The product contains code that appears to be malicious in nature.",
        "name":  "Embedded Malicious Code"
    }
]
indicators
{
    "evidence_files":  [
        {
            "path":  "index.js",
            "sha256":  "c0a1a7e54e1c759e62e48cfa835d79494163da3b37b30c1bd55c5875d9dd24f0",
            "tlsh":  "0ef10f6839f930248857b07c67eb9449612de0576e9a6ca87f4d83101f7d13ce1f6ba8"
        }
    ],
    "package_integrity":  [
        {
            "filename":  "random-transactions-sdk-1.0.4.tgz",
            "hashes":  {
                "sha1":  "aa60d4cd1eba9dd099f47dc09961e540c483f4d6",
                "sha512_sri":  "sha512-PJMPVgbVEmqfErhkd296eSR4xVbQWnCpWZxin7eVY1dZlPNp0RQyc+6LHwemb1IUJkMXwiNTlsY/c/tEw1QxwQ=="
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/random-transactions-sdk/MAL-2026-21085.json"