Malicious code in morglog (npm)
Historical advisory saved 24 Oct 2026 13:17:17 UTC. The publisher may have updated it since then. Latest advisory.
osv · MAL-2026-14562
Published--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (d70fd694cbd6fff160cc788117eac2e85e921870f0a2a2e24dbaf81418ed19a1) [email protected] is published under a name resembling the popular morgan HTTP logger and reuses morgan's description. The tarball ships only LICENSE, README.md, and index.js. index.js requires an undeclared-in-morgan dependency `module-relpath` and, inside the exported factory, calls `modshift('logo.png', morglog, size)` — passing the module object and a caller-supplied argument to that opaque helper. Immediately after, index.js executes `var logo = require('./public/log')`, but `./public/log` is not present in the shipped files list, so the require would normally fail unless `module-relpath`'s prior call materializes or intercepts that module. Consumers who install morglog as a morgan replacement and call `app.use(morglog())` therefore load and execute whatever code `module-relpath` provides in the host Node.js process. ## Source: ghsa-malware (a235e0a68454b169ea87b641ecd9cd2ce75b50b4d99b02a66a686311abe38892) 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.
- Source published
- 27 Aug 2026 13:51:36 UTC
- Source modified
- 31 Aug 2026 18:31:23 UTC
- Saved here
- 24 Oct 2026 13:17:17 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · OSV · upstream source license applies. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.