{"answers":{"affected":"2 open source packages ship an affected version, including flatmap-stream.","exploited":"There is no known exploitation of GHSA-9x64-5r7x-2q53 in the wild and no public exploit code.","fix":"No fix has been published for GHSA-9x64-5r7x-2q53 yet. Limit exposure of the affected software until one is available.","what":"GHSA-9x64-5r7x-2q53 is a vulnerability in flatmap-stream, published on 1 Sep 2020. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-9x64-5r7x-2q53 and fix it if it is affected.\n\nWhat it is: GHSA-9x64-5r7x-2q53 is a vulnerability in flatmap-stream, published on 1 Sep 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-9x64-5r7x-2q53 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- flatmap-stream (npm): affected all versions; no fix listed\n- flatmap-stream (npm): affected all versions; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-9x64-5r7x-2q53/ (Markdown: https://insights.sbomify.com/GHSA-9x64-5r7x-2q53/index.md)","id":"GHSA-9x64-5r7x-2q53","markdown":"https://insights.sbomify.com/GHSA-9x64-5r7x-2q53/index.md","name":"GHSA-9x64-5r7x-2q53","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"npm JavaScript library","requires_auth":"none","summary":"A malicious npm package executes arbitrary code to steal cryptocurrency private keys and account data from victims.","user_interaction":"not_required","vuln_class":"supply_chain"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"Version 0.1.1 of `flatmap-stream` is considered malicious.\n\nThis module runs an encrypted payload targeting a very specific application, `copay` and because they shared the same description it would have likely worked for `copay-dash`.\n\nThe injected code:\n\n- Read in AES encrypted data from a file disguised as a test fixture\n- Grabbed the npm package description of the module that imported it, using an automatically set environment variable\n- Used the package description as a key to decrypt a chunk of data pulled in from the disguised file\n\nThe decrypted data was part of a module, which was then compiled in memory and executed.\n\nThis module performed the following actions:\n\n- Decrypted another chunk of data from the disguised file\n- Concatenated a small, commented prefix from the first decrypted chunk to the end of the second decrypted chunk\n- Performed minor decoding tasks to transform the concatenated block of code from invalid JS to valid JS (we believe this was done to evade detection by dynamic analysis tools)\n- Wrote this processed block of JS out to a file stored in a dependency that would be packaged by the build scripts: \n\nThe chunk of code that was written out was the actual malicious code, intended to be run on devices owned by the end users of Copay.\n\nThis code would do the following:\n\n- Detect the current environment: Mobile/Cordova/Electron\n- Check the Bitcoin and Bitcoin Cash balances on the victim's copay account\n- If the current balance was greater than 100 Bitcoin, or 1000 Bitcoin Cash:\n  - Harvest the victim's account data in full\n  - Harvest the victim's copay private keys\n  - Send the victim's account data/private keys off to a collection\n\n## Recommendation\n\nIf you find this module in your environment it's best to remove it. The malicious version of event-stream and flatmap-stream have been removed from the npm Registry.","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":false,"headline":"Malicious Package in flatmap-stream","id":"GHSA-9x64-5r7x-2q53","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"supply_chain","year":"2020"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":[],"introduced":[],"last_affected":[],"package":"flatmap-stream","purl":null,"source":"GHSA-9x64-5r7x-2q53"},{"ecosystem":"npm","fixed":[],"introduced":[],"last_affected":[],"package":"flatmap-stream","purl":"pkg:npm/flatmap-stream","source":"GHSA-9x64-5r7x-2q53"}],"products":null,"published":"2020-09-01","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"A malicious npm package executes arbitrary code to steal cryptocurrency private keys and account data from victims.","url":"https://insights.sbomify.com/GHSA-9x64-5r7x-2q53/"}