# GHSA-39QQ-F7XC-9W6Q: Authenticated arbitrary files deletion i, cleandeletedfiles plugin (\< 1.11.40)

- Database: GitHub
- Severity: high (stated by ghsa, no CVSS score)
- Published: 2026-07-07
- Modified: 2026-09-16

## Tracked as

- [CVE-2026-61578](https://cve.now/CVE-2026-61578.md): Chamilo LMS arbitrary file deletion in CleanDeletedFiles plugin

## Affected versions

- chamilo/chamilo-lms (Packagist): fixed in 1.11.38

## Description

### Summary

The `cleandeletedfiles` plugin shipped with Chamilo LMS 1.11.36 exposes an AJAX endpoint (`plugin/cleandeletedfiles/src/ajax.php`) that passes a user-controlled `path`/`list` parameter directly to `unlink()` with no validation. An authenticated administrator (or any user abusing CSRF against an admin) can delete arbitrary files writable by the web server.

### Impact

- Vulnerability class: Arbitrary File Delete (Path Traversal / Unvalidated Input to `unlink()`).
- Required privileges: authenticated administrator (or CSRF against an admin session).
- Affected version: Chamilo LMS 1.11.36 with the `cleandeletedfiles` plugin enabled.
- Consequence: Deletion of arbitrary files writable by the web server, including application sources, uploaded content, cache, and configuration — leading to data loss and denial of service.

### Status in later versions

#### Chamilo 1.11.38 (VULNERABLE)

`chamilo-1.11.38/plugin/cleandeletedfiles/src/ajax.php` is byte-identical to version 1.11.36. It is only gated by `api_protect_admin_script()` and still calls `unlink($_REQUEST['path'])` / `unlink($value)` for items from `$_REQUEST['list']` with no canonicalization or base-directory restriction. The Arbitrary File Delete primitive for an authenticated admin remains.

#### Chamilo 2.0.0 (VULNERABLE)

`chamilo-2.0.0/chamilo/public/plugin/cleandeletedfiles/src/ajax.php` is identical to the 1.11.36 handler. Same `delete-file` / `delete-files-list` branches calling `unlink()` on raw `$_REQUEST['path']` / `$_REQUEST['list']`, only protected by `api_protect_admin_script()`.

### Author

- Mathieu Farrell

## References

- https://github.com/chamilo/chamilo-lms/security/advisories/GHSA-39qq-f7xc-9w6q

Page: https://cve.now/GHSA-39QQ-F7XC-9W6Q
