mal-2026-16078
Vulnerability from ossf_malicious_packages
Published
2026-09-09 06:54
Modified
2026-09-09 07:22
Summary
Malicious code in cache-cleanup-module (npm)
Details

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

Source: amazon-inspector (2931c2feef07a63612b0886a1840e519516424af0fbf4fb0a138e97736a18857)

cache-cleanup-module ships an exported runOperation() that queries a hardcoded third-party endpoint at https://testback-2aqe.onrender.com/can-cleanup (authenticated with a static x-api-key token 'f8675764-417f-49a4-807c-5879a667c476') and, when the response contains allowed:true, recursively deletes every entry in the caller's current working directory (or a supplied path) via fs.rmSync({recursive:true, force:true}) and fs.unlinkSync, skipping only the module file itself. The package's stated purpose of 'safe, transparent cache and build artifact cleanup' is not reflected in the code: there is no filter restricting the deletion to cache or build artifact paths, so any consumer that invokes runOperation() has the entirety of their cwd wiped at the remote operator's discretion. The hardcoded endpoint and static API token give the author unilateral, per-install control over when destruction fires on installer machines.

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": "index.js",
              "sha256": "fc68e4475765340483d69a4310e26b96cad1489a258d968f5a893185d5f0b1a6",
              "tlsh": "35610e88d85a631309b763a59b06180afe3912132719d215bebcd3d66f32c14f293dce"
            }
          ],
          "package_integrity": [
            {
              "filename": "cache-cleanup-module-2.6.0.tgz",
              "hashes": {
                "sha1": "9d818d4ed7f44afd1d7a5a84cb63a2d27a195d36",
                "sha512_sri": "sha512-vmsT1+LJWn4sQTrReQAqsEv7nRB+vvIpEGzElR4+KgJD7tmgzpZpwhvyqJvSoHernyrwLzb9UYVdh6pCO9bucA=="
              }
            }
          ]
        }
      },
      "package": {
        "ecosystem": "npm",
        "name": "cache-cleanup-module"
      },
      "versions": [
        "2.6.0",
        "2.5.0"
      ]
    }
  ],
  "credits": [
    {
      "contact": [
        "inspector-research@amazon.com"
      ],
      "name": "Amazon Inspector",
      "type": "FINDER"
    }
  ],
  "database_specific": {
    "malicious-packages-origins": [
      {
        "id": "IN-MAL-2026-019848",
        "import_time": "2026-09-09T07:20:43.634581921Z",
        "modified_time": "2026-09-09T06:54:28Z",
        "sha256": "0ad7548a2f9d91783c5e21d77664d4d3991353fde3ec26e9480b0de7bf58cc68",
        "source": "amazon-inspector",
        "versions": [
          "2.6.0"
        ]
      },
      {
        "id": "IN-MAL-2026-019849",
        "import_time": "2026-09-09T07:20:43.748992885Z",
        "modified_time": "2026-09-09T06:54:37Z",
        "sha256": "2931c2feef07a63612b0886a1840e519516424af0fbf4fb0a138e97736a18857",
        "source": "amazon-inspector",
        "versions": [
          "2.5.0"
        ]
      }
    ]
  },
  "details": "\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (2931c2feef07a63612b0886a1840e519516424af0fbf4fb0a138e97736a18857)\ncache-cleanup-module ships an exported runOperation() that queries a hardcoded third-party endpoint at https://testback-2aqe.onrender.com/can-cleanup (authenticated with a static x-api-key token \u0027f8675764-417f-49a4-807c-5879a667c476\u0027) and, when the response contains allowed:true, recursively deletes every entry in the caller\u0027s current working directory (or a supplied path) via fs.rmSync({recursive:true, force:true}) and fs.unlinkSync, skipping only the module file itself. The package\u0027s stated purpose of \u0027safe, transparent cache and build artifact cleanup\u0027 is not reflected in the code: there is no filter restricting the deletion to cache or build artifact paths, so any consumer that invokes runOperation() has the entirety of their cwd wiped at the remote operator\u0027s discretion. The hardcoded endpoint and static API token give the author unilateral, per-install control over when destruction fires on installer machines.\n",
  "id": "MAL-2026-16078",
  "modified": "2026-09-09T07:22:43Z",
  "published": "2026-09-09T06:54:28Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/cache-cleanup-module/v/2.6.0"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/cache-cleanup-module/v/2.5.0"
    }
  ],
  "schema_version": "1.7.4",
  "summary": "Malicious code in cache-cleanup-module (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…