Loading...
Skip to main content

CVE-2024-46987 — Vulnerability in camaleon_cms — CVE Details

HIGH

Camaleon CMS vulnerable to arbitrary path traversal (GHSL-2024-183)

Published September 18, 2024Updated April 17, 2025Source: osv

Summary

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](https://github.com/owen2345/camaleon-cms/blob/feccb96e542319ed608acd3a16fa5d92f13ede67/app/controllers/camaleon_cms/admin/media_controller.rb#L28) method: ```ruby 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](https://github.com/owen2345/camaleon-cms/blob/feccb96e542319ed608acd3a16fa5d92f13ede67/app/uploaders/camaleon_cms_local_uploader.rb#L27) method of the CamaleonCmsLocalUploader class (when files are uploaded locally): ```ruby 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](https://github.com/owen2345/camaleon-cms/blob/feccb96e542319ed608acd3a16fa5d92f13ede67/app/controllers/camaleon_cms/admin/media_controller.rb#L33-L34). 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](https://codeql.github.com/codeql-query-help/ruby/rb-path-injection/) [OWASP: Path Traversal](https://owasp.org/www-community/attacks/Path_Traversal)

Advisory Timeline

  • First published September 18, 2024 (754 days ago).
  • Last revised April 17, 2025 — 211 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update camaleon_cms to 2.8.1 or later
gem install camaleon_cms -v 2.8.1

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
camaleon_cms
rubygems
0.0.1, 0.0.2, 0.1.2, 0.1.3 (+108 more)2.8.1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 6.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Frequently Asked Questions

What is CVE-2024-46987?
Camaleon CMS vulnerable to arbitrary path traversal (GHSL-2024-183) This vulnerability has been assigned a severity rating of HIGH (CVSS score: 6.5/10).
How do I check if my project is affected by CVE-2024-46987?
CVE-2024-46987 affects camaleon_cms. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-46987 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
6.5

Exploitation requires specific conditions or has limited impact. Remediate within weeks.

Also Known As

GHSA-cp65-5m9r-vc2c

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies