Skip to main content

ApostropheCMS CLI CVE-2026-42853

| EUVDEUVD-2026-36565 MEDIUM
OS Command Injection (CWE-78)
2026-05-14 https://github.com/apostrophecms/apostrophe GHSA-hcwq-x9fw-8cfq
6.5
CVSS 3.1 · Vendor: https://github.com/apostrophecms/apostrophe
Share

Severity by source

Vendor (https://github.com/apostrophecms/apostrophe) PRIMARY
6.5 MEDIUM
AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H

Primary rating from Vendor (https://github.com/apostrophecms/apostrophe) · only source for this CVE.

CVSS VectorVendor: https://github.com/apostrophecms/apostrophe

CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H
Attack Vector
Local
Attack Complexity
Low
Privileges Required
High
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

3
Source Code Evidence Fetched
May 14, 2026 - 17:00 vuln.today
Analysis Generated
May 14, 2026 - 17:00 vuln.today
CVE Published
May 14, 2026 - 16:16 nvd
MEDIUM 6.5

DescriptionCVE.org

Summary

The @apostrophecms/cli package contains a command injection vulnerability in the apos create command. User-supplied input from the password prompt is embedded directly into a shell command without proper sanitization or escaping. This allows execution of arbitrary commands on the host system.

━━━━━━━━━━━━━━━━━━━━━━

Details

Vulnerable file: lib/commands/create.js Location: Line 186

The CLI collects a password using an interactive prompt and passes it directly into a shell command.

Vulnerable code:

const response = await prompts({ type: 'password', name: 'pw', message: '🔏 Please enter a password:' });

exec(echo "${response.pw}" | ${createUserCommand});

The value of response.pw is not validated, sanitized, or escaped before being used in exec().

This allows shell metacharacters such as ;, &&, and $() to break out of the intended command and execute arbitrary commands.

━━━━━━━━━━━━━━━━━━━━━━

Steps to Reproduce

  1. Install the CLI

npm install -g @apostrophecms/cli

  1. Create a new project

mkdir testproject && cd testproject apos create mysite 3)When prompted for the admin password, enter "; id > /tmp/apos_rce_proof.txt; echo " 4)Verify command execution cat /tmp/apos_rce_proof.txt

━━━━━━━━━━━━━━━━━━━━━━

Proof of Concept Output

uid=1000(vboxuser) gid=1000(vboxuser) groups=1000(vboxuser),27(sudo),984(docker)

This confirms arbitrary command execution with the privileges of the user running the CLI.

━━━━━━━━━━━━━━━━━━━━━━

Impact

Arbitrary command execution on the developer’s machine Execution occurs with the privileges of the user running the CLI

This can lead to:

File modification or deletion Credential exposure System compromise depending on user privileges

An attacker can exploit this by influencing the password input (for example, through social engineering, malicious documentation, or compromised automation scripts).

The proof-of-concept shows execution under a user belonging to privileged groups such as sudo and docker, which may allow further privilege escalation depending on system configuration.

━━━━━━━━━━━━━━━━━━━━━━

Suggested Fix

Avoid using exec() with user-controlled input.

Use execFile() instead:

const { execFileSync } = require('child_process');

execFileSync('node', [appJsPath, userTask, 'admin', 'admin'], { input: response.pw + '\n' });

━━━━━━━━━━━━━━━━━━━━━━

Affected Version

All current versions of @apostrophecms/cli

━━━━━━━━━━━━━━━━━━━━━━

Tested On

Ubuntu 22.04 Node.js v18.19.1

━━━━━━━━━━━━━━━━━━━━━━

CWE

CWE-78 - Improper Neutralization of Special Elements used in an OS Command

━━━━━━━━━━━━━━━━━━━━━━

AnalysisAI

Command injection in @apostrophecms/cli apos create command allows arbitrary command execution when a user supplies specially crafted input during the interactive password prompt. The vulnerability exists in lib/commands/create.js line 186, where user-supplied password input is passed directly into a shell exec() call without sanitization or escaping, enabling attackers to inject shell metacharacters (;, &&, $()) to execute arbitrary commands with the privileges of the user running the CLI. Exploitation requires user interaction (UI:R) and high privilege context (PR:H), but publicly available proof-of-concept demonstrates successful arbitrary code execution on Ubuntu systems with Node.js.

Technical ContextAI

The @apostrophecms/cli package uses Node.js child_process.exec() to invoke shell commands during project creation. The vulnerability stems from CWE-78 (Improper Neutralization of Special Elements used in an OS Command) - specifically, the apos create command collects a password via an interactive prompt using the 'prompts' library, then embeds the raw response.pw value directly into a template string passed to exec() without any escaping or validation. The shell interprets this string, allowing an attacker to break out of the intended echo command using metacharacters. The recommended fix involves replacing exec() with execFile() (or execFileSync()), which separates command arguments from the shell interpretation layer, preventing injection.

RemediationAI

No vendor-released patch version has been confirmed at the time of analysis. The suggested fix is to replace child_process.exec() with execFileSync() or a similar argument-separating function that prevents shell injection. Developers should immediately audit any automated deployment scripts that invoke 'apos create' with programmatic password input and migrate them to use argument passing rather than shell string interpolation. As a temporary compensating control, restrict the apos create command to trusted administrators only and avoid running it in automated contexts with untrusted input sources. Code review of lib/commands/create.js line 186 should verify that the fix implements execFile() with arguments passed as an array rather than a concatenated shell string. Organizations with strict password policies should ensure no password input is logged or stored in shell history during project creation. Monitor npm advisory channels and the ApostropheCMS GitHub security advisory page (https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-hcwq-x9fw-8cfq) for patch availability.

More in Docker

View all
CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2019-5736 HIGH POC
8.6 Feb 11

runc through version 1.0-rc6 (used in Docker before 18.09.2) contains a container escape vulnerability that allows attac

CVE-2023-32077 HIGH POC
7.5 Aug 24

Netmaker makes networks with WireGuard. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no a

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2023-5815 HIGH POC
8.1 Nov 22

The News & Blog Designer Pack - WordPress Blog Plugin - (Blog Post Grid, Blog Post Slider, Blog Post Carousel, Blog Post

CVE-2014-9357 CRITICAL
10.0 Dec 16

Docker 1.3.2 allows remote attackers to execute arbitrary code with root privileges via a crafted (1) image or (2) build

CVE-2026-34156 CRITICAL POC
9.9 Mar 30

Remote code execution in NocoBase Workflow Script Node (npm @nocobase/plugin-workflow-javascript) allows authenticated l

CVE-2019-15752 HIGH POC
7.8 Aug 28

Docker Desktop Community Edition before 2.1.0.1 allows local users to gain privileges by placing a Trojan horse docker-c

CVE-2025-34221 CRITICAL POC
10.0 Sep 29

Vasion Print (formerly PrinterLogic) Virtual Appliance Host prior to version 25.2.169 and Application prior to version 2

CVE-2024-23054 CRITICAL POC
9.8 Feb 05

An issue in Plone Docker Official Image 5.2.13 (5221) open-source software that could allow for remote code execution du

CVE-2025-23211 CRITICAL POC
9.9 Jan 28

Tandoor Recipes is an application for managing recipes, planning meals, and building shopping lists. Rated critical seve

CVE-2026-46339 CRITICAL POC
10.0 May 19

Unauthenticated remote code execution in 9router (npm package) versions 0.4.30 through 0.4.36 allows network-adjacent at

Share

CVE-2026-42853 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy