CVE-2023-4221

7.2 HIGH

📋 TL;DR

This vulnerability allows authenticated users with Learning Path upload permissions to execute arbitrary commands on the server through command injection in the OpenOffice presentation processing component. Attackers can achieve remote code execution by exploiting improper input sanitization in the file upload functionality. Only Chamilo LMS installations with users who have Learning Path upload privileges are affected.

💻 Affected Systems

Products:
  • Chamilo LMS
Versions: <= v1.11.24
Operating Systems: All operating systems running Chamilo LMS
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated users with Learning Path upload permissions. The vulnerability exists in the OpenOffice presentation processing component.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full server compromise allowing attackers to execute arbitrary commands with web server privileges, potentially leading to data theft, lateral movement, or complete system takeover.

🟠

Likely Case

Authenticated attackers gaining shell access to the web server, allowing them to read sensitive files, modify content, or establish persistence on the system.

🟢

If Mitigated

Limited impact if proper input validation and command sanitization are implemented, restricting attackers to file upload operations only.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated access with Learning Path upload permissions. The vulnerability is in a file processing component that handles uploaded presentations.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v1.11.25 and later

Vendor Advisory: https://support.chamilo.org/projects/chamilo-18/wiki/security_issues#Issue-128-2023-09-04-Critical-impact-Moderate-risk-Authenticated-users-may-gain-unauthenticated-RCE-CVE-2023-4221CVE-2023-4222

Restart Required: No

Instructions:

1. Update to Chamilo LMS v1.11.25 or later. 2. Apply the security patches from the GitHub commits. 3. Verify the fix by checking that the vulnerable file has been updated.

🔧 Temporary Workarounds

Disable Learning Path uploads

all

Temporarily disable Learning Path upload functionality for all users

Modify Chamilo configuration to remove Learning Path upload permissions

Input validation enhancement

all

Add additional input validation for file upload parameters

Implement strict whitelist validation for uploaded file names and parameters

🧯 If You Can't Patch

  • Restrict Learning Path upload permissions to trusted administrators only
  • Implement web application firewall rules to block command injection patterns in upload requests

🔍 How to Verify

Check if Vulnerable:

Check if Chamilo version is <= 1.11.24 and review main/lp/openoffice_presentation.class.php for vulnerable code patterns

Check Version:

Check Chamilo version in the administration panel or review the main/inc/conf/configuration.php file

Verify Fix Applied:

Verify the file main/lp/openoffice_presentation.class.php contains the security patches from the GitHub commits

📡 Detection & Monitoring

Log Indicators:

  • Unusual command execution patterns in web server logs
  • Multiple failed upload attempts with special characters
  • Suspicious file uploads to Learning Path components

Network Indicators:

  • HTTP POST requests to Learning Path upload endpoints containing shell metacharacters
  • Outbound connections from web server to unexpected destinations

SIEM Query:

source="web_server_logs" AND (url="*openoffice_presentation*" OR url="*lp/*") AND (method="POST") AND (payload="*;*" OR payload="*|*" OR payload="*`*" OR payload="*$(*")

🔗 References

📤 Share & Export