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·40 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

•about 6 hours ago•CVE-2026-53359
8.8

CVE-2026-53359: Use-After-Free in Linux Kernel KVM Shadow MMU (Januscape)

Januscape (CVE-2026-53359) is a critical Use-After-Free vulnerability in the x86 Shadow MMU component of the Linux Kernel's KVM subsystem. A logic error in shadow page tracking permits unauthorized page reuse without validating architectural execution roles, leading to dangling pointers in reverse mapping (rmap) tracking entries during guest memory teardown.

Amit Schendel
Amit Schendel
43 views•5 min read
•about 6 hours ago•CVE-2026-48282
10.0

CVE-2026-48282: Unauthenticated Path Traversal and Arbitrary File Write in Adobe ColdFusion Remote Development Services

CVE-2026-48282 is a critical unauthenticated path traversal and arbitrary file write vulnerability in the Remote Development Services (RDS) component of Adobe ColdFusion. The vulnerability allows a remote, unauthenticated attacker to bypass directory boundaries and write arbitrary files, including CFML-based web shells, onto the host server. This flaw is actively exploited in the wild and enables full unauthenticated remote code execution under the privileges of the ColdFusion service account.

Alon Barad
Alon Barad
15 views•6 min read
•about 11 hours ago•GHSA-GQ4G-FPC9-VJFQ
2.3

GHSA-gq4g-fpc9-vjfq: Username Enumeration via Predictable Decoy Credentials in web-auth/webauthn-lib

An information disclosure vulnerability exists in the web-auth/webauthn-lib PHP library when using the default SimpleFakeCredentialGenerator without a configured secret. This allows unauthenticated remote attackers to determine if a username exists on the target application.

Alon Barad
Alon Barad
8 views•5 min read
•about 12 hours ago•GHSA-CWV4-H3J5-W3CF
3.7

GHSA-CWV4-H3J5-W3CF: Stored and Reflected Cross-Site Scripting in rama's Directory Listing Component

A Stored and Reflected Cross-Site Scripting (XSS) vulnerability was identified in the Rust web service library 'rama' prior to version 0.3.0-rc.1. When serving directories using DirectoryServeMode::HtmlFileList, the library improperly escapes directory names, filenames, and request path components before injecting them into dynamically generated HTML files. This allows attackers to execute malicious scripts inside user browser sessions.

Alon Barad
Alon Barad
7 views•7 min read
•about 13 hours ago•GHSA-Q855-8RH5-JFGQ
6.5

GHSA-Q855-8RH5-JFGQ: Missing Authentication and CSRF in ha-mcp bare root settings and policy routes

The ha-mcp add-on for Home Assistant exposes its settings and security policy routes without authentication at the bare root path of TCP port 9583. This exposure allows unauthorized adjacent network clients to reconfigure tools, alter policies, and bypass human-in-the-loop approval gates. The vulnerability has been addressed in development build 7.6.0.dev393 and subsequent releases by restricting access to root-mounted routes exclusively to the Supervisor Ingress IP.

Amit Schendel
Amit Schendel
6 views•8 min read
•about 13 hours ago•GHSA-F66Q-9RF6-8795
5.3

GHSA-f66q-9rf6-8795: WebAuthn Re-authentication Freshness Bypass in Flask-Security-Too

An authentication freshness bypass vulnerability exists in the WebAuthn re-authentication path of Flask-Security-Too versions 5.8.0 and 5.8.1. The flaw allows an authenticated attacker to elevate the freshness status of a victim session using their own WebAuthn credential, bypassing re-authentication constraints.

Amit Schendel
Amit Schendel
8 views•5 min read