Skip to content
File upload Write-up Intermediate

(CVE-2023-3545) Chamilo LMS Htaccess File Upload Security Bypass

Chamilo LMS improperly sanitises uploaded .htaccess files, allowing a privileged attacker to upload a malicious .htaccess file. This can be chained with an unauthenticated arbitrary file write vulnerability to achieve remote code execution.

starlabs.sg

Published on starlabs.sg

Chamilo is an open-source PHP-based Learning Management System (LMS) that facilitates online education and training. It offers features such as course creation, content management, assessments, collaboration and delivering educational resources.

The author, on starlabs.sg

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely improper handling of case sensitivity when sanitising uploaded .htaccess files, allowing a malicious configuration file to bypass checks.

Impact

A privileged attacker could upload a malicious .htaccess file, and when chained with an unauthenticated arbitrary file write vulnerability, this could lead to remote code execution.

What the attacker needed

Privileged account with upload rights; chain with arbitrary file write bug

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A .htaccess file is a configuration file used by Apache web servers to change how a website behaves. Chamilo did not properly check the contents of uploaded .htaccess files, so someone with upload rights could place a harmful configuration file on the server. If combined with another bug that lets an attacker write files without logging in, this can lead to running malicious code on the server.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.