Is koala73/worldmonitor safe?
Get notified when this component changes
Change alerts aren't live yet. Leave your email and we'll let you know when they launch. We use it only for this and delete it on request.
- Node.js shell/command execution
- Possible command injection (exec with dynamic command)
- npm install-time lifecycle hook
What to do: Read the findings below before installing: each one opens the exact line of code it was found on.
koala73/worldmonitor is an MCP server analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators, though 2 risky constructs are reported for review. It can: delegated authentication, dynamic code execution, filesystem read, filesystem write, install time execution, mcp tools detected, network egress and shell execution — capabilities are what the code can do, not a verdict on intent. Risk score 30/100 (medium).
world-monitor 2.10.0
Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of koala73/worldmonitor's authors. Report a false positive.
Behavioral traits
How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.
Findings (15)
The code builds an OS command out of values that can change at runtime, then runs it through a shell.
const out = execSync(
`git diff --unified=0 origin/main...HEAD -- "${filePath}"`,const out = execSync(
`find ${TARGET_DIRS.join(' ')} -type f \\( -name '*.ts' -o -name '*.tsx' -o -name '*.mjs' -o -name '*.js' \\) -not -path '*/node_modules/*' -not -path '*/_generated/*'`,const out = execSync(`grep -rnE "${PAT}" --include="*.ts" --include="*.js" src api convex server 2>/dev/null || true`, { encoding: 'utf8', maxBuffer: 1 << 26 });Why it matters: If any of those values come from untrusted input, an attacker can run their own commands on the machine.
Fix: Use execFile/spawn with an argument array instead of exec; never build a shell command string from external input.
The code turns strings into live code at runtime (eval / new Function / exec).
const blockNeedle = 'eval("var res = [';const arrayOpen = start + 'eval("var res = '.length; // points at `[`Why it matters: If those strings aren't fixed and trusted, they become a way to run arbitrary code.
Fix: Avoid evaluating dynamically constructed code; if unavoidable, ensure the input is a trusted constant and never derived from external data.
package.json runs scripts automatically when the package is installed.
"postinstall": "npm run inventory:facts",
Why it matters: Install scripts are a favorite supply-chain foothold — they execute on every machine that installs the package.
Fix: Inspect the hook command. Install-time scripts are a common supply chain execution vector; ensure they do nothing beyond a documented build step.
An MCP tool exposes a powerful capability (files, shell, network, browser, or credentials).
"name": "query_docs_filesystem_world_monitor",
"name": "get_economic_data",
"name": "get_cross_border_arrivals",
"name": "get_imd_cyclone_marine",
"name": "get_hotspot_escalation",
Why it matters: Wired into an agent, these grant it real access to your machine — confirm each is required.
Fix: Confirm each powerful tool is required and constrained; broad MCP tools (shell/filesystem/network) grant an agent significant host access.
A hardcoded credential (API key, token, or private key) is shipped in the code.
const FREE_MAP_PANEL_ACCESS_KEY = 'worl…[redacted, 37 chars]';
Why it matters: Anyone who gets the package gets the secret — rotate it and load secrets at runtime instead.
Fix: Remove the secret from the code, rotate it immediately, and load credentials from the environment or a secrets manager at runtime.
The component can run operating-system commands or spawn processes.
import { spawnSync } from 'node:child_process';const result = spawnSync('npm', ['audit', '--omit=dev', '--json'], { cwd, encoding: 'utf8' });return spawnSync('git', args, { encoding: 'utf8' });import { spawnSync } from 'node:child_process';import { spawnSync } from 'node:child_process';import { execFileSync } from 'node:child_process';import { spawn } from 'node:child_process';const child = spawn(process.execPath, [...nodeArgs, scriptPath], {import { spawnSync } from 'node:child_process';const result = spawnSync('gh', args, {import { execFileSync } from 'node:child_process';raw = exec('curl', args, {const { spawn } = require('node:child_process');import { spawnSync } from 'node:child_process';import { spawnSync } from 'node:child_process';const { execFile } = require('child_process');const { execFileSync } = require('child_process');import { execSync } from 'node:child_process';return execSync('git rev-parse HEAD', { cwd: REPO_ROOT, stdio: ['ignore', 'pipe', 'ignore'] })import { spawnSync } from 'node:child_process';const result = spawnSync(
const result = spawnSync('npm', args, {import { execFileSync } from 'node:child_process';import { execFileSync } from 'node:child_process';import { execSync } from 'node:child_process';Why it matters: Powerful and often legitimate — confirm the commands aren't built from untrusted input.
Fix: Confirm the command and its arguments are fully controlled and not derived from untrusted input; prefer execFile with an argument array.
A server is bound to all network interfaces (0.0.0.0), not just your own machine.
return requestId.includes('::') ? requestId.split('::', 1)[0] : null;const host = process.env.HOST ?? '0.0.0.0';
server.listen(PORT, '0.0.0.0', () => {['0.0.0.0', 8], // "this" network
Why it matters: Without authentication, other hosts on the network can reach it.
Fix: Bind to 127.0.0.1 for local-only use, or require authentication and restrict access if remote exposure is intended.
The component reads files from disk.
const src = fs.readFileSync(filePath, 'utf8');
const src = fs.readFileSync(filePath, 'utf8');
const src = fs.readFileSync(CATALOG_PATH, 'utf8');
raw = await fs.readFile(filePath, 'utf8');
const raw = await fs.readFile(path.resolve(REPO_ROOT, FIXTURE_PATH), 'utf8');
const raw = await fs.readFile(path.resolve(REPO_ROOT, BASELINE_PATH), 'utf8');
const existing = JSON.parse(fs.readFileSync(existingPath, 'utf8'));
const geojson = JSON.parse(fs.readFileSync(geojsonPath, 'utf8'));
return JSON.parse(await fs.readFile(filePath, 'utf8'));
const { rows: golden } = JSON.parse(fs.readFileSync(file, 'utf8'));const golden = args.golden ? JSON.parse(fs.readFileSync(args.golden, 'utf8')) : null;
const snapshot = JSON.parse(await fs.readFile(path.join(REPO_ROOT, relativePath), 'utf8'));
await fs.readFile(path.join(REPO_ROOT, 'shared', 'crawlable-crises.json'), 'utf8'),
await fs.readFile(path.join(rootDir, 'docs', 'snapshots', filename), 'utf8'),
const sourceText = await fs.readFile(RESILIENCE_SCORER_PATH, 'utf8');
resilienceCacheKeysPromise ||= fs.readFile(
const raw = await fs.readFile(path.join(REPO_ROOT, 'shared', 'country-names.json'), 'utf8');
const snapshot = JSON.parse(await fs.readFile(LEGACY_COUNTRY_SNAPSHOT_PATH, 'utf8'));
const fileContent = await fs.readFile(targetFile, 'utf-8');
const geojson = JSON.parse(fs.readFileSync(path.join(root, 'public', 'data', 'countries.geojson'), 'utf8'));
const geojson = JSON.parse(fs.readFileSync(path.join(root, 'public', 'data', 'countries.geojson'), 'utf8'));
// Implementation: reads via fs.readFileSync (rather than ES JSON
// fs.readFileSync (so seeders can run under plain `node`); this .ts
Why it matters: Usually legitimate, but worth confirming it can't be steered into reading sensitive files.
Fix: Confirm which files are read and that paths cannot be influenced by untrusted input to reach sensitive locations.
The component writes or deletes files on disk.
fs.writeFileSync(tmpPath, payload, 'utf8');
await fs.writeFile(path.resolve(REPO_ROOT, OUT_PATH), md, 'utf8');
fs.writeFileSync(existingPath, JSON.stringify(sorted, null, 2) + '\n');
await fs.writeFile(outPath, `${JSON.stringify(artifact, null, 2)}\n`, 'utf8');fs.writeFileSync(args.golden, `${JSON.stringify(golden, null, 1)}\n`);if (args.out) fs.writeFileSync(args.out, JSON.stringify(report, null, 2));
await fs.writeFile(outPath, `${JSON.stringify(snapshot, null, 2)}\n`, 'utf8');await fs.writeFile(outPath, `${JSON.stringify(snapshot, null, 2)}\n`, 'utf8');await fs.writeFile(temporaryTarget, updatedContent, 'utf-8');
fs.writeFileSync(out, JSON.stringify(sorted, null, 2) + '\n');
fs.writeFileSync(path.join(root, 'scripts', 'shared', 'country-bboxes.json'), JSON.stringify(sorted, null, 2) + '\n');
fs.writeFileSync(jsOut, jsLines.join('\n'));fs.writeFileSync(dtsOut, dtsLines.join('\n'));fs.writeFileSync(out3to2, JSON.stringify(sorted3to2, null, 2) + '\n');
fs.writeFileSync(out2to3, JSON.stringify(sorted2to3, null, 2) + '\n');
fs.writeFileSync(jsOut2to3, js2to3.join('\n'));fs.writeFileSync(dtsOut2to3, dts2to3.join('\n'));await fs.writeFile(outPath, JSON.stringify(aggregate, null, 2), 'utf8');
fs.writeFileSync(overflowPath, '', { flag: 'wx', mode: 0o600 });Why it matters: Usually legitimate, but worth confirming the paths can't be controlled by untrusted input.
Fix: Confirm which files are written/deleted and that paths cannot be influenced by untrusted input.
The component reads files from disk.
with open(path) as f:
data = json.loads(source.read_text(encoding="utf-8"))
actual = target.read_text(encoding="utf-8") if target.exists() else ""
Why it matters: Usually legitimate, but worth confirming it can't be steered into reading sensitive files.
Fix: Confirm which files are read and that paths cannot be influenced by untrusted input to reach sensitive locations.
The component writes or deletes files on disk.
target.write_text(expected, encoding="utf-8", newline="\n")
Why it matters: Usually legitimate, but worth confirming the paths can't be controlled by untrusted input.
Fix: Confirm which files are written/deleted and that paths cannot be influenced by untrusted input.
The component makes outbound network requests.
response = await client.fetch(
res = await fetch(RELEASES_URL, {const response = await fetch(url, {const resp = await fetch(`${creds.url}/get/${encodeURIComponent(key)}`, {return await fetch(url, { ...options, signal: controller.signal });"api.axios.com",
"www.axios.com",
const res = await fetch(_envelopeUrl, {* envelope format, stack parsing, and fire-and-forget fetch (with
const resp = await fetch(`${creds.url}/pipeline`, {const resp = await fetch(`${url}/get/${encodeURIComponent(raw ? key : applyRedisKeyPrefix(key))}`, {const resp = await fetch(`${url}/get/${encodeURIComponent(raw ? key : applyRedisKeyPrefix(key))}`, {const resp = await fetch(`${creds.url}/pipeline`, {const response = await fetch(AXIOM_INGEST_URL, {resp = await fetch(`${config.siteUrl}${path}`, {const res = await fetch(`${convexSiteUrl}/relay/followed-countries`, {const resp = await fetch(`${creds.url}/pipeline`, {const resp = await fetch(
fetch: (...args) => globalThis.fetch(...args),
const resp = await createCheckoutDeps.fetch(`${CONVEX_SITE_URL}/relay/create-checkout`, {const resp = await fetch(`${CONVEX_SITE_URL}/relay/customer-portal`, {const res = await fetch(`${UPSTASH_URL}/getdel/${encodeURIComponent(key)}`, {await fetch(`${UPSTASH_URL}/lpush/wm:events:queue/${encodeURIComponent(msg)}`, {const tokenRes = await fetch('https://discord.com/api/oauth2/token', {const convexRes = await fetch(`${CONVEX_SITE_URL}/relay/notification-channels`, {Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.
Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.
The component makes outbound network requests.
import urllib.request
req = urllib.request.Request(
request["url"],
data=request.get("body"),
headers=request.get("headers") or {},
method=request.get("method", "GET"),
)with urllib.request.urlopen(req, timeout=timeout) as res:
url += "?" + urllib.parse.urlencode({k: _stringify(v) for k, v in query.items()})Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.
Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.
An OAuth 2.0 / OpenID Connect delegated-authentication flow was detected (authorization-code / refresh-token / token-exchange grant, an OIDC authorize/discovery endpoint or id_token, or a delegation library). Tools authenticate with the end user's delegated, scoped credentials rather than a long-lived embedded service credential. (25 occurrence(s) shown as evidence).
* - U5 `api/oauth/authorize-pro.ts` — verifies the grant on the api
* `api/oauth/token.js` after U5's `/oauth/authorize-pro` flow): a JSON
grant_type: 'authorization_code',
const oauthUrl = new URL('https://discord.com/oauth2/authorize');// The decision is shared with mcp-grant-mint.ts and oauth/authorize-pro.ts
* `api.worldmonitor.app/oauth/authorize-pro` (U5).
* JSON `{nonce}` (nonce minted by `api/oauth/authorize.js` andconst AUTHORIZE_PRO_URL = 'https://api.worldmonitor.app/oauth/authorize-pro';
// written by api/oauth/authorize.js and api/oauth/register.js with NO
// Shared with mcp-grant-context.ts and oauth/authorize-pro.ts
// claim's exp, so `/oauth/authorize-pro` strictly compares them
// the EXISTING claim's exp so `/oauth/authorize-pro`'s strict tuple
* interactive `/oauth/authorize` consent ties the issued token to whoever signs
authorization_endpoint: `${origin}/oauth/authorize`,// RFC 9207: /oauth/authorize and /oauth/authorize-pro append `iss` to the
claim_uri: `${origin}/oauth/authorize`,claim_uri: `${origin}/oauth/authorize`,// ChatGPT: the stable callback requires RFC 9207 `iss` (api/oauth/authorize.js)
// (api/oauth/authorize.js, api/internal/mcp-grant-context.ts). A custom-scheme
* GET /oauth/authorize-pro
* `api/oauth/authorize.js`. One-shot — replay fails on the second hit.
/** OAuth authorization-code TTL — matches `api/oauth/authorize.js:10`. */
* `api/oauth/authorize.js::htmlError` (line 89). Kept identical so the
* English copy (matching `api/oauth/authorize.js::htmlError`), so it is not
// Redis helpers — match the on-the-wire format used by api/oauth/authorize.js
Fix: Delegated auth is a lower-blast-radius execution context than an embedded static credential. Confirm the requested scopes are minimal and that tokens are never logged or forwarded off-host.
An MCP tool surface (manifest or tool definitions) was found.
"mcpServers": {"tools": true,
"tools": true,
registration = provider.registerTool(tool, { signal: controller.signal });Why it matters: Just context — review which tools it offers and their permissions.
Fix: Review the declared MCP tools and their permissions.
How attackers abuse these capabilities
Interactive labs on the attack class behind the rules above. They show the technique, not anything found in koala73/worldmonitor.
Check your own component
Run the same evidence-backed scan on any MCP server, agent skill, or package.
Scan your own componentHow we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →