CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-21861

CVE-2026-21861: Authenticated OS Command Injection in baserCMS Core Update Feature

Alon Barad
Alon Barad
Software Engineer

Mar 31, 2026·6 min read·37 visits

Executive Summary (TL;DR)

Authenticated OS command injection in baserCMS < 5.2.3 allows administrators to execute arbitrary system commands via the core update feature.

baserCMS versions prior to 5.2.3 are vulnerable to an authenticated OS Command Injection flaw in the core update mechanism. An attacker with administrator privileges can execute arbitrary system commands via the `php` POST parameter during the update process. The vulnerability stems from insecure direct concatenation of user-supplied input into the PHP `exec()` function without appropriate sanitization or escaping.

Vulnerability Overview

baserCMS is an open-source website development framework built on PHP. It provides administrative interfaces for managing content, themes, and system configurations. The core update mechanism allows administrators to apply system updates directly from the web interface. This functionality requires invoking system-level commands to execute package managers like Composer and trigger PHP scripts.

The vulnerability, identified as CVE-2026-21861, is an OS Command Injection flaw located within this update mechanism. Specifically, the PluginsService::getCoreUpdate() method fails to sanitize user-supplied input before passing it to the system shell. An authenticated user with administrator privileges can exploit this flaw to execute arbitrary OS commands.

This issue is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command. The vulnerability has a CVSS v3.1 base score of 9.1, reflecting the high severity of unconstrained command execution, despite the prerequisite of administrative authentication. Exploitation results in code execution with the privileges of the underlying web server process.

Root Cause Analysis

The core update endpoint PluginsController::get_core_update processes administrative requests to apply system updates. During this process, the application accepts a POST parameter named php. This parameter is intended to specify the absolute path to the PHP executable on the host server, ensuring the update scripts use the correct PHP runtime environment.

The vulnerability occurs in PluginsService::getCoreUpdate(), where this php parameter is assigned to a variable and immediately used in string concatenation. The application constructs a command-line string intended to invoke a CakePHP console script via Composer. Because the input is not validated against an allowlist or sanitized using functions like escapeshellcmd() or escapeshellarg(), shell metacharacters retain their special meaning.

When the constructed string is passed to the PHP exec() function, the underlying operating system shell interprets the entire string. If an attacker injects command separators such as semicolons or logical operators, the shell executes the injected commands in sequence. The fundamental error is the direct execution of dynamically constructed strings in a shell context rather than utilizing an array-based execution abstraction.

Code Analysis

The vulnerability manifests in the direct concatenation of the $php variable into the execution string. The original implementation constructs the command using the following pattern:

$command = $php . ' ' . ROOT . DS . 'bin' . DS . 'cake.php composer ' . $targetVersion . ' --php ' . $php . ' --dir ' . TMP . 'update';
exec($command, $out, $code);

In this vulnerable state, supplying php; id; # as the $php variable results in the shell evaluating three distinct commands. The first command executes the standard PHP binary, the second executes the id command, and the third comments out the remainder of the intended string, preventing syntax errors from the trailing arguments.

The remediation implemented in version 5.2.3 fundamentally alters how the application handles system commands. The developers eliminated the user-supplied php parameter entirely. The application now references the constant PHP_BINARY, which accurately identifies the current PHP executable path without relying on untrusted input.

Additionally, the patch incorporates updates to the symfony/process dependency, bringing it to version 6.4.33 via commit 8babfabdb07df91ed171ac5e385c349fd94db9b8. Modern process handling constructs commands using arrays rather than concatenated strings. This ensures that arguments are safely escaped and passed directly to the execution API, bypassing the shell interpreter entirely and neutralizing command injection vectors.

Exploitation Methodology

Exploitation of CVE-2026-21861 requires an attacker to possess valid administrative credentials for the baserCMS instance. The attacker must authenticate to the application and navigate to or directly interact with the core update administrative endpoint. Network access to the management interface is a strict prerequisite.

The attack is initiated by submitting an HTTP POST request to the /baser/admin/baser-core/plugins/get_core_update endpoint. The attacker includes the php parameter in the request body, populated with a crafted payload containing shell metacharacters. A standard proof-of-concept payload takes the form of php=php; id > /tmp/rce_test; #.

Upon receiving this request, the application routes the input to PluginsService::getCoreUpdate(). The exec() function executes the concatenated string. The operating system shell processes the semicolon as a command separator, executing the id command and redirecting its output to the specified temporary file.

The # character acts as a comment in Unix-like shells, instructing the interpreter to ignore the subsequent legitimate arguments appended by the application. This ensures the injected command executes cleanly without generating shell errors that might interrupt the process or alert monitoring systems. The attacker achieves arbitrary code execution with the privileges of the web server user.

Impact Assessment

Successful exploitation grants the attacker arbitrary command execution capabilities on the host operating system. The commands execute within the context and privilege boundary of the web server process. While this does not immediately grant root access, it compromises the confidentiality, integrity, and availability of the application and its data.

The attacker gains read and write access to the web root directory and any database credentials stored in configuration files. This allows for direct interaction with the backend database, enabling data exfiltration, modification, or deletion. The attacker can also modify application source code to insert persistent backdoors or modify application logic.

Furthermore, the compromised web server process serves as a pivot point for lateral movement within the internal network. The attacker can deploy additional tooling, initiate port scans, or target internal services that are otherwise inaccessible from the public internet. The CVSS Scope metric is correctly marked as Changed, reflecting this ability to impact components beyond the vulnerable application itself.

Remediation and Mitigation

The definitive remediation for CVE-2026-21861 is upgrading baserCMS to version 5.2.3 or later. This release completely removes the vulnerable code path by discarding user-supplied binary paths and enforcing strict parameter escaping. Administrators should apply the update via official distribution channels as soon as operationally feasible.

In environments where immediate patching is not possible, organizations must implement strict access controls on the administrative interface. Access to the /baser/admin/ path should be restricted via network-level firewalls or web server configurations to allow only trusted IP addresses. This significantly reduces the attack surface by preventing unauthorized actors from reaching the vulnerable endpoint, even if they possess valid credentials.

Organizations can also deploy Web Application Firewall (WAF) rules designed to inspect POST requests targeting the /baser/admin/baser-core/plugins/get_core_update endpoint. These rules should block requests containing shell metacharacters such as semicolons, pipe symbols, and ampersands in the php parameter. While WAF rules are an effective temporary measure, they do not resolve the underlying code vulnerability and should not be considered a permanent solution.

Official Patches

baserprojectOfficial Security Advisory on GitHub
baserprojectbaserCMS Release Notes for version 5.2.3

Fix Analysis (3)

Technical Appendix

CVSS Score
9.1/ 10
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
EPSS Probability
0.17%
Top 61% most exploited

Affected Systems

baserCMS version < 5.2.3

Affected Versions Detail

Product
Affected Versions
Fixed Version
baserCMS
baserproject
< 5.2.35.2.3
AttributeDetail
CWE IDCWE-78
Attack VectorNetwork
Privileges RequiredAdministrator
CVSS v3.1 Score9.1 (Critical)
EPSS Score0.00174 (38.64%)
ImpactRemote Code Execution (RCE)
Exploit StatusProof of Concept Available

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
CWE-78
OS Command Injection

Improper Neutralization of Special Elements used in an OS Command

Vulnerability Timeline

Vulnerability publicly disclosed and published on NVD
2026-03-31
Patched version 5.2.3 released by baserproject
2026-03-31

References & Sources

  • [1]GitHub Security Advisory GHSA-qxmc-6f24-g86g
  • [2]JVN Advisory (JVN_20837860)
  • [3]baserCMS Release 5.2.3
  • [4]CVE.org Record for CVE-2026-21861

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-55699
6.5

CVE-2026-55699: Arbitrary Directory Deletion via Path Traversal in pnpm globalBinDir Resolver

CVE-2026-55699 (also identified as GHSA-4gxm-v5v7-fqc4) is a critical path traversal and arbitrary directory deletion vulnerability in the pnpm package manager. The issue exists because the manifest validation process fails to prevent relative path segments within the package 'bin' keys. When a malicious package containing structured path traversal markers is globally installed and later manipulated, pnpm resolves the target paths through path.join() and passes the resolved paths to a recursive deletion function, resulting in arbitrary directory removal.

Amit Schendel
Amit Schendel
9 views•6 min read
•1 day ago•CVE-2026-55700
7.1

CVE-2026-55700: Path Traversal and Arbitrary File Write in pnpm stage download

A path traversal vulnerability in pnpm stage download allows malicious registries or compromised package manifests to overwrite arbitrary files on the victim's filesystem via unvalidated package name and version fields.

Alon Barad
Alon Barad
9 views•4 min read
•1 day ago•GHSA-WW5P-J6CJ-6MQQ
5.5

GHSA-WW5P-J6CJ-6MQQ: Credential Exposure in Nezha Dashboard DDNS and Notification APIs

GHSA-WW5P-J6CJ-6MQQ is a technical credential exposure vulnerability in Nezha Dashboard prior to version 2.2.5. The vulnerability allows authenticated administrative users or actors possessing scoped read-only Personal Access Tokens (PATs) to exfiltrate plaintext third-party API credentials, secret keys, and webhook authorization headers due to a lack of data redaction during API object serialization.

Amit Schendel
Amit Schendel
9 views•7 min read
•1 day ago•GHSA-FR4H-3CPH-29XV
7.1

GHSA-FR4H-3CPH-29XV: Path Traversal and Directory Hijacking in pnpm and pacquet Dependency Resolution

GHSA-FR4H-3CPH-29XV is a high-severity path traversal vulnerability in pnpm and its Rust-based port pacquet. The flaw manifests when using the hoisted node-linker configuration, allowing an attacker to manipulate the lockfile to resolve relative traversal sequences or target reserved subdirectories, leading to arbitrary file write or execution hijacking.

Amit Schendel
Amit Schendel
7 views•8 min read
•2 days ago•GHSA-72R4-9C5J-MJ57
7.1

GHSA-72R4-9C5J-MJ57: Arbitrary File Deletion via Path Traversal in pnpm patch-remove

A path traversal vulnerability in the pnpm package manager's 'patch-remove' command allows an attacker to delete arbitrary files outside the patches directory. By manipulating configuration files like package.json, an attacker can specify a traversal path that the application deletes recursively without validating the path's containment.

Alon Barad
Alon Barad
6 views•5 min read
•2 days ago•GHSA-QRV3-253H-G69C
8.3

GHSA-QRV3-253H-G69C: Path Traversal and Arbitrary Symlink Creation via configDependencies in pnpm

A high-severity path traversal vulnerability exists in the pnpm package manager. By crafting a malicious lockfile (pnpm-lock.yaml) with path traversal characters in the configDependencies block, an attacker can create arbitrary directories and symlinks outside the project's node_modules/.pnpm-config directory. This exploitation happens automatically during pnpm installation, even when executing with scripts disabled via the --ignore-scripts flag.

Amit Schendel
Amit Schendel
7 views•7 min read