cvelo
P2 · HighMalware

Malicious code in teahy-znrpz-util (npm)

  • GHSA-53gf-4wh9-g7vw

Description

index.js reads a numeric byte array stored under a non-standard `_bz` key inside package.json, decompresses it with zlib.inflateSync, and executes the resulting string via the Function constructor with `require` and `__dirname` bound in — all on module load. Execution is gated by an early-return when any of CI, GITHUB_ACTIONS, GITLAB_CI, TRAVIS, CIRCLECI, or SANDBOX environment variables are set, so the hidden code only runs on real developer or production hosts. Smuggling executable logic as a zlib blob under a private manifest key, decoding it, and running it through Function() at require time is an obfuscated-loader pattern; the package's self-description as a 'utility' does not match any behavior visible in its source. The payload executes with full Node privileges on the installer's machine as soon as the module is required. --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/21ec1d1b1de6f4090eeedad8c58e9c49621376b4/osv/malicious/npm/teahy-znrpz-util/MAL-2026-19146.json))

Text from the GitHub Advisory record.

Recommendation

Remove the package and rotate any secret the machine that installed it could reach. There is no version to update to.

Affected

  • teahy-znrpz-utilnpm

    No versions listed

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.