CVE-2024-46987: Camaleon CMS vulnerable to arbitrary path traversal (GHSL-2024-183)
A path traversal vulnerability accessible via MediaController's downloadprivatefile method allows authenticated users to download any file on the web server Camaleon CMS is running on (depending on the file permissions).
Published Sep 18, 2024 · Updated Apr 17, 2025
Affected packages
camaleon_cms
- Ecosystem
- RubyGems
- Affected
- < 2.8.1
- Fixed in
- 2.8.1
- Check
bundle info camaleon_cms
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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'
endThe 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
endIf 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:///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
Credited to texpert.
References
- https://github.com/owen2345/camaleon-cms/security/advisories/GHSA-cp65-5m9r-vc2c
- https://github.com/owen2345/camaleon-cms/commit/071b1b09d6d61ab02a5960b1ccafd9d9c2155a3e
- https://nvd.nist.gov/vuln/detail/CVE-2024-46987
- https://codeql.github.com/codeql-query-help/ruby/rb-path-injection
- https://owasp.org/www-community/attacks/Path_Traversal
- https://www.reddit.com/r/rails/comments/1exwtdm/camaleon_cms_281_has_been_released
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/camaleon_cms/CVE-2024-46987.yml
- https://securitylab.github.com/advisories/GHSL-2024-182_GHSL-2024-186_Camaleon_CMS
- https://github.com/advisories/GHSA-cp65-5m9r-vc2c
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More RubyGems vulnerabilities
All RubyGems entriesCVE-2026-1776
Camaleon CMS vulnerable to Path Traversal through AWS S3 uploader implementation
medium6.5No fixMar 10, 2026CVE-2025-2304
Camaleon CMS Vulnerable to Privilege Escalation through a Mass Assignment
critical9.4Mar 14, 2025CVE-2024-48652
camaleon_cms affected by cross site scripting
medium4.8No fixOct 23, 2024GHSA-75j2-9gmc-m855
Camaleon CMS vulnerable to stored XSS through user file upload (GHSL-2024-184)
medium5.4Sep 25, 2024GHSA-8fx8-3rg2-79xw
Camaleon CMS vulnerable to stored XSS through user file upload (GHSL-2024-184)
medium5.4Sep 23, 2024CVE-2024-46986
Camaleon CMS affected by arbitrary file write to RCE (GHSL-2024-182)
high8.8Sep 18, 2024
