{"id":"MAL-2026-17724","summary":"Malicious code in @galicia-toolkit-nestjs/swagger (npm)","details":"@galicia-toolkit-nestjs/swagger is a dependency confusion package published to npm on 2026-10-09 by the account s4yhii__, targeting the internal @galicia-toolkit-* / @brick-v2 package namespaces with inflated versions (e.g. 999.0.x). Early versions resolve \u003chostname\u003e.\u003ctag\u003e.dc.oob.s4yhii.com via DNS to beacon the victim's hostname. Later versions run `node index.js` from a preinstall hook, which loads a bundled native addon (prebuilds/\u003cplatform\u003e-\u003carch\u003e/metrics.node, Linux and Windows builds). The addon forks a detached process that collects hostname, username, OS/arch, cwd and the full values of CI/cloud secrets from environment variables (NPM_TOKEN, NODE_AUTH_TOKEN, GITHUB_TOKEN, ACTIONS_RUNTIME_TOKEN, ACTIONS_ID_TOKEN_REQUEST_TOKEN, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, SYSTEM_ACCESSTOKEN, AZURE_DEVOPS_EXT_PAT and others) and sends them as JSON via HTTP POST /native to oob.s4yhii.com:9999.\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (605d8d8afe172d78840f3617c35733b47635a3482beba461bc1015c45840e250)\nThe package presents itself as a NestJS Swagger integration (name resembles @nestjs/swagger, published at version 999.0.2 in a dependency-confusion shape) but ships a stub JavaScript API (forRoot/createLogger returning empty) that, on require(), loads a prebuilt native addon at prebuilds/\u003cplatform\u003e-\u003carch\u003e/metrics.node inside a try/catch that silently swallows errors. The native binary reads credential-grade environment variables including AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, GITHUB_TOKEN, NPM_TOKEN, NODE_AUTH_TOKEN, and ACTIONS_ID_TOKEN_REQUEST_TOKEN, collects host identity (hostname, uid via getpwuid/getuid, cwd, uname/release, arch, and the package tag passed in via _METRICS_PKG), formats a JSON payload, and sends it over a raw socket (gethostbyname+connect+send, HTTP/1.0 POST /native) to the hardcoded host oob.s4yhii.com. The loader daemonizes via fork+setsid to persist beyond the parent process. On any npm install followed by import/require of this package in a build pipeline, cloud credentials, GitHub Actions OIDC tokens, and npm publish tokens leave the host to an attacker-controlled endpoint.\n","modified":"2026-10-12T05:30:06.992255807Z","published":"2026-10-09T00:00:00Z","database_specific":{"iocs":{"urls":["http://oob.s4yhii.com:9999/native"],"domains":["oob.s4yhii.com"],"files":[{"source":"PACKAGE_ARCHIVE","note":"Loader: DNS hostname beacon to *.dc.oob.s4yhii.com, or loads the native exfiltration addon (run via preinstall).","paths":["index.js"]},{"source":"PACKAGE_ARCHIVE","note":"Native addon that exfiltrates host info and CI/cloud secret env vars to oob.s4yhii.com:9999.","paths":["prebuilds/linux-x64/metrics.node","prebuilds/win32-x64/metrics.node"]}]},"malicious-packages-origins":[{"versions":["999.0.3"],"id":"IN-MAL-2026-021285","import_time":"2026-10-09T13:46:16.777132782Z","modified_time":"2026-10-09T13:35:21Z","sha256":"51d6d85fe98ec0559234e8941f7aa7a2d510233e06277b6c9c576bee6bb65c6b","source":"amazon-inspector"},{"import_time":"2026-10-09T13:46:18.220179924Z","modified_time":"2026-10-09T13:37:50Z","sha256":"605d8d8afe172d78840f3617c35733b47635a3482beba461bc1015c45840e250","source":"amazon-inspector","versions":["999.0.2"],"id":"IN-MAL-2026-021301"},{"sha256":"efeac3bd0d0687def2fa2b9584ca55516aad57a2c94979ef07c26ac48b9f6d20","source":"amazon-inspector","versions":["999.0.1"],"id":"IN-MAL-2026-021318","import_time":"2026-10-09T13:46:19.532740299Z","modified_time":"2026-10-09T13:40:21Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/@galicia-toolkit-nestjs/swagger/v/999.0.3"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@galicia-toolkit-nestjs/swagger/v/999.0.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@galicia-toolkit-nestjs/swagger/v/999.0.1"},{"type":"WEB","url":"https://www.npmjs.com/package/@galicia-toolkit-nestjs/swagger"}],"affected":[{"package":{"name":"@galicia-toolkit-nestjs/swagger","ecosystem":"npm","purl":"pkg:npm/%40galicia-toolkit-nestjs/swagger"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["999.0.3","999.0.2","999.0.1"],"database_specific":{"indicators":{"package_integrity":[{"filename":"swagger-999.0.3.tgz","hashes":{"sha1":"f355ac370a79d036aa4b8b7f904e256bccf9d9ef","sha512_sri":"sha512-MSF3+JOJkcIGGcoALanaiVS6cvu7xOGRbCUQapyVZz3BRH5AkgKOHPu7olOc12jVHm2nE557YXTGP5l0qL24Hw=="}}],"evidence_files":[{"tlsh":"a472211eb669ca3fc4988334288bc67461f17470bb33e2133b9157bb2d9168c4675f46","path":"prebuilds/linux-x64/metrics.node","sha256":"cb1f098fbee6dfae8ebfdba07446d8fef1745080ed3bb5fc6579c4e854bfae10"},{"sha256":"50c7376d0a31c673fdb3cddd7b7d41a035423b7e5da1a34a3fc44a46aa4ee739","tlsh":"a2c012b899215c3a1a105f99bd566c5951ea01a55188881841a24330d1e6fb841ce12f","path":"package.json"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@galicia-toolkit-nestjs/swagger/MAL-2026-17724.json","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"},{"name":"Embedded Malicious Code","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."}]}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"SafeDep","contact":["https://safedep.io"],"type":"FINDER"}]}