/

CVE-2025-50187

Severity:

CRITICAL RISK

(9.8)

Eval Injection in Chamilo LMS SOAP Request Handling

CVE-2025-50187

Analyzed

Vulnerability type

Category:

Eval Injection

CWE:

CWE-95

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

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

Chamilo LMS contains an eval injection vulnerability in its SOAP request handling, where a parameter is evaluated without proper filtering or sanitization.

Under the right conditions, an attacker can craft a malicious SOAP request that is interpreted as executable code on the server, leading to remote code execution.

Affected context

This vulnerability affects Chamilo LMS deployments that expose SOAP-based web services where request parameters are directly evaluated as code.

It typically appears in environments where PHP's dynamic evaluation features are used to process incoming SOAP parameters and where those parameters can be influenced by external clients.

The risk is higher when SOAP endpoints are reachable from untrusted networks or integrated with third-party systems that can send arbitrary SOAP payloads.

Exploit preconditions

  • Attack surface: SOAP web service endpoint exposed by the Chamilo LMS instance
  • Required access: Ability to send crafted SOAP requests to the vulnerable endpoint (network access to the web server)
  • Trigger point: Server-side processing of a specific SOAP parameter that is passed to an eval-like construct without strict validation
  • Why exploitation is possible: The application takes attacker-controlled input and evaluates it as code, conflating data with executable logic (CWE-95)

Why this happens

The underlying issue is the use of dynamic evaluation functions (such as eval-style constructs) on data obtained from SOAP request parameters.

Instead of treating incoming SOAP parameters as plain data, the code treats them as expressions or commands to be executed by the interpreter.

This behavior corresponds to CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code, where untrusted input is passed to evaluation APIs without rigorous sanitization or strict whitelisting.

The absence of a clear separation between control logic and user-provided data enables an attacker to inject arbitrary code into the evaluation context.

Potential impact

  • Remote execution of arbitrary code on the Chamilo LMS server
  • Full compromise of the web application and its data, including course content and user records
  • Pivoting to other internal systems reachable from the compromised server
  • Installation of backdoors, web shells, or other persistent malware
  • Abuse of the compromised LMS environment to distribute malicious content to users

General mitigation guidance

Mitigation generally focuses on eliminating dynamic evaluation of untrusted data and hardening how SOAP parameters are processed.

Recommended defensive patterns include:

  • Refactoring logic to avoid eval-style constructs; use explicit control structures, whitelisted function calls, or parameterized operations instead.
  • Applying strict input validation on SOAP parameters, using allowlists of expected values, types, and formats, rather than attempting to sanitize arbitrary expressions.
  • Treating all network-derived data as untrusted and ensuring it never flows directly into evaluation or command execution APIs.
  • Enforcing least privilege for the application runtime account so that, if code execution is attempted, its capabilities are limited.
  • Segmenting SOAP endpoints and exposing them only to trusted systems and networks when possible, reducing their direct exposure to arbitrary clients.

How teams detect issues like this

Effective detection typically combines code-level analysis with runtime monitoring:

  • Static analysis: Configure rules that flag any use of eval-like functions or dynamic code execution constructs, particularly where parameters originate from SOAP or other HTTP inputs.
  • Code review: During secure code reviews, trace data flows from SOAP request parsing to any dynamic evaluation or command execution points, and question any design that interprets input as code.
  • Policy enforcement: Introduce development guidelines and CI/CD checks that prohibit dynamic evaluation of user-controlled data and require explicit justification for any remaining uses.
  • Runtime monitoring: Use application logs and intrusion detection systems to spot unusual or malformed SOAP payloads, especially those containing code-like patterns.

Sources

SourceLink
github.comgithub.com/chamilo/chamilo-lms/releases/tag/v1.11.28
github.comgithub.com/chamilo/chamilo-lms/security/advisories/GHSA-356v-7xg2-3678

Frequently asked

questions

Yes. If the SOAP endpoint is reachable over the network, an attacker can remotely send crafted SOAP requests that trigger code execution on the server.

The attacker generally needs only network access to the vulnerable SOAP endpoint; no valid user account is strictly required if the endpoint accepts unauthenticated requests.

The safest pattern is to remove all dynamic evaluation of request parameters, replacing eval-style constructs with explicit, whitelisted logic that treats input strictly as data, not as executable code.

Avoid using dynamic code evaluation on untrusted input, enforce strict input validation and allowlists for all externally sourced data, and integrate secure coding guidelines and automated checks that flag eval-like usage during development and code review.

Find out what's already
exploitable in your codebase.