MAL-2026-17163
Vulnerability from ossf_malicious_packages
Published
2026-09-24 14:53
Modified
2026-09-24 15:20
Summary
Malicious code in analytics-widget (npm)
Details

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

Source: amazon-inspector (4b78f3ed716380da74c5d54de6e24b6b128536a7ce5772e8b05d03108a1d9b74)

The package is published as 'analytics-widget' with an empty description, but its main module contains no analytics functionality. On load, index.js schedules a 2-second timer that reads the 'token' key from browser localStorage, falls back to a JSON serialization of the entire localStorage store if that key is missing, and POSTs the result to the relative endpoint '/addPost' via fetch. When bundled into a consumer's frontend, every end-user session that loads the page has their auth token (or the full localStorage contents) sent to whichever origin serves the bundle, enabling session hijacking of the consuming application's users. The package name and empty metadata serve as a cover story; no legitimate analytics code is present.

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": "775898de2fc58b3a5f8988282921e41803227599568a3840c86cb518501f7986",
              "tlsh": "69d02b93146a68019b79d9fa1cf1e03816354419b0ab48a02dd2848d1fceb0c53b60c8"
            },
            {
              "path": "package.json",
              "sha256": "99b436357d60930761c6dc23d536a0b458cc914ab042f8a3d8fedf393668728c",
              "tlsh": "94d0a7145a22943305c152620d1a8443b360cf5f10407c0c57cf581c42cf6b35dfa30c"
            }
          ],
          "package_integrity": [
            {
              "filename": "analytics-widget-1.0.0.tgz",
              "hashes": {
                "sha1": "c1a7fbcca75159b1a8358ee195a42362e3b3afe9",
                "sha512_sri": "sha512-+ENqAVm/OQj2qYXMhxFcGWvdaAiXehSaLCHqLWFwpTAeiUiDJJ8byQ3LN7jrqxPsArRdnBwV/eCeolAQUbnCiw=="
              }
            }
          ]
        }
      },
      "package": {
        "ecosystem": "npm",
        "name": "analytics-widget"
      },
      "versions": [
        "1.0.0",
        "1.0.1"
      ]
    }
  ],
  "credits": [
    {
      "contact": [
        "inspector-research@amazon.com"
      ],
      "name": "Amazon Inspector",
      "type": "FINDER"
    }
  ],
  "database_specific": {
    "malicious-packages-origins": [
      {
        "id": "IN-MAL-2026-020518",
        "import_time": "2026-09-24T15:18:50.041207129Z",
        "modified_time": "2026-09-24T14:54:07Z",
        "sha256": "4b78f3ed716380da74c5d54de6e24b6b128536a7ce5772e8b05d03108a1d9b74",
        "source": "amazon-inspector",
        "versions": [
          "1.0.0"
        ]
      },
      {
        "id": "IN-MAL-2026-020517",
        "import_time": "2026-09-24T15:18:49.928282524Z",
        "modified_time": "2026-09-24T14:53:59Z",
        "sha256": "82d3b7c57f6ef962fd5de4bb10adaaacac2c030aa5598c173aba084c37633c2c",
        "source": "amazon-inspector",
        "versions": [
          "1.0.1"
        ]
      }
    ]
  },
  "details": "\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (4b78f3ed716380da74c5d54de6e24b6b128536a7ce5772e8b05d03108a1d9b74)\nThe package is published as \u0027analytics-widget\u0027 with an empty description, but its main module contains no analytics functionality. On load, index.js schedules a 2-second timer that reads the \u0027token\u0027 key from browser localStorage, falls back to a JSON serialization of the entire localStorage store if that key is missing, and POSTs the result to the relative endpoint \u0027/addPost\u0027 via fetch. When bundled into a consumer\u0027s frontend, every end-user session that loads the page has their auth token (or the full localStorage contents) sent to whichever origin serves the bundle, enabling session hijacking of the consuming application\u0027s users. The package name and empty metadata serve as a cover story; no legitimate analytics code is present.\n",
  "id": "MAL-2026-17163",
  "modified": "2026-09-24T15:20:43Z",
  "published": "2026-09-24T14:53:59Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/analytics-widget/v/1.0.0"
    },
    {
      "type": "PACKAGE",
      "url": "https://www.npmjs.com/package/analytics-widget/v/1.0.1"
    }
  ],
  "schema_version": "1.7.4",
  "summary": "Malicious code in analytics-widget (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…