{"id":"MAL-2026-13733","revision":"2fe471f7c5334c66b6c1bb8987cd03d6","records":[{"revision":"2fe471f7c5334c66b6c1bb8987cd03d6","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-13733","aliases":[],"title":"Malicious code in newtun (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (adc90e76cf26bdb3145704cfb477f3a5215670556d03ff2959dde595a8bb0598)\nThe newtun CLI opens a plaintext WebSocket to the hardcoded server pull.7ii.win:7999 and hands the remote peer complete control of the installer's host. On TERM_OPEN messages the client calls pty.spawn(shell,...) and pipes server-supplied bytes (base64-decoded) directly into term.write(), giving the remote server an interactive PTY shell as the process user. SCRIPT_LIST/POLICY_SCRIPTS messages pass server-controlled string content to child_process.exec() and return stdout/stderr/exit code back over the same socket. FILE_REQUEST messages dispatch fs.readdirSync / readFileSync / writeFileSync / unlinkSync / rmSync / renameSync / mkdirSync against server-supplied paths, with file contents shipped back base64-encoded (up to 10MB per read) — allowing the operator to exfiltrate ~/.ssh, ~/.aws, and other installer secrets and to plant or delete files anywhere the process user can write. Every 5 seconds the client also sends MONITOR frames carrying hostname, OS type/release, arch, Node version, CPU/memory/load, uptime, and /proc/net/dev RX/TX rates; the initial authenticate frame carries os.hostname(), os.type/release/arch, and process.version. An UPGRADE control message causes the client to run `npm update -g newtun` and relaunch, letting the remote server swap the globally installed binary for any future published version without user interaction. The transport is unauthenticated plain ws:// so any on-path party can also drive these primitives.\n","state":0,"publishedAt":"2026-08-11T12:19:28+00:00","modifiedAt":"2026-08-11T12:30:11.1226054+00:00","affected":[{"ecosystem":"npm","name":"newtun","ranges":[],"versions":["1.0.20","1.0.14","1.0.18","1.0.25","1.0.12","1.0.26","1.0.21","1.0.1","1.0.13","1.0.8","1.0.27","1.0.16","1.0.24","1.0.11","1.0.17","1.0.23","1.0.19","1.0.2","1.0.0","1.0.3","1.0.15","1.0.22"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/newtun/v/1.0.20","https://www.npmjs.com/package/newtun/v/1.0.14","https://www.npmjs.com/package/newtun/v/1.0.18","https://www.npmjs.com/package/newtun/v/1.0.25","https://www.npmjs.com/package/newtun/v/1.0.12","https://www.npmjs.com/package/newtun/v/1.0.26","https://www.npmjs.com/package/newtun/v/1.0.21","https://www.npmjs.com/package/newtun/v/1.0.1","https://www.npmjs.com/package/newtun/v/1.0.13","https://www.npmjs.com/package/newtun/v/1.0.8","https://www.npmjs.com/package/newtun/v/1.0.27","https://www.npmjs.com/package/newtun/v/1.0.16","https://www.npmjs.com/package/newtun/v/1.0.24","https://www.npmjs.com/package/newtun/v/1.0.11","https://www.npmjs.com/package/newtun/v/1.0.17","https://www.npmjs.com/package/newtun/v/1.0.23","https://www.npmjs.com/package/newtun/v/1.0.19","https://www.npmjs.com/package/newtun/v/1.0.2","https://www.npmjs.com/package/newtun/v/1.0.0","https://www.npmjs.com/package/newtun/v/1.0.3","https://www.npmjs.com/package/newtun/v/1.0.15","https://www.npmjs.com/package/newtun/v/1.0.22"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-13733","license":"OSV · upstream source license applies","key":"osv:MAL-2026-13733","identifiers":["MAL-2026-13733"]},"retained":false,"historicalAffected":[]}],"coverage":[]}