registry  /  @zenith-open/zenithcms-core  /  1.0.0-beta.3

@zenith-open/zenithcms-core@1.0.0-beta.3

Zenith CMS — headless engine with REST, GraphQL, and AI tools

AI Security Review

scanned 1d ago · by lpm-firewall-ai

No confirmed malicious package behavior was found, but the CMS exposes dangerous runtime automation surfaces. Authenticated/admin or stored flow configuration can execute JavaScript-like logic and make outbound requests.

Static reason
One or more suspicious static signals were detected.; previous stored version diff introduced dangerous source
Trigger
server runtime after admin/user-created flows, onboarding, or local hooks are invoked
Impact
Potential RCE or secret exposure if an attacker can create/modify flows or onboarding state; not an install-time supply-chain payload.
Mechanism
user-configured code execution and outbound HTTP automation
Attack narrative
A privileged CMS user or attacker with write access to flow definitions could store code/conditions that run in vm contexts containing process.env and can send HTTP/webhook requests. This is a dangerous application capability and possible vulnerability surface, but inspection did not show hidden install-time execution, hardcoded attacker endpoints, or unconsented data exfiltration by the package itself.
Rationale
Static source inspection does not support the scanner's malicious verdict: the risky primitives are CMS extension/automation features and admin/CLI-invoked paths, not covert package compromise. Because flow VM execution includes env and arbitrary outbound URLs, the package should be warned rather than marked clean.
Evidence
package.jsondist/packages/core/src/services/flow-engine.jsdist/packages/core/src/api/system.jsdist/packages/core/src/cli/index.jsdist/packages/core/src/sandbox/worker-pool.jsdist/packages/core/src/sandbox/worker-runner.js../../types/src/generated.ts../../../templates/<projectType>/backend/setup.tshooks/<collectionSlug>-<hookType>.js

Decision evidence

public snapshot
AI called this Suspicious at 86.0% confidence as Dangerous Capability with medium false-positive risk.
Evidence for block
  • dist/packages/core/src/services/flow-engine.js executes database-defined flow condition/code via vm.runInContext with env in sandbox context.
  • dist/packages/core/src/services/flow-engine.js can issue HTTP/webhook/slack fetches to flow-configured URLs at runtime.
  • dist/packages/core/src/sandbox/worker-pool.js writes dist/packages/core/src/sandbox/worker-runner.js if its fallback worker content differs.
  • dist/packages/core/src/api/system.js runs npx tsx on a template setup script during admin onboarding, with one duplicate route lacking projectType validation.
Evidence against
  • package.json has no install/preinstall/postinstall lifecycle hooks.
  • CLI pnpm add path is an explicit interactive zenithcms plugins command limited to official plugin choices.
  • AI/network calls are CMS features using user-configured API keys and known providers, not hidden exfiltration endpoints.
  • Dynamic imports/requires load local cms.config, local hooks, or .zenith adapter files as documented extension points.
  • No evidence of credential harvesting, persistence outside app behavior, prompt injection, or unconsented AI-agent control-surface writes.
Behavioral surface
Source
ChildProcessCryptoDynamicRequireEnvironmentVarsFilesystemNetworkWebSocket
Supply chain
HighEntropyStringsUrlStrings
Manifest
NoLicense
scanned 413 file(s), 2.24 MB of source, external domains: accounts.google.com, api.anthropic.com, api.cohere.com, api.github.com, api.groq.com, api.mistral.ai, api.openai.com, api.together.xyz, api.x.ai, dummy-test-file-url-12345.public.blob.vercel-storage.com, fonts.googleapis.com, fonts.gstatic.com, generativelanguage.googleapis.com, github.com, integrate.api.nvidia.com, oauth2.googleapis.com, openrouter.ai, production.zenithcms.internal, storage.googleapis.com, www.googleapis.com, www.paypal.com, zenithcms.com

Source & flagged code

7 flagged · loading source
dist/packages/core/src/api/auth/sso.jsView file
36patternName = generic_password severity = medium line = 36 matchedText = password...nt',
Medium
Secret Pattern

Package contains a possible secret pattern.

dist/packages/core/src/api/auth/sso.jsView on unpkg · L36
dist/cli/index.jsView file
237const prompts = require('prompts'); L238: const { execSync } = require('child_process'); L239: console.log('\n======================================');
High
Child Process

Package source references child process execution.

dist/cli/index.jsView on unpkg · L237
dist/database/adapters/AotBridge.jsView file
30try { L31: // Convert absolute Windows paths to file:// URLs for ESM import() compatibility L32: const fileUrl = pathToFileURL(fileToLoad).href;
Medium
Dynamic Require

Package source references dynamic require/import behavior.

dist/database/adapters/AotBridge.jsView on unpkg · L30
dist/packages/core/src/services/flow-engine.jsView file
121status: 'running', L122: context: { payload, env: process.env }, L123: completedNodes: {}, ... L321: else { L322: const headers = config.headers ? JSON.parse(config.headers) : {}; L323: const body = config.body ? JSON.parse(config.body) : context.payload || context; L324: const method = config.method || 'POST'; L325: const res = await fetch(config.url, { L326: method, L327: headers: { 'Content-Type': 'application/json', ...headers }, L328: body: method !== 'GET' ? JSON.stringify(body) : undefined L329: });
Medium
Unsafe Vm Context

Package source executes code through a VM context API.

dist/packages/core/src/services/flow-engine.jsView on unpkg · L121
dist/packages/core/src/api/system.jsView file
1211try { L1212: execSync(`npx tsx ${scriptPath}`, { stdio: 'inherit' }); L1213: }
High
Runtime Package Install

Package source invokes a package manager install command at runtime.

dist/packages/core/src/api/system.jsView on unpkg · L1211
dist/packages/core/src/index.jsView file
matchType = previous_version_dangerous_delta matchedPackage = @zenith-open/zenithcms-core@1.0.0-beta.2 matchedIdentity = npm:[redacted]:1.0.0-beta.2 similarity = 0.992 summary = stored previous version shares package body but lacks this dangerous source file
Critical
Previous Version Dangerous Delta

This package version adds a dangerous source file absent from the previous stored version; route for source-aware review.

dist/packages/core/src/index.jsView on unpkg
dist/api/auth/sso.jsView file
36patternName = generic_password severity = medium line = 36 matchedText = password...nt',
Medium
Secret Pattern

Hardcoded password in dist/api/auth/sso.js

dist/api/auth/sso.jsView on unpkg · L36

Findings

1 Critical2 High7 Medium5 Low
CriticalPrevious Version Dangerous Deltadist/packages/core/src/index.js
HighChild Processdist/cli/index.js
HighRuntime Package Installdist/packages/core/src/api/system.js
MediumSecret Patterndist/packages/core/src/api/auth/sso.js
MediumDynamic Requiredist/database/adapters/AotBridge.js
MediumUnsafe Vm Contextdist/packages/core/src/services/flow-engine.js
MediumNetwork
MediumEnvironment Vars
MediumStructural Risk Force Deep Review
MediumSecret Patterndist/api/auth/sso.js
LowScripts Present
LowFilesystem
LowHigh Entropy Strings
LowUrl Strings
LowNo License