CVE-2024-46987
JSON

7.7high

Arbitrary path traversal in Camaleon CMS

Severity
7.7high CVSS:3.1 by GitHub_M
Exploit likelihood
14.6% (higher than 96% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-cp65-5m9r-vc2c

Description

Camaleon CMS is a dynamic and advanced content management system based on Ruby on Rails. A path traversal vulnerability accessible via MediaController's download_private_file method allows authenticated users to download any file on the web server Camaleon CMS is running on (depending on the file permissions). This issue may lead to Information Disclosure. This issue has been addressed in release version 2.8.2. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Affected

Product or packageVersionsReported by
owen2345 camaleon-cms< 2.8.2CVE List
tuzitio camaleon_cmsbefore 2.8.2, from 2.8.0 before 2.8.2CVE List, NVD
camaleon_cms (RubyGems)before 2.8.1GitHub Advisory Database

All scores

GitHub_M7.7high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
GitHub6.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
NVD7.7high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

Classification

CWE-22CWE-200

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

Camaleon CMS is a dynamic and advanced content management system based on Ruby on Rails. A path traversal vulnerability accessible via MediaController's download_private_file method allows authenticated users to download any file on the web server Camaleon CMS is running on (depending on the file permissions). This issue may lead to Information Disclosure. This issue has been addressed in release version 2.8.2. Users are advised to upgrade. There are no known workarounds for this vulnerability.

GitHub Advisory Database

A path traversal vulnerability accessible via MediaController's download_private_file method allows authenticated users to download any file on the web server Camaleon CMS is running on (depending on the file permissions).

In the download_private_file method:

def download_private_file
  cama_uploader.enable_private_mode!

  file = cama_uploader.fetch_file("private/#{params[:file]}")

  send_file file, disposition: 'inline'
end

The file parameter is passed to the fetch_file method of the CamaleonCmsLocalUploader class (when files are uploaded locally):

def fetch_file(file_name)
  raise ActionController::RoutingError, 'File not found' unless file_exists?(file_name)

  file_name
end

If the file exists it's passed back to the download_private_file method where the file is sent to the user via send_file.

Proof of concept An authenticated user can download the /etc/passwd file by visiting an URL such as:

https://<camaleon-host>/admin/media/download_private_file?file=../../../../../../etc/passwd Impact This issue may lead to Information Disclosure.

Remediation Normalize file paths constructed from untrusted user input before using them and check that the resulting path is inside the targeted directory. Additionally, do not allow character sequences such as .. in untrusted input that is used to build paths.

See also:

CodeQL: Uncontrolled data used in path expression OWASP: Path Traversal

NVD (es)

Camaleon CMS es un sistema de gestión de contenido dinámico y avanzado basado en Ruby on Rails. Una vulnerabilidad de path traversal accesible a través del método download_private_file de MediaController permite a los usuarios autenticados descargar cualquier archivo en el servidor web en el que se ejecuta Camaleon CMS (según los permisos de archivo). Este problema puede provocar una divulgación de información. Este problema se ha solucionado en la versión 2.8.2. Se recomienda a los usuarios que actualicen la versión. No se conocen workarounds para esta vulnerabilidad.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-46987 changed 2025-04-17CVE Terms of Use
GitHub Advisory DatabaseGHSA-cp65-5m9r-vc2c changed 2025-04-17CC-BY-4.0
NVDCVE-2024-46987 changed 2026-06-17Public domain