Find a vulnerability
Search criteria
Related vulnerabilities
MAL-2026-18587 (GHSA-QJW2-5743-XHP4)
Vulnerability from ossf_malicious_packages – Published: 2026-11-03 22:31 – Updated: 2026-11-13 04:15 – Source website| Ecosystem | Package | Versions |
|---|---|---|
| npm |
txnforge
|
Affected: All versions (semver)
1.0.4
|
The package advertises itself as a synthetic transaction data generator, but its sole documented function getTransactions() loads base64-encoded 'mark' fields from database.js, Caesar-decodes them using a per-record shift, and executes the resulting string via the Function constructor with Buffer, require, and process bound as arguments. The dangerous identifiers (Function, Buffer, require, process, setTimeout, clearTimeout) are reassembled at runtime from character fragments, and the Function constructor is resolved indirectly via globalThis.constructor.constructor, concealing the dynamic-execution sink from static analysis. The payload runs with full Node.js capabilities (file system, child process, network) in the context of any process that requires the package and invokes its advertised API. The manifest also declares python-shell and axios as dependencies that are never referenced by the shipped source, consistent with capability staged for the hidden payload rather than for the stated purpose of the library.
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.
| Type | Indicator | Hashes |
|---|---|---|
| Evidence file |
index.js
|
sha256
c0a1a7e54e1c759e62e48cfa835d79494163da3b37b30c1bd55c5875d9dd24f0tlsh
0ef10f6839f930248857b07c67eb9449612de0576e9a6ca87f4d83101f7d13ce1f6ba8 |
- CWE-506 - Embedded Malicious Code
| URL | Tags |
|---|---|
| https://github.com/advisories/GHSA-qjw2-5743-xhp4 | ADVISORY |
| https://www.npmjs.com/package/txnforge/v/1.0.4 | PACKAGE |
{
"affected": [
{
"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": {
"ecosystem": "npm",
"name": "txnforge"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "SEMVER"
}
],
"versions": [
"1.0.4"
]
}
],
"aliases": [
"GHSA-qjw2-5743-xhp4"
],
"credits": [
{
"contact": [
"inspector-research@amazon.com"
],
"name": "Amazon Inspector",
"type": "FINDER"
}
],
"database_specific": {
"malicious-packages-origins": [
{
"id": "GHSA-qjw2-5743-xhp4",
"import_time": "2026-11-03T23:17:35.031133462Z",
"modified_time": "2026-11-03T22:31:14Z",
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "SEMVER"
}
],
"sha256": "45b831fcc35bdfb28fa17be14f502a494fab42eb58556e61fdcffba0cb3926e1",
"source": "ghsa-malware"
},
{
"id": "IN-MAL-2026-022754",
"import_time": "2026-11-13T04:13:29.807655826Z",
"modified_time": "2026-11-13T03:40:57Z",
"sha256": "37d4a5dba5475e899a0fcfffc10665c5beb6eb69c6735fb6fa4c9ac0c6a0931a",
"source": "amazon-inspector",
"versions": [
"1.0.4"
]
}
]
},
"details": "\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (37d4a5dba5475e899a0fcfffc10665c5beb6eb69c6735fb6fa4c9ac0c6a0931a)\nThe package advertises itself as a synthetic transaction data generator, but its sole documented function getTransactions() loads base64-encoded \u0027mark\u0027 fields from database.js, Caesar-decodes them using a per-record shift, and executes the resulting string via the Function constructor with Buffer, require, and process bound as arguments. The dangerous identifiers (Function, Buffer, require, process, setTimeout, clearTimeout) are reassembled at runtime from character fragments, and the Function constructor is resolved indirectly via globalThis.constructor.constructor, concealing the dynamic-execution sink from static analysis. The payload runs with full Node.js capabilities (file system, child process, network) in the context of any process that requires the package and invokes its advertised API. The manifest also declares python-shell and axios as dependencies that are never referenced by the shipped source, consistent with capability staged for the hidden payload rather than for the stated purpose of the library.\n\n## Source: ghsa-malware (45b831fcc35bdfb28fa17be14f502a494fab42eb58556e61fdcffba0cb3926e1)\nAny 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.\n",
"id": "MAL-2026-18587",
"modified": "2026-11-13T04:15:08.369177363Z",
"published": "2026-11-03T22:31:14Z",
"references": [
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-qjw2-5743-xhp4"
},
{
"type": "PACKAGE",
"url": "https://www.npmjs.com/package/txnforge/v/1.0.4"
}
],
"schema_version": "1.7.4",
"summary": "Malicious code in txnforge (npm)"
}