Skip to content

Commit a91ea8f

Browse files
jasnowRubySec CI
authored and
RubySec CI
committed
Updated advisory posts against rubysec/ruby-advisory-db@7efe0d9
1 parent 132860c commit a91ea8f

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
layout: advisory
3+
title: 'GHSA-75j2-9gmc-m855 (camaleon_cms): Camaleon CMS vulnerable to stored XSS
4+
through user file upload (GHSL-2024-184)'
5+
comments: false
6+
categories:
7+
- camaleon_cms
8+
advisory:
9+
gem: camaleon_cms
10+
ghsa: 75j2-9gmc-m855
11+
url: https://github.com/owen2345/camaleon-cms/security/advisories/GHSA-r9cr-qmfw-pmrc
12+
title: Camaleon CMS vulnerable to stored XSS through user file upload (GHSL-2024-184)
13+
date: 2024-09-25
14+
description: |
15+
A stored cross-site scripting has been found in the image upload
16+
functionality that can be used by normal registered users:
17+
It is possible to upload a SVG image containing JavaScript and it's
18+
also possible to upload a HTML document when the format parameter
19+
is manually changed to [documents][1] or a string of an
20+
[unsupported format][2]. If an authenticated user or administrator
21+
visits that uploaded image or document malicious JavaScript can be
22+
executed on their behalf (e.g. changing or deleting content inside
23+
of the CMS.)
24+
25+
[1]: https://github.com/owen2345/camaleon-cms/blob/feccb96e542319ed608acd3a16fa5d92f13ede67/app/uploaders/camaleon_cms_uploader.rb#L105-L106
26+
[2]: https://github.com/owen2345/camaleon-cms/blob/feccb96e542319ed608acd3a16fa5d92f13ede67/app/uploaders/camaleon_cms_uploader.rb#L110-L111
27+
28+
## Impact
29+
30+
This issue may lead to account takeover due to reflected Cross-site
31+
scripting (XSS).
32+
33+
## Remediation
34+
35+
Only allow the upload of safe files such as PNG, TXT and others or
36+
serve all "unsafe" files such as SVG and other files with a
37+
content-disposition: attachment header, which should prevent browsers
38+
from displaying them.
39+
40+
Additionally, a [Content security policy (CSP)][3] can be created
41+
that disallows inlined script. (Other parts of the application might
42+
need modification to continue functioning.)
43+
44+
[3]: https://web.dev/articles/csp
45+
46+
To prevent the theft of the auth_token it could be marked with
47+
HttpOnly. This would however not prevent that actions could be
48+
performed as the authenticated user/administrator. Furthermore, it
49+
could make sense to use the authentication provided by Ruby on Rails,
50+
so that stolen tokens cannot be used anymore after some time.
51+
cvss_v3: 5.4
52+
unaffected_versions:
53+
- "< 2.8.0"
54+
patched_versions:
55+
- ">= 2.8.2"
56+
related:
57+
url:
58+
- https://github.com/owen2345/camaleon-cms/security/advisories/GHSA-r9cr-qmfw-pmrc
59+
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/camaleon_cms/GHSA-8fx8-3rg2-79xw.yml
60+
- https://github.com/advisories/GHSA-75j2-9gmc-m855
61+
---

0 commit comments

Comments
 (0)