mal-2026-5395
Vulnerability from ossf_malicious_packages
Published
2026-06-09 15:46
Modified
2026-07-03 16:47
Summary
Malicious code in @sql-trigger/nodesql (npm)
Details

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

Source: amazon-inspector (39e37d95fb040c83277583e2bf90b56363f86360337f1c30e63c85eb56579ada)

The package advertises itself as a simple SQL helper but its main entry index.js is heavily obfuscated (obfuscator.io string-array + RC4 + base64, 218-entry shuffled literal array, two RC4 decoders) with no human-readable logic. After deobfuscation, the top-level IIFE requires os/fs/path/child_process/axios, installs uncaughtException and unhandledRejection handlers to suppress errors, then assembles an IPv4 address at runtime by concatenating four numeric octets with '.', issues an axios HTTP GET to that host, writes the response body into os.tmpdir() with flag 'w+', and invokes child_process exec/spawn on the written file with windowsHide:true and cwd set to the tmp directory. This is a generic remote-binary dropper: the destination is mutable, the payload is opaque and unverified, the URL is built at runtime to evade static scanners, and the fetched file is unrelated to any SQL functionality. The dropper fires the moment any consumer require()s the package, so installing this dependency results in attacker-controlled code being downloaded to and executed from the consumer's temp directory.

Source: ghsa-malware (af206fa9674f6676548fa54503b38eaa9a0cd31b267e4b7a39598bfde93c0e54)

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.
  • 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"
          }
        ],
        "indicators": {
          "evidence_files": [
            {
              "path": "index.js",
              "sha256": "47336ec64eb50ea6780cc4dd72a8fa72edc6c882269befea2f8c3483b87e1852",
              "tlsh": "8a82b7c83bc2b0215733e0fbba1bb096e2a95c89a34d8549f766f458fd6c314d4c5a68"
            }
          ],
          "package_integrity": [
            {
              "filename": "nodesql-1.0.1.tgz",
              "hashes": {
                "sha1": "3a733d9326588696ce792cc6b2b39401a0db6be9",
                "sha512_sri": "sha512-jQp8WH9Bmvr6eZIhQP/JXfZdqL9LWOrPXhhQ8FJtlPSVV0kRXDud9RssDQUFYC1zo4XsNxh9EnZgO/VPTNTBzw=="
              }
            }
          ]
        }
      },
      "package": {
        "ecosystem": "npm",
        "name": "@sql-trigger/nodesql"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": [
        "1.0.1",
        "1.0.0"
      ]
    }
  ],
  "aliases": [
    "GHSA-9f9w-wg5j-m53j"
  ],
  "credits": [
    {
      "contact": [
        "inspector-research@amazon.com"
      ],
      "name": "Amazon Inspector",
      "type": "FINDER"
    }
  ],
  "database_specific": {
    "malicious-packages-origins": [
      {
        "id": "IN-MAL-2026-004942",
        "import_time": "2026-06-09T16:59:43.549497061Z",
        "modified_time": "2026-06-09T15:46:48Z",
        "sha256": "39e37d95fb040c83277583e2bf90b56363f86360337f1c30e63c85eb56579ada",
        "source": "amazon-inspector",
        "versions": [
          "1.0.1"
        ]
      },
      {
        "id": "IN-MAL-2026-006142",
        "import_time": "2026-06-12T19:44:12.764293786Z",
        "modified_time": "2026-06-12T19:09:53Z",
        "sha256": "df686aa903ce47ad4414266558600486e522e7ad0bf4e5876018ef24bca1d1a3",
        "source": "amazon-inspector",
        "versions": [
          "1.0.0"
        ]
      },
      {
        "id": "GHSA-9f9w-wg5j-m53j",
        "import_time": "2026-07-03T16:45:59.760638744Z",
        "modified_time": "2026-07-03T15:59:15Z",
        "ranges": [
          {
            "events": [
              {
                "introduced": "0"
              }
            ],
            "type": "SEMVER"
          }
        ],
        "sha256": "af206fa9674f6676548fa54503b38eaa9a0cd31b267e4b7a39598bfde93c0e54",
        "source": "ghsa-malware"
      }
    ]
  },
  "details": "\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (39e37d95fb040c83277583e2bf90b56363f86360337f1c30e63c85eb56579ada)\nThe package advertises itself as a simple SQL helper but its main entry index.js is heavily obfuscated (obfuscator.io string-array + RC4 + base64, 218-entry shuffled literal array, two RC4 decoders) with no human-readable logic. After deobfuscation, the top-level IIFE requires os/fs/path/child_process/axios, installs uncaughtException and unhandledRejection handlers to suppress errors, then assembles an IPv4 address at runtime by concatenating four numeric octets with \u0027.\u0027, issues an axios HTTP GET to that host, writes the response body into os.tmpdir() with flag \u0027w+\u0027, and invokes child_process exec/spawn on the written file with windowsHide:true and cwd set to the tmp directory. This is a generic remote-binary dropper: the destination is mutable, the payload is opaque and unverified, the URL is built at runtime to evade static scanners, and the fetched file is unrelated to any SQL functionality. The dropper fires the moment any consumer require()s the package, so installing this dependency results in attacker-controlled code being downloaded to and executed from the consumer\u0027s temp directory.\n\n## Source: ghsa-malware (af206fa9674f6676548fa54503b38eaa9a0cd31b267e4b7a39598bfde93c0e54)\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-5395",
  "modified": "2026-07-03T16:47:39Z",
  "published": "2026-06-09T15:46:48Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/@sql-trigger/nodesql/v/1.0.1"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/@sql-trigger/nodesql/v/1.0.0"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-9f9w-wg5j-m53j"
    }
  ],
  "schema_version": "1.7.4",
  "summary": "Malicious code in @sql-trigger/nodesql (npm)"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

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…