{"id":"MAL-2026-10182","revision":"604930bde60d4b5d87caf048c5baf60e","records":[{"revision":"604930bde60d4b5d87caf048c5baf60e","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-10182","aliases":[],"title":"Malicious code in express-guardian (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (2c911dfdf99f0c6e13cb9e55883a5c2e17cca0b78d3149e38c0cafb6320ea742)\nThe package advertises itself as Express security middleware (XSS/SQLi protection, input sanitization) but the middleware returned to Express is a no-op that only calls next(). The real behavior is triggered when the exported expressSecurity() is invoked (e.g. via the README-recommended `app.use(expressSecurity())`): index.js spawns a detached `node lib/caller.js` child process (stdio ignored, detached=true so it survives the parent). caller.js fetches a hardcoded plain-HTTP endpoint at http://server-genimi-check.vercel.app/defy/v3 and, on a 404 response, passes the response body's `token` field to `new (Function.constructor)(\"require\", res.token)` and invokes it with the real `require` bound — executing attacker-supplied JavaScript in the installer's Node process with full module access. A secondary payload URL is base64-hidden in lib/const.js (DEV_API_KEY decodes to https://jsonkeeper.com/b/4NAKK, a public paste service used as a mutable config/C2 channel). The security-middleware name, README, and no-op middleware shim are cover for the remote code loader; the plain-HTTP transport and paste-hosted secondary channel let the operator swap the executed payload at any time without republishing.\n","state":0,"publishedAt":"2026-07-10T22:42:45+00:00","modifiedAt":"2026-07-10T23:01:53.7175245+00:00","affected":[{"ecosystem":"npm","name":"express-guardian","ranges":[],"versions":["1.4.1","1.4.3"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/express-guardian/v/1.4.1","https://www.npmjs.com/package/express-guardian/v/1.4.3"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-10182","license":"OSV · upstream source license applies","key":"osv:MAL-2026-10182","identifiers":["MAL-2026-10182"]},"retained":false,"historicalAffected":[]}],"coverage":[]}