1 line
4.2 KiB
JSON
1 line
4.2 KiB
JSON
{"schema_version":"1.9.2","id":"MAL-2026-6510","published":"2026-06-26T05:51:44Z","modified":"2026-11-18T18:30:05.236349185Z","aliases":["GHSA-pc7w-ch55-9pff"],"summary":"Malicious code in @merceas/cross-fetch (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (5f6307129b7d9edcbd76ffc93c9d8a6ae146332951d5ce90e659afe1eec01127)\nPackage is published under the @merceas scope as `cross-fetch` and reuses the upstream cross-fetch README, homepage (github.com/lquixada/cross-fetch), and author metadata to impersonate the legitimate `cross-fetch` package. The package `main`, dist/node-ponyfill.js, contains decoy ponyfill code followed by two obfuscator.io-packed IIFEs that run when the module is `require()`d. The IIFEs dynamically import fs/os/path/https/http/crypto/url/child_process, AES-256-decrypt a URL constructed at runtime from four 32-byte hex Buffers, HTTPS-GET the payload (handling 301/302/303/307/308 redirects with exponential-backoff retries), write it under `os.tmpdir()/<name>-<pid>/`, chmod the file to 0755 (`chmodSync(file, 0o1ed)`), then execute it via `bash -c <file>` and additionally spawn a detached, `unref()`'d child with `stdio:'ignore'` and `windowsHide:true` for self-respawn / persistence. Obfuscation uses a string-array with numeric-IIFE shift, RC4-keyed base64 lookup, and an anti-tamper RegExp debugger self-test to hide the URL and command strings from static inspection. Importing this package — directly or as a transitive — executes attacker-controlled bytes on the installer's machine in any environment that loads the module (CI, build, production, developer workstation).\n\n## Source: ghsa-malware (3ab989c877e24175aabb7c120a45bdc664a36acfd8e81902c78a8eeab4b73a12)\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","affected":[{"package":{"name":"@merceas/cross-fetch","ecosystem":"npm","purl":"pkg:npm/%40merceas/cross-fetch"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["3.1.12"],"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":"package.json","sha256":"acbdb415bc5877768dfb63d6444050ce4f2cfa136902b1ff1d87f01e38657553","tlsh":"1a513f21c96c4ca309e560a4557e528371248a878ea07c1d33df422d8f1e6ef30bdeae"},{"path":"dist/node-ponyfill.js","sha256":"62a7c6e9fcd26c6a108978a0039d466d0b5c0761093bf60efa4c96e4bd1b1e57","tlsh":"ed93f9857dea307f535290b3212f6292e52ddc5d6348c418e461dcedbf6422ce27eaac"}],"package_integrity":[{"filename":"cross-fetch-3.1.12.tgz","hashes":{"sha1":"c551eeb1e01d4a5c1bd84fa777ff1fb4a42ad79e","sha512_sri":"sha512-g9OiIa1Tyf1RS6I6igC7JFOSenkMR3APZt3yGWFmxIpK2UDUwiehe9vOmG/n4h6DBn69rtR4ERAaIynUnNbgPA=="}}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@merceas/cross-fetch/MAL-2026-6510.json"}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/@merceas/cross-fetch/v/3.1.12"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-pc7w-ch55-9pff"}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-007598","import_time":"2026-06-26T06:28:53.100203378Z","modified_time":"2026-06-26T05:51:44Z","sha256":"5f6307129b7d9edcbd76ffc93c9d8a6ae146332951d5ce90e659afe1eec01127","source":"amazon-inspector","versions":["3.1.12"]},{"id":"GHSA-pc7w-ch55-9pff","import_time":"2026-11-18T18:19:34.76904814Z","modified_time":"2026-11-18T18:16:13Z","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"sha256":"3ab989c877e24175aabb7c120a45bdc664a36acfd8e81902c78a8eeab4b73a12","source":"ghsa-malware"}]},"credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]} |