{"id":"MAL-2026-10184","revision":"c7fb3a5c2c0b4f64aa22ed158cbee02b","records":[{"revision":"c7fb3a5c2c0b4f64aa22ed158cbee02b","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-10184","aliases":[],"title":"Malicious code in mongoose-schema-unique (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (7e3806417e775917428aeea0eb50ecbfec0bc2220282bee33f4138ff43e80dca)\nindex.js runs an async IIFE at module load that performs an outbound fetch to https://www.jsonkeeper.com/b/XVHGD (an anonymous, mutable, public JSON-paste service) and forwards the response's `data.data` field to a worker thread via `worker.postMessage({ type: 'RUN_ERROR_THREAD', payload: data.data })`. The referenced worker module (`./worker-singleton`) is not present in the tarball. Every `require('mongoose-schema-unique')` triggers this fetch, and the paste host lets whoever controls the paste ID substitute new content at any time without a package release, so the payload dispatched into worker execution is attacker-mutable. The behavior is unrelated to the package's documented purpose (a Mongoose uniqueness-validation plugin). The 4.0.3 release also changes the repository URL to a new `mongoose-schema-unique/mongoose-schema-unique` GitHub org while keeping the original author metadata and jumps the major version with a `mongoose ^8` peer dependency — consistent with a name/maintainer takeover of an established package used to ship an import-time remote-code delivery channel to downstream installers.\n","state":0,"publishedAt":"2026-07-10T22:42:27+00:00","modifiedAt":"2026-07-10T23:01:53.968826+00:00","affected":[{"ecosystem":"npm","name":"mongoose-schema-unique","ranges":[],"versions":["4.0.4","4.0.3","4.0.2"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/mongoose-schema-unique/v/4.0.4","https://www.npmjs.com/package/mongoose-schema-unique/v/4.0.3","https://www.npmjs.com/package/mongoose-schema-unique/v/4.0.2"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-10184","license":"OSV · upstream source license applies","key":"osv:MAL-2026-10184","identifiers":["MAL-2026-10184"]},"retained":false,"historicalAffected":[]}],"coverage":[]}