Mar 24, 2026·6 min read·96 visits
The Connect-CMS Code Study Plugin allows authenticated users to execute arbitrary PHP/Java code due to a flawed blacklist filter. Attackers can bypass the filter to achieve Remote Code Execution (RCE). The vendor remediated the issue in versions 1.41.1 and 2.41.1 by completely removing the vulnerable plugin.
Connect-CMS contains a critical vulnerability in the Code Study Plugin (CWE-94: Improper Control of Generation of Code). The plugin fails to adequately sandbox or sanitize user-supplied PHP and Java code prior to execution. Authenticated attackers with access to the plugin can bypass blacklist-based filters using alternative whitespace or dynamic function calls, resulting in arbitrary remote code execution on the underlying server.
Connect-CMS integrates a component known as the Code Study Plugin, designed to facilitate educational code execution. The plugin allows specific authenticated users, such as those assigned the role_reporter role, to submit snippets of PHP or Java code through the web interface. The application processes this input and returns the execution output to the user.
The implementation introduces a critical Improper Control of Generation of Code vulnerability (CWE-94). The application accepts raw code from the client, performs insufficient sanitization, and subsequently executes it within the context of the host operating system. This mechanism inherently exposes the server to severe abuse if the security controls are inadequate.
The vulnerability is tracked as CVE-2026-32276 and carries a High CVSS v3.1 score of 8.8. Exploitation requires authenticated access to the Code Study interface, meaning the attack cannot be executed anonymously. However, once an attacker gains appropriate access, the vulnerability allows for complete system compromise via arbitrary remote code execution.
The root cause of this vulnerability lies in the flawed implementation of the runCheck security filter within CodestudiesPlugin.php. The developers attempted to prevent the execution of malicious commands by implementing a blacklist-based sanitization approach. This function searches the user-submitted code for a hardcoded list of dangerous PHP functions, including system(, exec(, shell_exec(, passthru(, and phpinfo(.
To normalize the input before checking against the blacklist, the code executes str_replace(' ', '', $code_text). This function specifically targets the literal space character (ASCII 32) and removes it from the payload string. The application then uses stripos to detect the blacklisted function names followed immediately by an opening parenthesis.
This sanitization logic is fundamentally flawed because it fails to account for the lexical flexibility of the PHP interpreter. The str_replace implementation ignores other valid whitespace characters, such as horizontal tabs (\t), vertical tabs, carriage returns, and newlines (\n). An attacker can inject these alternative whitespace characters between the function name and the parenthesis, evading the stripos check while remaining valid syntax for PHP execution.
Furthermore, the blacklist fails to mitigate dynamic function execution. PHP allows developers to define function names as strings within variables or to construct them dynamically via concatenation. Payloads utilizing these language features bypass the static string matching entirely. Once the flawed check is passed, the application writes the unsanitized code directly to storage/app/codestudy/ and executes it via exec("php ...").
The vulnerable code path initiates when the application processes user input through the runCheck method. The function applies linear string replacement and subset matching without parsing the abstract syntax tree (AST) of the submitted PHP code.
// Vulnerable implementation in CodestudiesPlugin.php
public function runCheck($code_text) {
// Flawed normalization: only removes ASCII 32
$normalized_code = str_replace(' ', '', $code_text);
$blacklist = ['system(', 'exec(', 'shell_exec(', 'passthru(', 'phpinfo('];
foreach ($blacklist as $bad_func) {
if (stripos($normalized_code, $bad_func) !== false) {
return false; // Payload blocked
}
}
return true; // Payload permitted
}The vendor analyzed the vulnerability and determined that the blacklist approach could not be securely maintained. Rather than attempting to improve the regular expressions or implement a complex sandboxing solution, the remediation strategy involved the complete removal of the feature.
// Commit c0bcd07fc1e9375941aa1295d044328ecd44ed85
// Deletion of the routing and controller logic
- Route::post('/plugin/codestudies/run/{page_id}/{frame_id}', [CodestudiesController::class, 'run']);
-
- class CodestudiesController extends Controller {
- public function run(Request $request) {
- // Controller logic completely removed
- }
- }By deleting the Codestudies model, controller, and associated routing tables, the attack surface is entirely eliminated. This architectural change ensures no variant attacks against the same code execution pipeline are possible.
Exploitation requires the attacker to possess an authenticated session with privileges that grant access to the Code Study interface. The role_reporter permission level is typically sufficient to interact with the vulnerable endpoint.
The attacker crafts a payload designed to exploit the deficiencies in the runCheck filter. To bypass the literal space removal and the static string blacklist, the attacker can utilize string concatenation to build the name of a dangerous function dynamically. Alternatively, the attacker can insert a newline character before the opening parenthesis of a blacklisted function.
// Bypass 1: Dynamic function invocation
<?php
$f = 'sys'.'tem';
$f('id');
?>
// Bypass 2: Alternative whitespace
<?php
system\n('cat /etc/passwd');
?>The attacker submits the crafted payload to the application via an HTTP POST request targeting the /plugin/codestudies/run/{{page_id}}/{{frame_id}} endpoint, placing the payload within the code_text parameter. The server writes the payload to disk, executes the PHP script via a system shell, and returns the standard output of the executed commands in the HTTP response.
Successful exploitation of CVE-2026-32276 grants the attacker arbitrary code execution capabilities on the host server. The malicious commands execute with the privileges of the system user running the web server process, typically www-data or a similarly unprivileged account.
This level of access directly violates system confidentiality, integrity, and availability. The attacker can read sensitive files, including database configuration files or environment variables containing credentials. They can modify application source code to establish persistent backdoors, deface the website, or manipulate stored user data.
Beyond the immediate host compromise, the compromised web server frequently serves as a launchpad for lateral movement. The attacker can utilize the server's network position to scan internal subnets, attack backend database servers, or access internal APIs that are shielded from the public internet.
The primary remediation for CVE-2026-32276 requires updating Connect-CMS to a patched version. Administrators running Series 1.x must upgrade to version 1.41.1, while those on Series 2.x must upgrade to version 2.41.1. These updates remove the vulnerable Code Study Plugin entirely, securely eliminating the attack surface.
If immediate patching is not feasible, administrators can implement structural mitigations by manually deleting the CodestudiesPlugin.php file and removing the associated routing entries from the application configuration. Restricting access to the /plugin/codestudies/run endpoint via a Web Application Firewall (WAF) or reverse proxy ruleset will also prevent exploitation attempts from reaching the application logic.
Detection efforts should focus on analyzing web server access logs for anomalous interactions with the Code Study endpoints. Security Information and Event Management (SIEM) rules can identify HTTP POST requests to /plugin/codestudies/run that contain suspicious PHP execution constructs, such as eval(, sys'.'tem, or repeated newline characters preceding function execution brackets.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
Connect-CMS opensource-workshop | <= 1.41.0 | 1.41.1 |
Connect-CMS opensource-workshop | >= 2.0.0, <= 2.41.0 | 2.41.1 |
| Attribute | Detail |
|---|---|
| Vulnerability Type | Improper Control of Generation of Code |
| CWE ID | CWE-94 |
| CVSS Score | 8.8 |
| Attack Vector | Network |
| Privileges Required | Low (Authenticated) |
| Exploit Status | Proof of Concept |
| Fix Approach | Complete removal of the vulnerable component |
Improper Control of Generation of Code ('Code Injection')
CVE-2026-16454 is an object-level authorization bypass vulnerability (CWE-284, CWE-862) in Eclipse hawkBit versions 1.0.3 and prior. The flaw exists within the Direct Device Integration (DDI) REST controller (hawkbit-ddi-resource), where endpoints responsible for enumerating software module metadata and serving firmware binaries fail to verify whether the requested software module is assigned to the authenticated device. Consequently, any device with valid credentials (such as a TargetToken or GatewayToken) can enumerate software module identifiers and download arbitrary firmware artifacts across the entire tenant namespace.
CVE-2026-62284 (GHSA-5w5g-j6hw-6p8f) is a code injection and server-side request forgery vulnerability in the console-proxy component of the OSAC Operator. The RemoteConfigResolver parses Kubernetes Secrets containing kubeconfig files via clientcmd.RESTConfigFromKubeConfig without sanitizing execution-related fields. An attacker with RBAC permissions to create or modify labeled Secrets in monitored namespaces can supply a malicious exec credential plugin, resulting in arbitrary command execution within the console-proxy pod.
CVE-2026-62361 (GHSA-xgjr-7j9q-2h4r) is an authenticated SQL injection and authorization bypass vulnerability in listmonk, an open-source, self-hosted newsletter and mailing list manager written in Go. In versions prior to 6.2.0, the subscriber export endpoint (GET /api/subscribers/export) directly interpolates user-supplied SQL filter expressions into a PostgreSQL query without invoking the table allowlist validation function (validateQueryTables). Consequently, authenticated users possessing the subscribers:sql_query and subscribers:get_all permissions can bypass relational access controls, execute arbitrary subqueries against restricted tables such as users and settings, and modify database state via writable Common Table Expressions (CTEs).
CVE-2026-28385 (GHSA-3gq2-x4qg-p4g6) is a Server-Side Request Forgery (SSRF) vulnerability in Canonical LXD versions 4.12 through 6.9. An authenticated user possessing the can_create_images entitlement can force the LXD daemon to execute arbitrary outbound HTTP and HTTPS requests via the /1.0/images API endpoint. Due to the absence of egress destination validation, an attacker can probe host loopback services, RFC 1918 private network segments, and cloud Instance Metadata Services (IMDS) from the network position of the privileged LXD daemon.
Canonical LXD and LXC Incus contain an arbitrary file write vulnerability (CWE-73 / CWE-59) in the `/1.0/instances/<name>/exec` REST API endpoint. When an instance is unpacked from an image archive, top-level symbolic links are extracted directly onto the host filesystem within the instance storage directory. If a crafted image includes a symbolic link named `exec-output` pointing to an arbitrary host path, invoking the execution endpoint with `record-output: true` causes the privileged host daemon to follow the symlink and write command output files directly to the target host directory. An authenticated attacker with permissions to import images and execute commands can exploit this flaw to write controlled content to sensitive host directories such as `/etc/cron.d`, resulting in arbitrary code execution on the host as `root`.
CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.