/

CVE-2026-29041

Severity:

HIGH RISK

(8.8)

Unrestricted File Upload in Chamilo LMS

CVE-2026-29041

Analyzed

Vulnerability type

Category:

Unrestricted File Upload

CWE:

CWE-434

Impact:

Authenticated Remote Code Execution

Severity:

HIGH RISK

(8.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 versions prior to 1.11.34 contain an unrestricted file upload flaw that lets authenticated low-privileged users upload files with executable content due to weak validation and storage controls.

Because the application relies largely on MIME-type checks without robust extension validation or safe storage rules, an attacker can upload a crafted file and execute arbitrary commands on the server once the file is reachable and interpreted by the runtime environment.

Affected context

This vulnerability appears in Chamilo LMS where user-uploaded files are accepted and stored on the server after only MIME-type verification.

The risk is present when:

  • Upload endpoints are accessible to low-privileged authenticated users (e.g., students, content creators).
  • The server can interpret or execute certain uploaded file types (e.g., via PHP, other script handlers, or OS-level execution).
  • Uploaded content is stored in locations that are web-accessible or otherwise executable by backend services.

In such environments, a crafted upload can cross the boundary between user content and server-side code.

Exploit preconditions

  • Attack surface: Authenticated web interface file upload functionality within Chamilo LMS.
  • Required access: Valid low-privileged account with permission to upload files in any feature that stores them on the server.
  • Trigger point: Uploading a crafted file containing executable code, followed by accessing or invoking that file through the application or a direct URL so that the server interprets it.
  • Why exploitation is possible: The application:
  • Relies primarily on client- or request-supplied MIME type checks.
  • Does not strictly validate or restrict file extensions to a safe allowlist.
  • Does not enforce safe storage (e.g., storing uploads outside executable paths or disabling script execution in upload directories).

Why this happens

The underlying issue is an unrestricted file upload pattern where user-controlled files are accepted with insufficient server-side constraints.

Mapping to CWE-434, the upload mechanism:

  • Trusts MIME types, which can be spoofed by an attacker.
  • Fails to enforce a strict allowlist of benign file extensions and content types.
  • Stores files in locations where the web server or associated runtimes can treat them as executable code.

Conceptually, this merges the "data" and "code" domains: uploaded content, which should be inert, can instead be interpreted as code by the server, enabling arbitrary command execution when accessed.

Potential impact

  • Execution of arbitrary commands on the LMS server under the web server or application user context.
  • Complete compromise of the Chamilo LMS instance, including reading or modifying course data and user records.
  • Pivoting to the underlying operating system and internal network, depending on server configuration and privileges.
  • Deployment of backdoors or web shells to maintain persistent unauthorized access.
  • Manipulation or destruction of educational content, exams, and student submissions.
  • Use of the compromised server for further attacks, such as phishing or malware hosting.

General mitigation guidance

Effective mitigation focuses on enforcing strict boundaries between user-uploaded content and executable code:

  • Adopt a strict allowlist of permitted file types and extensions (e.g., specific document and image formats only), enforced on the server side.
  • Validate uploads using a combination of checks:
  • Extension validation against the allowlist.
  • Server-side content inspection or magic-byte checks for risky file types.
  • Store all uploaded files in non-executable locations, such as directories that:
  • Reside outside the web root, or
  • Have script execution explicitly disabled via server configuration.
  • Normalize and sanitize file names to remove or rewrite dangerous characters and patterns; avoid using user-supplied names directly in the filesystem.
  • Treat uploaded content as untrusted data at all times, and never dynamically include or evaluate it within templates or application logic.
  • Apply least privilege at the OS and web server level so the process handling uploads has minimal rights (e.g., restricted filesystem and no shell access where possible).

How teams detect issues like this

Detection can combine code-focused and operational approaches:

  • Static analysis / code review:
  • Look for upload handlers that:
  • Only check $_FILES['type'], HTTP headers, or client-supplied MIME types.
  • Accept broad or wildcard file extensions.
  • Save files into web-accessible directories without disabling execution.
  • Flag code that directly references uploaded file paths in include, require, or command execution APIs.
  • Security testing:
  • Perform authenticated penetration testing and fuzzing of upload features using benign test payloads to confirm whether uploads are served or executed.
  • Runtime and log monitoring:
  • Monitor web server logs for unexpected access to newly uploaded files or unusual script locations.
  • Detect anomalous command execution or outbound connections originating from the web server process.
  • Automated tools:
  • Integrate SAST tools that include rules for CWE-434, and DAST scanners configured to exercise file upload features under authenticated sessions.

Sources

SourceLink
github.comgithub.com/chamilo/chamilo-lms/releases/tag/v1.11.34
github.comgithub.com/chamilo/chamilo-lms/security/advisories/GHSA-4pc3-4w2v-vwx8

Frequently asked

questions

Yes, but it requires authentication. Any attacker who can obtain valid low-privileged credentials and reach the Chamilo LMS upload functionality over the network may exploit the flaw, assuming the environment is configured in a way that allows uploaded files to be executed.

The attacker needs a low-privileged authenticated account with the ability to upload files in the application. Elevated roles are not strictly required if basic user roles have access to any upload feature that stores files on the server.

The safest approach is to treat uploads as untrusted data and enforce a multi-layer strategy: implement a strict server-side allowlist of safe file types and extensions, ensure content is stored in non-executable locations, disable script execution in upload directories, and avoid any dynamic inclusion or execution of user-uploaded files.

Embed secure upload patterns into the architecture and coding standards: design upload modules around allowlists, non-executable storage, and minimal privileges; add automated checks in CI/CD (e.g., SAST rules for CWE-434 patterns); and require security review for new or modified upload functionalities before release.

Find out what's already
exploitable in your codebase.