/

CVE-2025-50195

Severity:

HIGH RISK

(7.2)

OS Command Injection in Chamilo vchamilo Plugin Controller

CVE-2025-50195

Analyzed

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution / OS Command Execution

Severity:

HIGH RISK

(7.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

An OS command injection vulnerability exists in Chamilo's vchamilo plugin controller endpoint (/plugin/vchamilo/views/manage.controller.php) in versions prior to 1.11.30.

Under certain conditions where user-controlled input is incorporated into system commands, an attacker could execute arbitrary commands on the underlying server with the web application's privileges.

Affected context

This vulnerability occurs in Chamilo Learning Management System installations that expose the vchamilo plugin functionality via manage.controller.php.

It is relevant in deployments where parameters processed by this controller can be influenced by users (directly via HTTP requests or indirectly through stored input).

The risk is higher when the underlying web server account has broad system permissions or access to sensitive data and services.

Exploit preconditions

  • Attack surface: HTTP requests reaching /plugin/vchamilo/views/manage.controller.php (typically via the Chamilo web interface or plugin-specific routes).
  • Required access: Ability to submit or control request parameters consumed by the vchamilo manage controller (often authenticated user or higher, depending on configuration).
  • Trigger point: Code paths where untrusted input is embedded in a shell or system command without robust sanitization, escaping, or strict command construction.
  • Why exploitation is possible: The controller constructs OS-level commands using input that is not fully constrained or validated, allowing injection of additional shell metacharacters or arguments.

Why this happens

This issue stems from constructing operating system commands with untrusted input inside manage.controller.php of the vchamilo plugin.

Instead of treating incoming parameters as data and strictly constraining them to a known-safe set, the code path passes them directly or semi-directly into a shell invocation or command execution API.

This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where special characters (such as ;, &&, |) can alter the intended command structure and allow arbitrary command execution.

Potential impact

  • Execution of arbitrary OS commands with the privileges of the Chamilo web server process
  • Reading or modifying application data, including course materials, user records, or configuration files
  • Pivoting to other services reachable from the Chamilo host (e.g., database, internal APIs)
  • Planting backdoors or malicious scripts on the server, enabling long-term compromise
  • Disruption of service through deletion of files or resource exhaustion

General mitigation guidance

Effective mitigation centers on eliminating dynamic shell command construction and constraining any interaction with the operating system:

  • Replace shell invocation with high-level language APIs that do not invoke a shell, or use parameterized process execution APIs that treat arguments as data, not command text.
  • Enforce strict allow-lists for any parameters that influence commands (e.g., fixed command choices, bounded flags, and validated file paths).
  • Normalize and validate all incoming input in the controller, rejecting or safely encoding characters that can alter shell syntax.
  • Run the Chamilo application and web server under a dedicated low-privilege account, limiting the damage if an injection occurs.
  • Segregate file system and network access so that the web process cannot reach highly sensitive resources by default.

How teams detect issues like this

Detection typically involves a combination of code-level and behavioral analysis:

  • Static analysis: Configure rules to flag uses of command execution functions (e.g., exec, system, shell_exec, popen) where any portion of the command string is derived from request parameters or other untrusted sources.
  • Code review: Examine controller and plugin code for string concatenation or interpolation used to build shell commands, especially inside manage.controller.php, and check for lack of allow-lists or proper escaping.
  • Runtime monitoring: Use application and system logs to identify anomalous command executions, unexpected subprocess invocations, or atypical command arguments originating from web requests.
  • Security testing: Perform focused dynamic testing (DAST) of endpoints that can trigger system commands, monitoring for command expansion or error messages indicative of injection.

Sources

SourceLink
github.comgithub.com/chamilo/chamilo-lms/commit/afdbd4bb9a9ea17b7740559dd4e05aa13b16480d
github.comgithub.com/chamilo/chamilo-lms/releases/tag/v1.11.30
github.comgithub.com/chamilo/chamilo-lms/security/advisories/GHSA-c447-v9xq-mmj7

Frequently asked

questions

Exploitability depends on how accessible the vchamilo manage controller is and what parameters it processes. If attackers can interact with the vulnerable code path over the network and influence the relevant inputs, remote exploitation is possible.

In many LMS deployments, plugin management features are restricted to authenticated or administrative users, but this is configuration dependent. The core requirement is the ability to send requests that reach manage.controller.php with controllable parameters.

The most robust pattern is to avoid shell invocation entirely for application logic. When interaction with the OS is unavoidable, use parameterized process APIs, apply strict allow-lists to all input, and avoid building commands by concatenating strings.

Adopt a secure coding standard that prohibits dynamic shell command construction with untrusted input, enforce automated checks for risky APIs in CI, and regularly review plugin and controller code for injection patterns. Combining these practices with least-privilege deployment significantly reduces the likelihood and impact of command injection vulnerabilities.

Find out what's already
exploitable in your codebase.