{"id":"CVE-2024-46987","aliases":["CVE-2024-46987","GHSA-cp65-5m9r-vc2c"],"related":[],"kind":"vulnerability","state":"published","title":"Arbitrary path traversal in Camaleon CMS","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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).\n\nIn the [download_private_file](https://github.com/owen2345/camaleon-cms/blob/feccb96e542319ed608acd3a16fa5d92f13ede67/app/controllers/camaleon_cms/admin/media_controller.rb#L28) method:\n```ruby\ndef download_private_file\n  cama_uploader.enable_private_mode!\n\n  file = cama_uploader.fetch_file(\"private/#{params[:file]}\")\n\n  send_file file, disposition: 'inline'\nend\n```\nThe 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):\n```ruby\ndef fetch_file(file_name)\n  raise ActionController::RoutingError, 'File not found' unless file_exists?(file_name)\n\n  file_name\nend\n```\nIf 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).\n\nProof of concept\nAn authenticated user can download the /etc/passwd file by visiting an URL such as:\n\nhttps://<camaleon-host>/admin/media/download_private_file?file=../../../../../../etc/passwd\nImpact\nThis issue may lead to Information Disclosure.\n\nRemediation\nNormalize 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.\n\nSee also:\n\n[CodeQL: Uncontrolled data used in path expression](https://codeql.github.com/codeql-query-help/ruby/rb-path-injection/)\n[OWASP: Path Traversal](https://owasp.org/www-community/attacks/Path_Traversal)","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2024-09-18T15:46:53.000Z","modified":"2026-06-17T07:56:19.257Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","score":7.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","score":7.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","score":7.7,"rating":"HIGH"}],"cwes":["CWE-22","CWE-200"],"affected":[{"ranges":[{"version":"< 2.8.2","status":"affected"}],"vendor":"owen2345","product":"camaleon-cms","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"2.8.2","status":"affected"}],"vendor":"tuzitio","product":"camaleon_cms","cpe":"cpe:2.3:a:tuzitio:camaleon_cms:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.8.1"}],"ecosystem":"RubyGems","package":"camaleon_cms","purl":"pkg:gem/camaleon_cms","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.8.0","fixed":"2.8.2"}],"vendor":"tuzitio","product":"camaleon_cms","cpe":"cpe:2.3:a:tuzitio:camaleon_cms:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/owen2345/camaleon-cms/security/advisories/GHSA-cp65-5m9r-vc2c","tags":["exploit","third-party-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://codeql.github.com/codeql-query-help/ruby/rb-path-injection","tags":["third-party-advisory","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://owasp.org/www-community/attacks/Path_Traversal","tags":["issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://securitylab.github.com/advisories/GHSL-2024-182_GHSL-2024-186_Camaleon_CMS","tags":["advisory","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.reddit.com/r/rails/comments/1exwtdm/camaleon_cms_281_has_been_released","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-46987","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/owen2345/camaleon-cms/commit/071b1b09d6d61ab02a5960b1ccafd9d9c2155a3e","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/owen2345/camaleon-cms","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/camaleon_cms/CVE-2024-46987.yml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2024-09-18T18:57:11.155Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-46987","url":"https://www.cve.org/CVERecord?id=CVE-2024-46987","licence":"CVE Terms of Use","modified":"2025-04-17T18:07:30.718Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cp65-5m9r-vc2c","url":"https://github.com/advisories/GHSA-cp65-5m9r-vc2c","licence":"CC-BY-4.0","modified":"2025-04-17T23:23:18.562Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-46987","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-46987","licence":"Public domain","modified":"2026-06-17T07:56:19.257Z"}],"updatedAt":"2026-11-25T22:58:45.614Z","epss":{"score":0.1456,"percentile":0.96729,"date":"2026-12-01T12:00:22.000Z"}}