Skip to content

Commit aa479b5

Browse files
jasnowpostmodern
authored andcommitted
GHSA SYNC: 1 brand new advisory
1 parent 9abfcb2 commit aa479b5

File tree

1 file changed

+52
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)