MAL-2026-6275
Vulnerability from ossf_malicious_packages
Published
2026-06-23 03:01
Modified
2026-06-23 03:15
Summary
Malicious code in @ts-apis/ts-utils (npm)
Details

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

Source: amazon-inspector (eccf08a9ba188be941f42f0b088d51fc5b1e84802fe9bd1d1218a6b71a6e2c11)

The published tarball's dist/index.js contains an obfuscated payload that runs at require() time inside a setTimeout-wrapped IIFE, completely unrelated to the package's advertised TypeScript utility API (logger/middleware/getDb/createRedisClient). After a 500-2500ms jitter, it harvests installer-side credentials from ~/.ssh/ (id_rsa, id_ed25519, id_ecdsa, config, authorized_keys), ~/.aws/credentials and ~/.aws/config, ~/.kube/config, ~/.npmrc, ~/.netrc, ~/.docker/config.json, ~/.git-credentials, gcloud application_default_credentials.json, ~/.config/gh/hosts.yml, terraform/Azure/Vault/Railway/Solana credential files,.env files in cwd and parent directories, and on Linux /run/secrets/* plus the Kubernetes service-account token. It also queries cloud-instance metadata services to steal short-lived credentials: AWS EC2 IMDSv2 at 169.254.169.254 (PUT token then GET iam/security-credentials/), GCP metadata.google.internal with Metadata-Flavor: Google, and the ECS container credentials endpoint via $AWS_CONTAINER_CREDENTIALS_RELATIVE_URI. Collected secrets, environment variables, hostname, userInfo, cwd, git config/remotes, /etc/hosts, process listings, and /proc/1/environ are JSON-stringified, base64-encoded, chunked to 30KB, and POSTed over HTTPS to https://safdadfasf.com/cb/loopscale/exfil. A second component opens a persistent C2 channel: every 10 seconds it GETs https://safdadfasf.com/cb/loopscale/h?id=; responses of the form {c:'SLIVER...'} download a binary, chmod it to 755, and exec it (Sliver-style implant staging), while any other command is passed to execSync with output returned to the C2. All sensitive strings (hostnames, paths, shell commands such as 'powershell Get-ChildItem env:', 'cmdkey /list', 'find / -name.env') are encoded as String.fromCharCode arrays and reconstructed at runtime to evade static analysis. The src/ directory contains only legitimate TypeScript helpers; the payload is present solely in the published dist/index.js, indicating a deliberately backdoored build.

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.
  • 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.
  • 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.
  • 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"
          },
          {
            "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"
          },
          {
            "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"
          },
          {
            "cweId": "CWE-506",
            "description": "The product contains code that appears to be malicious in nature.",
            "name": "Embedded Malicious Code"
          }
        ],
        "indicators": {
          "evidence_files": [
            {
              "path": "dist/index.js",
              "sha256": "3d1c30d7f6e4d92d812e725a4ceae4dbb8d68c9310ca34690abc430dfc453a60",
              "tlsh": "f052a73a33fa6521b11be04fe7474001b9b2f5033665d8a4b68c73985fdd464d6a2ef4"
            }
          ],
          "package_integrity": [
            {
              "filename": "ts-utils-1.0.0.tgz",
              "hashes": {
                "sha1": "421b1b01c4126fbb6adb65220364fc20bcdd332f",
                "sha512_sri": "sha512-nbt9WY751IorGzY2RVXgtTrpthH0KAu01/sGptV5qETWROJk2vUfcPWYdt/55P8J6mN4/wgKsQzYO3qd364v6A=="
              }
            }
          ]
        }
      },
      "package": {
        "ecosystem": "npm",
        "name": "@ts-apis/ts-utils"
      },
      "versions": [
        "1.0.0",
        "1.0.7",
        "1.0.9",
        "1.0.8",
        "1.0.5",
        "1.0.4",
        "1.0.6"
      ]
    }
  ],
  "credits": [
    {
      "contact": [
        "inspector-research@amazon.com"
      ],
      "name": "Amazon Inspector",
      "type": "FINDER"
    }
  ],
  "database_specific": {
    "malicious-packages-origins": [
      {
        "id": "IN-MAL-2026-007194",
        "import_time": "2026-06-23T03:13:43.941738174Z",
        "modified_time": "2026-06-23T03:01:39Z",
        "sha256": "12056b67bfeda9328838ff8458d4f38ffc1b65ccd71164498ffeb1d4e307afa5",
        "source": "amazon-inspector",
        "versions": [
          "1.0.0"
        ]
      },
      {
        "id": "IN-MAL-2026-007195",
        "import_time": "2026-06-23T03:13:44.045490647Z",
        "modified_time": "2026-06-23T03:01:40Z",
        "sha256": "af14b02cb4671aa93acc751aceafb4d2f80330e23ad1220d3b9ad08097d23baf",
        "source": "amazon-inspector",
        "versions": [
          "1.0.7"
        ]
      },
      {
        "id": "IN-MAL-2026-007191",
        "import_time": "2026-06-23T03:13:43.640654297Z",
        "modified_time": "2026-06-23T03:01:37Z",
        "sha256": "d0642d2d0f9a777b980c086bfa15770de968767705ec917ac362bad75e903ade",
        "source": "amazon-inspector",
        "versions": [
          "1.0.9"
        ]
      },
      {
        "id": "IN-MAL-2026-007192",
        "import_time": "2026-06-23T03:13:43.751097354Z",
        "modified_time": "2026-06-23T03:01:38Z",
        "sha256": "eccf08a9ba188be941f42f0b088d51fc5b1e84802fe9bd1d1218a6b71a6e2c11",
        "source": "amazon-inspector",
        "versions": [
          "1.0.8"
        ]
      },
      {
        "id": "IN-MAL-2026-007193",
        "import_time": "2026-06-23T03:13:43.861513053Z",
        "modified_time": "2026-06-23T03:01:38Z",
        "sha256": "f6adbe3a98ab8ddfafb044c7faa99be609d037118b8c4302e2f726355b01a1e4",
        "source": "amazon-inspector",
        "versions": [
          "1.0.5"
        ]
      },
      {
        "id": "IN-MAL-2026-007190",
        "import_time": "2026-06-23T03:13:43.492925334Z",
        "modified_time": "2026-06-23T03:01:33Z",
        "sha256": "320b872273b2bc090f1633daf383736245010762235236e7be71bf30d2f7a673",
        "source": "amazon-inspector",
        "versions": [
          "1.0.4"
        ]
      },
      {
        "id": "IN-MAL-2026-007196",
        "import_time": "2026-06-23T03:13:44.150712134Z",
        "modified_time": "2026-06-23T03:01:41Z",
        "sha256": "8c4213763da3ab47fc9efd6df9dded22239064decceac5ad6381c27537901fec",
        "source": "amazon-inspector",
        "versions": [
          "1.0.6"
        ]
      }
    ]
  },
  "details": "\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (eccf08a9ba188be941f42f0b088d51fc5b1e84802fe9bd1d1218a6b71a6e2c11)\nThe published tarball\u0027s dist/index.js contains an obfuscated payload that runs at require() time inside a setTimeout-wrapped IIFE, completely unrelated to the package\u0027s advertised TypeScript utility API (logger/middleware/getDb/createRedisClient). After a 500-2500ms jitter, it harvests installer-side credentials from ~/.ssh/ (id_rsa, id_ed25519, id_ecdsa, config, authorized_keys), ~/.aws/credentials and ~/.aws/config, ~/.kube/config, ~/.npmrc, ~/.netrc, ~/.docker/config.json, ~/.git-credentials, gcloud application_default_credentials.json, ~/.config/gh/hosts.yml, terraform/Azure/Vault/Railway/Solana credential files,.env files in cwd and parent directories, and on Linux /run/secrets/* plus the Kubernetes service-account token. It also queries cloud-instance metadata services to steal short-lived credentials: AWS EC2 IMDSv2 at 169.254.169.254 (PUT token then GET iam/security-credentials/), GCP metadata.google.internal with Metadata-Flavor: Google, and the ECS container credentials endpoint via $AWS_CONTAINER_CREDENTIALS_RELATIVE_URI. Collected secrets, environment variables, hostname, userInfo, cwd, git config/remotes, /etc/hosts, process listings, and /proc/1/environ are JSON-stringified, base64-encoded, chunked to 30KB, and POSTed over HTTPS to https://safdadfasf.com/cb/loopscale/exfil. A second component opens a persistent C2 channel: every 10 seconds it GETs https://safdadfasf.com/cb/loopscale/h?id=\u003chostname-timestamp\u003e; responses of the form {c:\u0027SLIVER...\u0027} download a binary, chmod it to 755, and exec it (Sliver-style implant staging), while any other command is passed to execSync with output returned to the C2. All sensitive strings (hostnames, paths, shell commands such as \u0027powershell Get-ChildItem env:\u0027, \u0027cmdkey /list\u0027, \u0027find / -name.env\u0027) are encoded as String.fromCharCode arrays and reconstructed at runtime to evade static analysis. The src/ directory contains only legitimate TypeScript helpers; the payload is present solely in the published dist/index.js, indicating a deliberately backdoored build.\n",
  "id": "MAL-2026-6275",
  "modified": "2026-06-23T03:15:33Z",
  "published": "2026-06-23T03:01:33Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.0.0"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.0.7"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.0.9"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.0.8"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.0.5"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.0.4"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/@ts-apis/ts-utils/v/1.0.6"
    }
  ],
  "schema_version": "1.7.4",
  "summary": "Malicious code in @ts-apis/ts-utils (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…