# GHSA-75j2-9gmc-m855: Camaleon CMS vulnerable to stored XSS through user file upload (GHSL-2024-184)

- Severity: Medium (CVSS:4.0, scored by GitHub) `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-09-25T21:53:27.000Z
- Modified: 2024-12-05T05:39:56.339Z
- Weaknesses: CWE-79

## Description

A stored cross-site scripting has been found in the image upload functionality that can be used by normal registered users:
It is possible to upload a SVG image containing JavaScript and it's also possible to upload a HTML document when the format
parameter is manually changed to [documents][1] or a string of an [unsupported format][2]. If an authenticated user or administrator visits that uploaded image or document malicious JavaScript can be executed on their behalf (e.g. changing or deleting content inside of the CMS.)

[1]: https://github.com/owen2345/camaleon-cms/blob/feccb96e542319ed608acd3a16fa5d92f13ede67/app/uploaders/camaleon_cms_uploader.rb#L105-L106
[2]: https://github.com/owen2345/camaleon-cms/blob/feccb96e542319ed608acd3a16fa5d92f13ede67/app/uploaders/camaleon_cms_uploader.rb#L110-L111

## Impact

This issue may lead to account takeover due to reflected Cross-site scripting (XSS).

## Remediation

Only allow the upload of safe files such as PNG, TXT and others or serve all "unsafe" files such as SVG and other files with a content-disposition: attachment header, which should prevent browsers from displaying them.

Additionally, a [Content security policy (CSP)][3] can be created that disallows inlined script. (Other parts of the application might need modification to continue functioning.)

[3]: https://web.dev/articles/csp

To prevent the theft of the auth_token it could be marked with HttpOnly. This would however not prevent that actions could be performed as the authenticated user/administrator. Furthermore, it could make sense to use the authentication provided by Ruby on Rails, so that stolen tokens cannot be used anymore after some time.

(As written by GitHub Advisory Database.)

## Affected

- camaleon_cms (RubyGems): from 2.8.0 before 2.8.2

## Every score

- GitHub: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`

## References

- <https://github.com/owen2345/camaleon-cms/security/advisories/GHSA-r9cr-qmfw-pmrc> (web)
- <https://github.com/owen2345/camaleon-cms> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/camaleon_cms/GHSA-8fx8-3rg2-79xw.yml> (web)

## Sources

- GitHub Advisory Database: [GHSA-75j2-9gmc-m855](https://github.com/advisories/GHSA-75j2-9gmc-m855), CC-BY-4.0, modified 2024-12-05

---

Page: https://cve.day/GHSA-75j2-9gmc-m855 · Whole record: https://cve.day/GHSA-75j2-9gmc-m855.json · Rebuilt by cve.day 2026-11-25T22:56:41.200Z
