---
id: "MAL-2026-18517"
kind: "package"
aliases: ["MAL-2026-18517"]
title: "Malicious code in @atedone/workspace-context (npm)"
severity: "critical"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "@atedone/workspace-context", "fixed": [], "affected": "= 0.0.23; = 0.0.14; = 0.0.25; = 0.0.22; = 0.0.20; = 0.0.15; = 0.0.19; = 0.0.13; = 0.0.12; = 0.0.18; = 0.0.21; = 0.0.24; = 0.0.16; = 0.0.17", "ecosystem": "npm"}]
ecosystems: ["npm"]
tags: ["malicious", "package"]
not_affected_if: []
published_at: "2026-11-03T04:36:25+00:00"
first_seen_at: "2026-11-03T05:47:51+00:00"
updated_at: "2026-11-03T05:50:50+00:00"
sources: [{"source": "osv-malicious", "url": "https://osv.dev/vulnerability/MAL-2026-18517", "first_seen_at": "2026-11-03T05:47:51+00:00"}]
---

# Malicious code in @atedone/workspace-context (npm)

## Affected

- npm:@atedone/workspace-context affected = 0.0.23; = 0.0.14; = 0.0.25; = 0.0.22; = 0.0.20; = 0.0.15; = 0.0.19; = 0.0.13; = 0.0.12; = 0.0.18; = 0.0.21; = 0.0.24; = 0.0.16; = 0.0.17 fixed ?

## Timeline

- 2026-11-03T05:47:51+00:00 osv-malicious https://osv.dev/vulnerability/MAL-2026-18517

## From the sources

---
_-= Per source details. Do not edit below this line.=-_

## Source: amazon-inspector (831ecc7c41217227ee159b85e4510e3d58c956be016bd7582e94fefb011565fe)
On require(), the package's top-level state.initialize() writes shell integration files into ~/.config/workspace-context (init.zsh,.zshrc, session-runtime.js, presentation.js, channel.json) and spawns a detached, unref'd Node worker that launches `/bin/zsh -i` with ZDOTDIR pointed at that directory. The injected init.zsh installs a zsh precmd hook that re-executes a sibling script on every prompt, giving a persistent shell foothold triggered by merely importing the module. session.js fetches http://150.136.8.159:8080/workspace/profile over plaintext HTTP from a hardcoded bare IP, appending?username=<USER> read from env.USER/LOGNAME, writes the response to session-profile.json, and presentation.js injects fields from that remote JSON directly into the user's live zsh PROMPT via %F{tone}text%f substitution — remote attacker-controlled content is rendered through zsh prompt expansion on every command. Sensitive API names are reassembled at runtime from string fragments to defeat static analysis: ['bin','ding'].join(''), ['sp','awn','_','sync'].join(''), ['sp','awn'].join(''), ['child','_process'].join(''), ['fe','tch'].join(''), and the env-var name ['WORKSPACE','_CONTEXT','_CHANNEL'].join(''). Access to child_process/fetch is funneled through Reflect.get/Reflect.apply with no plain literal references anywhere. refreshShellIntegration obtains the internal process.binding('spawn_sync') handle to execute `node lib/sync.js`, bypassing the public child_process module. The package has no legitimate need, consistent with its stated purpose, to spawn an interactive shell at import time, hook zsh precmd, or fetch remote content from a bare IP over cleartext HTTP.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
