GHSA-7x4w-cj9r-h4v9 — Vulnerability in camaleon_cms — Advisory Details
Camaleon CMS vulnerable to remote code execution through code injection (GHSL-2024-185)
Does your project use an affected camaleon_cms version?
Paste your Gemfile.lock to check it for GHSA-7x4w-cj9r-h4v9 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
The actions defined inside of the MediaController class do not check whether a given path is inside a certain path (e.g. inside the media folder). If an attacker performed an account takeover of an administrator account (See: GHSL-2024-184) they could delete arbitrary files or folders on the server hosting Camaleon CMS. The crop_url action might make arbitrary file writes (similar impact to GHSL-2024-182) for any authenticated user possible, but it doesn't seem to work currently.
Arbitrary file deletion can be exploited with following code path: The parameter folder flows from the actions method:
def actions
authorize! :manage, :media if params[:media_action] != 'crop_url'
params[:folder] = params[:folder].gsub('//', '/') if params[:folder].present?
case params[:media_action]
[..]
when 'del_file'
cama_uploader.delete_file(params[:folder].gsub('//', '/'))
render plain: ''
into the method delete_file of the CamaleonCmsLocalUploader class (when files are uploaded locally):
def delete_file(key)
file = File.join(@root_folder, key)
FileUtils.rm(file) if File.exist? file
@instance.hooks_run('after_delete', key)
get_media_collection.find_by_key(key).take.destroy
end
Where it is joined in an unchecked manner with the root folder and then deleted.
Proof of concept The following request would delete the file README.md in the top folder of the Ruby on Rails application. (The values for auth_token, X-CSRF-Token and _cms_session would also need to be replaced with authenticated values in the curl command below)
curl --path-as-is -i -s -k -X $'POST' \
-H $'X-CSRF-Token: [..]' -H $'User-Agent: Mozilla/5.0' -H $'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H $'Accept: */*' -H $'Connection: keep-alive' \
-b $'auth_token=[..]; _cms_session=[..]' \
--data-binary $'versions=&thumb_size=&formats=&media_formats=&dimension=&private=&folder=..%2F..%2F..%2FREADME.md&media_action=del_file' \
$'https://<camaleon-host>/admin/media/actions?actions=true'
Impact This issue may lead to a defective CMS or system.
Remediation Normalize all 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
Advisory Timeline
- First published September 18, 2024 (799 days ago).
- Last revised May 23, 2025 — 247 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install camaleon_cms -v 2.8.1
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: RubyGems (1).
| Package | Fixed In |
|---|---|
| camaleon_cms RubyGems · Affected: 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.
- CWE-22Path TraversalMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.2 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/owen2345/camaleon-cms/security/advisories/GHSA-7x4w-cj9r-h4v9WEB
- https://github.com/owen2345/camaleon-cms/commit/f5d032549fa0a204d06e738caf2663607967dee2WEB
- https://github.com/owen2345/camaleon-cmsPACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/camaleon_cms/GHSA-7x4w-cj9r-h4v9.ymlWEB
Frequently Asked Questions
- What is GHSA-7x4w-cj9r-h4v9?
- Camaleon CMS vulnerable to remote code execution through code injection (GHSL-2024-185). This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.2/10).
- How do I check if my project is affected by GHSA-7x4w-cj9r-h4v9?
- GHSA-7x4w-cj9r-h4v9 affects camaleon_cms. Use GeekWala's free vulnerability scanner to check your dependencies against GHSA-7x4w-cj9r-h4v9 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
Related CVEs
- CVE-2025-2304CRITICAL
Camaleon CMS Vulnerable to Privilege Escalation through a Mass Assignment
- CVE-2023-30145CRITICAL
Server-Side Template Injection in Camaleon CMS
- CVE-2021-25970HIGH
Camaleon CMS Insufficient Session Expiration vulnerability
- CVE-2024-46987HIGH
Camaleon CMS vulnerable to arbitrary path traversal (GHSL-2024-183)
- CVE-2024-46986HIGH
Camaleon CMS affected by arbitrary file write to RCE (GHSL-2024-182)
- CVE-2018-18260MEDIUM
Camaleon CMS vulnerable to Stored Cross-site Scripting
- CVE-2024-48652MEDIUM
camaleon_cms affected by cross site scripting
- CVE-2026-1776MEDIUM
Camaleon CMS vulnerable to Path Traversal through AWS S3 uploader implementation