Skip to content

Commit 196568d

Browse files
jasnowRubySec CI
authored andcommitted
Updated advisory posts against rubysec/ruby-advisory-db@4dbb13b
1 parent 939caa9 commit 196568d

File tree

4 files changed

+216
-0
lines changed

4 files changed

+216
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
layout: advisory
3+
title: 'CVE-2023-47634 (decidim): Race condition in Endorsements'
4+
comments: false
5+
categories:
6+
- decidim
7+
advisory:
8+
gem: decidim
9+
cve: 2023-47634
10+
ghsa: r275-j57c-7mf2
11+
url: https://github.com/decidim/decidim/security/advisories/GHSA-r275-j57c-7mf2
12+
title: Race condition in Endorsements
13+
date: 2024-02-20
14+
description: |
15+
"### Impact\n\nA race condition in the endorsement of resources (for
16+
instance, a proposal) allows a user to make more than once endorsement.\n\nTo exploit
17+
this vulnerability, the request to set an endorsement must be sent several times
18+
in parallel.\n \n### Workarounds\n\nDisable the Endorsement feature in the components. "
19+
cvss_v3: 3.1
20+
unaffected_versions:
21+
- "< 0.10.0"
22+
patched_versions:
23+
- "~> 0.26.9"
24+
- ">= 0.27.5"
25+
related:
26+
url:
27+
- https://github.com/decidim/decidim/security/advisories/GHSA-r275-j57c-7mf2
28+
- https://github.com/decidim/decidim/commit/5c5ee7a50d75c10643dd8c495e2517641e4d74db
29+
- https://github.com/decidim/decidim/commit/7b840d2c37a562709f4481db644d8c43add28536
30+
- https://github.com/advisories/GHSA-r275-j57c-7mf2
31+
---
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
layout: advisory
3+
title: 'CVE-2023-47635 (decidim-templates): Possible CSRF attack at questionnaire
4+
templates preview'
5+
comments: false
6+
categories:
7+
- decidim-templates
8+
advisory:
9+
gem: decidim-templates
10+
cve: 2023-47635
11+
ghsa: f3qm-vfc3-jg6v
12+
url: https://github.com/decidim/decidim/security/advisories/GHSA-f3qm-vfc3-jg6v
13+
title: Possible CSRF attack at questionnaire templates preview
14+
date: 2024-02-20
15+
description: |
16+
### Impact
17+
The CSRF authenticity token check is currently disabled for the questionnaire templates preview as per:
18+
https://github.com/decidim/decidim/blob/3187bdfd40ea1c57c2c12512b09a7fec0b2bed08/decidim-templates/app/controllers/decidim/templates/admin/questionnaire_templates_controller.rb#L11
19+
20+
This was introduced by this commit in the PR that introduced this feature (#6247):
21+
https://github.com/decidim/decidim/pull/6247/commits/5542227be66e3b6d7530f5b536069bce09376660
22+
23+
The issue does not imply a serious security thread as you need to have access also to the session cookie in order to see this resource. This URL does not allow modifying the resource but it may allow attackers to gain access to information which was not meant to be public.
24+
25+
### Patches
26+
#11743
27+
28+
### Workarounds
29+
Disable the templates functionality or remove all available templates.
30+
31+
### References
32+
#11743
33+
cvss_v3: 4.5
34+
unaffected_versions:
35+
- "< 0.23.0"
36+
patched_versions:
37+
- ">= 0.27.5"
38+
related:
39+
url:
40+
- https://github.com/decidim/decidim/security/advisories/GHSA-f3qm-vfc3-jg6v
41+
- https://github.com/decidim/decidim/pull/11743
42+
- https://nvd.nist.gov/vuln/detail/CVE-2023-47635
43+
- https://github.com/decidim/decidim/pull/6247
44+
- https://github.com/decidim/decidim/commit/5542227be66e3b6d7530f5b536069bce09376660
45+
- https://github.com/decidim/decidim/commit/57a4b467787448307b5d9b01ce6e2c8502e121ac
46+
- https://github.com/decidim/decidim/blob/3187bdfd40ea1c57c2c12512b09a7fec0b2bed08/decidim-templates/app/controllers/decidim/templates/admin/questionnaire_templates_controller.rb#L11
47+
- https://github.com/decidim/decidim/releases/tag/v0.27.5
48+
- https://github.com/decidim/decidim/releases/tag/v0.28.0
49+
- https://github.com/advisories/GHSA-f3qm-vfc3-jg6v
50+
---
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
layout: advisory
3+
title: 'CVE-2023-48220 (devise_invitable): Possibility to circumvent the invitation
4+
token expiry period'
5+
comments: false
6+
categories:
7+
- devise_invitable
8+
advisory:
9+
gem: devise_invitable
10+
cve: 2023-48220
11+
ghsa: w3q8-m492-4pwp
12+
url: https://github.com/decidim/decidim/security/advisories/GHSA-w3q8-m492-4pwp
13+
title: Possibility to circumvent the invitation token expiry period
14+
date: 2024-02-20
15+
description: |
16+
### Impact
17+
The invites feature allows users to accept the invitation for an unlimited amount of time through the password reset functionality.
18+
19+
When using the password reset functionality, the `devise_invitable` gem always accepts the pending invitation if the user has been invited as shown in this piece of code within the `devise_invitable` gem:
20+
https://github.com/scambra/devise_invitable/blob/41f58970ff76fb64382a9b9ea1bd530f7c3adab2/lib/devise_invitable/models.rb#L198
21+
22+
The only check done here is if the user has been invited but the code does not ensure that the pending invitation is still valid as defined by the `invite_for` expiry period as explained in the gem's documentation:
23+
https://github.com/scambra/devise_invitable#model-configuration-
24+
25+
> `invite_for`: The period the generated invitation token is valid. After this period, the invited resource won’t be able to accept the invitation. When `invite_for` is `0` (the default), the invitation won’t expire.
26+
27+
Decidim sets this configuration to `2.weeks` so this configuration should be respected:
28+
https://github.com/decidim/decidim/blob/d2d390578050772d1bdb6d731395f1afc39dcbfc/decidim-core/config/initializers/devise.rb#L134
29+
30+
The bug is in the `devise_invitable` gem and should be fixed there and the dependency should be upgraded in Decidim once the fix becomes available.
31+
32+
### Patches
33+
Update `devise_invitable` to version `2.0.9` or above by running the following command:
34+
35+
```
36+
$ bundle update devise_invitable
37+
```
38+
39+
### Workarounds
40+
The invitations can be cancelled directly from the database by running the following command from the Rails console:
41+
42+
```
43+
> Decidim::User.invitation_not_accepted.update_all(invitation_token: nil)
44+
```
45+
46+
### References
47+
OWASP ASVS V4.0.3-2.3.1
48+
49+
This bug has existed in the `devise_invitable` gem since this commit which was first included in the `v0.4.rc3` release of this gem:
50+
https://github.com/scambra/devise_invitable/commit/94d859c7de0829bf63f679ae5dd3cab2b866a098
51+
52+
All versions since then are affected.
53+
54+
This gem was first introduced at its version `~> 1.7.0` to the `decidim-admin` gem in this commit which was first included in the `v0.0.1.alpha3` release of Decidim:
55+
https://github.com/decidim/decidim/commit/073e60e2e4224dd81815a784002ebba30f2ebb34
56+
57+
It was first introduced at its version `~> 1.7.0` to the `decidim-system` gem in this commit which was also first included in the `v0.0.1.alpha3` release of Decidim:
58+
https://github.com/decidim/decidim/commit/b12800717a689c295a9ea680a38ca9f823d2c454
59+
60+
### Credits
61+
This issue was discovered in City of Helsinki's security audit against Decidim 0.27 done during September 2023. The security audit was implemented by [Deloitte Finland](https://www2.deloitte.com/fi/fi.html).
62+
cvss_v3: 5.7
63+
unaffected_versions:
64+
- "< 0.4.rc3"
65+
patched_versions:
66+
- ">= 2.0.9"
67+
related:
68+
url:
69+
- https://github.com/decidim/decidim/security/advisories/GHSA-w3q8-m492-4pwp
70+
- https://nvd.nist.gov/vuln/detail/CVE-2023-48220
71+
- https://github.com/decidim/decidim/commit/073e60e2e4224dd81815a784002ebba30f2ebb34
72+
- https://github.com/decidim/decidim/commit/b12800717a689c295a9ea680a38ca9f823d2c454
73+
- https://github.com/scambra/devise_invitable/commit/94d859c7de0829bf63f679ae5dd3cab2b866a098
74+
- https://github.com/decidim/decidim/blob/d2d390578050772d1bdb6d731395f1afc39dcbfc/decidim-core/config/initializers/devise.rb#L134
75+
- https://github.com/decidim/decidim/releases/tag/v0.26.9
76+
- https://github.com/decidim/decidim/releases/tag/v0.27.5
77+
- https://github.com/decidim/decidim/releases/tag/v0.28.0
78+
- https://github.com/scambra/devise_invitable/blob/41f58970ff76fb64382a9b9ea1bd530f7c3adab2/lib/devise_invitable/models.rb#L198
79+
- https://github.com/advisories/GHSA-w3q8-m492-4pwp
80+
---
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
layout: advisory
3+
title: 'CVE-2023-51447 (decidim): Cross-site scripting (XSS) in the dynamic file uploads'
4+
comments: false
5+
categories:
6+
- decidim
7+
advisory:
8+
gem: decidim
9+
cve: 2023-51447
10+
ghsa: 9w99-78rj-hmxq
11+
url: https://github.com/decidim/decidim/security/advisories/GHSA-9w99-78rj-hmxq
12+
title: Cross-site scripting (XSS) in the dynamic file uploads
13+
date: 2024-02-20
14+
description: |
15+
### Impact
16+
The dynamic file upload feature is subject to potential XSS attach in case the attacker manages to modify the file names of the records being uploaded to the server.
17+
18+
This appears in sections where the user controls the file upload dialogs themselves and has the technical knowledge to change the file names through the dynamic upload endpoint. Therefore I believe it would require the attacker to control the whole session of the particular user but in any case, this needs to be fixed.
19+
20+
Successful exploit of this vulneratibility would require the user to have successfully uploaded a file blob to the server with a malicious file name and then have the possibility to direct the other user to the edit page of the record where the attachment is attached.
21+
22+
The users are able to craft the direct upload requests themselves controlling the file name that gets stored to the database as shown here:
23+
https://github.com/rails/rails/blob/a967d355c6fee9ad9b8bd115d43bc8b0fc207e7e/activestorage/app/controllers/active_storage/direct_uploads_controller.rb#L14
24+
25+
The attacker is able to change the filename e.g. to `<svg onload=alert('XSS')>` if they know how to craft these requests themselves. And then enter the returned blob ID to the form inputs manually by modifying the edit page source.
26+
27+
Therefore, anywhere we display these strings, we should properly escape them.
28+
29+
### Patches
30+
PR #11612 fixes this problem both for 0.28.dev and 0.27.x.
31+
32+
### Workarounds
33+
Disable dynamic uploads for the instance, e.g. from proposals.
34+
35+
### References
36+
OWASP ASVS v4.0.3-5.1.3
37+
38+
### Credits
39+
This issue was discovered in City of Helsinki's security audit against Decidim 0.27 done during September 2023. The security audit was implemented by [Deloitte Finland](https://www2.deloitte.com/fi/fi.html).
40+
cvss_v3: 6.3
41+
unaffected_versions:
42+
- "< 0.27.0"
43+
patched_versions:
44+
- ">= 0.27.5"
45+
related:
46+
url:
47+
- https://github.com/decidim/decidim/security/advisories/GHSA-9w99-78rj-hmxq
48+
- https://nvd.nist.gov/vuln/detail/CVE-2023-51447
49+
- https://github.com/decidim/decidim/pull/11612
50+
- https://github.com/decidim/decidim/commit/aaf72787cf18beeeb6a771c1f7cbb7654b073423
51+
- https://github.com/decidim/decidim/releases/tag/v0.27.5
52+
- https://github.com/decidim/decidim/releases/tag/v0.28.0
53+
- https://github.com/rails/rails/blob/a967d355c6fee9ad9b8bd115d43bc8b0fc207e7e/activestorage/app/controllers/active_storage/direct_uploads_controller.rb#L14
54+
- https://github.com/advisories/GHSA-9w99-78rj-hmxq
55+
---

0 commit comments

Comments
 (0)