mal-2026-14371
Vulnerability from ossf_malicious_packages
Published
2026-08-23 03:14
Modified
2026-09-09 16:30
Summary
Malicious code in chai-as-testkit (npm)
Details

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

Source: amazon-inspector (0bf8ab4a811449bd1ba40c637a0eebc0569994d3a3550cf7156c36192abcec31)

The package is published as 'chai-as-testkit' with a description referencing vulnerability management, but the tarball ships pino's README, docs/, index.d.ts, and lib/ tree (proto, levels, transport, worker, redaction) under an unrelated author (Robert King hello@jsonspack.com, bugs.url jsonspack.com) rather than the real pinojs publisher. The shipped index.js is a synthetic stub whose only effect is const config = require('./lib/config'), and lib/config.js is a 4,083,409-byte single-line obfuscator.io-style bundle: a rotated hex-escaped string array of ~23,953 entries with control-flow flattening and dead-code layers (webcrack inlines 40,105 decoded strings across the decoder layers before failing to serialize). This blob runs immediately when any consumer imports the package, executing attacker-controlled code inside the developer or CI Node.js process. The pino impersonation is the social-engineering wrapper around an on-import loader; the shape (name/description/author mismatch + hollow main entry that delegates to a multi-megabyte obfuscated module at require time) is a typosquat-delivered install/import-time RCE vehicle rather than a logging library.

Source: ghsa-malware (95d5d039dd1913413212411db396e7f1124bf58910447548638c505a05a0e21a)

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.

{
  "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": "lib/config.js",
              "sha256": "ef7a5abedd9be15b8f63cd56aca72913f2858678bcd4148b96030b304e7ca5e4",
              "tlsh": "861672889581c43395ce16a3ff2d6ae8f13a79f1c4c8a54bc569bc9c2dac91fd1a0dd0"
            },
            {
              "path": "package.json",
              "sha256": "9d9df1481c920ec1d01c8cead724dd2ed789c26a411fabee68cd33a6f4414219",
              "tlsh": "51017b20debc4e2301ed25524c2a0643ba614c175628fd1932db512d0f9d5ff41bf21d"
            }
          ],
          "package_integrity": [
            {
              "filename": "chai-as-testkit-2.3.5.tgz",
              "hashes": {
                "sha1": "3fde83408d21f4123e9127ed9dc0aaaf1f603dff",
                "sha512_sri": "sha512-cBCciGdISfMyeKC4gwgCu2c9ciADdt+vwq/Wz56V9rL2Tnvx5Q2FNWk7jDLhGLGMxAdd6d+h3sRtqOMfBr9ghg=="
              }
            }
          ]
        }
      },
      "package": {
        "ecosystem": "npm",
        "name": "chai-as-testkit"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": [
        "2.3.5"
      ]
    }
  ],
  "aliases": [
    "GHSA-wg38-qj68-8g87"
  ],
  "credits": [
    {
      "contact": [
        "inspector-research@amazon.com"
      ],
      "name": "Amazon Inspector",
      "type": "FINDER"
    }
  ],
  "database_specific": {
    "malicious-packages-origins": [
      {
        "id": "IN-MAL-2026-018569",
        "import_time": "2026-08-23T03:25:56.212228176Z",
        "modified_time": "2026-08-23T03:14:40Z",
        "sha256": "0bf8ab4a811449bd1ba40c637a0eebc0569994d3a3550cf7156c36192abcec31",
        "source": "amazon-inspector",
        "versions": [
          "2.3.5"
        ]
      },
      {
        "id": "GHSA-wg38-qj68-8g87",
        "import_time": "2026-09-09T16:28:44.884884566Z",
        "modified_time": "2026-09-09T15:26:21Z",
        "ranges": [
          {
            "events": [
              {
                "introduced": "0"
              }
            ],
            "type": "SEMVER"
          }
        ],
        "sha256": "95d5d039dd1913413212411db396e7f1124bf58910447548638c505a05a0e21a",
        "source": "ghsa-malware"
      }
    ]
  },
  "details": "\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (0bf8ab4a811449bd1ba40c637a0eebc0569994d3a3550cf7156c36192abcec31)\nThe package is published as \u0027chai-as-testkit\u0027 with a description referencing vulnerability management, but the tarball ships pino\u0027s README, docs/, index.d.ts, and lib/ tree (proto, levels, transport, worker, redaction) under an unrelated author (Robert King \u003chello@jsonspack.com\u003e, bugs.url jsonspack.com) rather than the real pinojs publisher. The shipped index.js is a synthetic stub whose only effect is `const config = require(\u0027./lib/config\u0027)`, and lib/config.js is a 4,083,409-byte single-line obfuscator.io-style bundle: a rotated hex-escaped string array of ~23,953 entries with control-flow flattening and dead-code layers (webcrack inlines 40,105 decoded strings across the decoder layers before failing to serialize). This blob runs immediately when any consumer imports the package, executing attacker-controlled code inside the developer or CI Node.js process. The pino impersonation is the social-engineering wrapper around an on-import loader; the shape (name/description/author mismatch + hollow main entry that delegates to a multi-megabyte obfuscated module at require time) is a typosquat-delivered install/import-time RCE vehicle rather than a logging library.\n\n## Source: ghsa-malware (95d5d039dd1913413212411db396e7f1124bf58910447548638c505a05a0e21a)\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-14371",
  "modified": "2026-09-09T16:30:29.867436989Z",
  "published": "2026-08-23T03:14:40Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/chai-as-testkit/v/2.3.5"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-wg38-qj68-8g87"
    }
  ],
  "schema_version": "1.7.4",
  "summary": "Malicious code in chai-as-testkit (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…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…