VYPR

npm · Malicious package advisory

Malware

analytics-widget

GHSA-xpv4-prm5-w6gr

Malicious code in analytics-widget (npm)

Details

**Severity:** Critical

**Affected versions:** `= 1.0.0`

## 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.

---

Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/fbd69de639befa276507689652dc04f12c5ef5cb/osv/malicious/npm/analytics-widget/MAL-2026-17163.json))

**References:**
- https://github.com/ossf/malicious-packages/blob/fbd69de639befa276507689652dc04f12c5ef5cb/osv/malicious/npm/analytics-widget/MAL-2026-17163.json
- https://www.npmjs.com/package/analytics-widget/v/1.0.0
- https://www.npmjs.com/package/analytics-widget/v/1.0.1
- https://github.com/advisories/GHSA-xpv4-prm5-w6gr

Compromised versions (1)

  • = 1.0.0

Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.