Skip to content

Commit 4dbb13b

Browse files
jasnowpostmodern
authored andcommitted
GHSA SYNC: 8 brand new/as-is advisories
1 parent fb42fad commit 4dbb13b

File tree

8 files changed

+476
-0
lines changed

8 files changed

+476
-0
lines changed

gems/decidim-admin/CVE-2023-48220.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
gem: decidim-admin
3+
cve: 2023-48220
4+
ghsa: w3q8-m492-4pwp
5+
url: https://github.com/decidim/decidim/security/advisories/GHSA-w3q8-m492-4pwp
6+
title: Possibility to circumvent the invitation token expiry period
7+
date: 2024-02-20
8+
description: |
9+
10+
### Impact
11+
12+
The invites feature allows users to accept the invitation for an
13+
unlimited amount of time through the password reset functionality.
14+
15+
When using the password reset functionality, the `devise_invitable`
16+
gem always accepts the pending invitation if the user has been
17+
invited as shown in this piece of code within the `devise_invitable` gem:
18+
https://github.com/scambra/devise_invitable/blob/41f58970ff76fb64382a9b9ea1bd530f7c3adab2/lib/devise_invitable/models.rb#L198
19+
20+
The only check done here is if the user has been invited but the code
21+
does not ensure that the pending invitation is still valid as defined
22+
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.
26+
After this period, the invited resource won’t be able to accept the
27+
invitation. When `invite_for` is `0` (the default), the invitation won’t expire.
28+
29+
Decidim sets this configuration to `2.weeks` so this configuration
30+
should be respected:
31+
https://github.com/decidim/decidim/blob/d2d390578050772d1bdb6d731395f1afc39dcbfc/decidim-core/config/initializers/devise.rb#L134
32+
33+
The bug is in the `devise_invitable` gem and should be fixed there
34+
and the dependency should be upgraded in Decidim once the fix becomes available.
35+
36+
### Patches
37+
38+
Update `devise_invitable` to version `2.0.9` or above by running the following command:
39+
40+
```
41+
$ bundle update devise_invitable
42+
```
43+
44+
### Workarounds
45+
46+
The invitations can be cancelled directly from the database by
47+
running the following command from the Rails console:
48+
49+
```
50+
> Decidim::User.invitation_not_accepted.update_all(invitation_token: nil)
51+
```
52+
53+
### References
54+
55+
OWASP ASVS V4.0.3-2.3.1
56+
57+
This bug has existed in the `devise_invitable` gem since this commit
58+
which was first included in the `v0.4.rc3` release of this gem:
59+
https://github.com/scambra/devise_invitable/commit/94d859c7de0829bf63f679ae5dd3cab2b866a098
60+
61+
All versions since then are affected.
62+
63+
This gem was first introduced at its version `~> 1.7.0` to the
64+
`decidim-admin` gem in this commit which was first included in
65+
the `v0.0.1.alpha3` release of Decidim:
66+
https://github.com/decidim/decidim/commit/073e60e2e4224dd81815a784002ebba30f2ebb34
67+
68+
It was first introduced at its version `~> 1.7.0` to the `decidim-system`
69+
gem in this commit which was also first included in the `v0.0.1.alpha3`
70+
release of Decidim:
71+
https://github.com/decidim/decidim/commit/b12800717a689c295a9ea680a38ca9f823d2c454
72+
73+
### Credits
74+
75+
This issue was discovered in City of Helsinki's security audit against
76+
Decidim 0.27 done during September 2023. The security audit was
77+
implemented by [Deloitte Finland](https://www2.deloitte.com/fi/fi.html).
78+
cvss_v3: 5.7
79+
unaffected_versions:
80+
- "< 0.0.1.alpha3"
81+
patched_versions:
82+
- "~> 0.26.9"
83+
- ">= 0.27.5"
84+
related:
85+
url:
86+
- https://nvd.nist.gov/vuln/detail/CVE-2023-48220
87+
- https://github.com/decidim/decidim/releases/tag/v0.26.9
88+
- https://github.com/decidim/decidim/releases/tag/v0.27.5
89+
- https://github.com/decidim/decidim/releases/tag/v0.28.0
90+
- https://github.com/decidim/decidim/security/advisories/GHSA-w3q8-m492-4pwp
91+
- https://github.com/decidim/decidim/commit/073e60e2e4224dd81815a784002ebba30f2ebb34
92+
- https://github.com/decidim/decidim/commit/b12800717a689c295a9ea680a38ca9f823d2c454
93+
- https://github.com/scambra/devise_invitable/commit/94d859c7de0829bf63f679ae5dd3cab2b866a098
94+
- https://github.com/decidim/decidim/blob/d2d390578050772d1bdb6d731395f1afc39dcbfc/decidim-core/config/initializers/devise.rb#L134
95+
- https://github.com/scambra/devise_invitable/blob/41f58970ff76fb64382a9b9ea1bd530f7c3adab2/lib/devise_invitable/models.rb#L198
96+
- https://github.com/advisories/GHSA-w3q8-m492-4pwp

gems/decidim-core/CVE-2023-51447.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
gem: decidim-core
3+
cve: 2023-51447
4+
ghsa: 9w99-78rj-hmxq
5+
url: https://github.com/decidim/decidim/security/advisories/GHSA-9w99-78rj-hmxq
6+
title: Cross-site scripting (XSS) in the dynamic file uploads
7+
date: 2024-02-20
8+
description: |
9+
### Impact
10+
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.
11+
12+
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.
13+
14+
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.
15+
16+
The users are able to craft the direct upload requests themselves controlling the file name that gets stored to the database as shown here:
17+
https://github.com/rails/rails/blob/a967d355c6fee9ad9b8bd115d43bc8b0fc207e7e/activestorage/app/controllers/active_storage/direct_uploads_controller.rb#L14
18+
19+
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.
20+
21+
Therefore, anywhere we display these strings, we should properly escape them.
22+
23+
### Patches
24+
PR #11612 fixes this problem both for 0.28.dev and 0.27.x.
25+
26+
### Workarounds
27+
Disable dynamic uploads for the instance, e.g. from proposals.
28+
29+
### References
30+
OWASP ASVS v4.0.3-5.1.3
31+
32+
### Credits
33+
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).
34+
cvss_v3: 6.3
35+
unaffected_versions:
36+
- "< 0.27.0"
37+
patched_versions:
38+
- ">= 0.27.5"
39+
related:
40+
url:
41+
- https://github.com/decidim/decidim/security/advisories/GHSA-9w99-78rj-hmxq
42+
- https://nvd.nist.gov/vuln/detail/CVE-2023-51447
43+
- https://github.com/decidim/decidim/pull/11612
44+
- https://github.com/decidim/decidim/commit/aaf72787cf18beeeb6a771c1f7cbb7654b073423
45+
- https://github.com/decidim/decidim/releases/tag/v0.27.5
46+
- https://github.com/decidim/decidim/releases/tag/v0.28.0
47+
- https://github.com/rails/rails/blob/a967d355c6fee9ad9b8bd115d43bc8b0fc207e7e/activestorage/app/controllers/active_storage/direct_uploads_controller.rb#L14
48+
- https://github.com/advisories/GHSA-9w99-78rj-hmxq
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
gem: decidim-system
3+
cve: 2023-48220
4+
ghsa: w3q8-m492-4pwp
5+
url: https://github.com/decidim/decidim/security/advisories/GHSA-w3q8-m492-4pwp
6+
title: Possibility to circumvent the invitation token expiry period
7+
date: 2024-02-20
8+
description: |
9+
### Impact
10+
The invites feature allows users to accept the invitation for an unlimited amount of time through the password reset functionality.
11+
12+
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:
13+
https://github.com/scambra/devise_invitable/blob/41f58970ff76fb64382a9b9ea1bd530f7c3adab2/lib/devise_invitable/models.rb#L198
14+
15+
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:
16+
https://github.com/scambra/devise_invitable#model-configuration-
17+
18+
> `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.
19+
20+
Decidim sets this configuration to `2.weeks` so this configuration should be respected:
21+
https://github.com/decidim/decidim/blob/d2d390578050772d1bdb6d731395f1afc39dcbfc/decidim-core/config/initializers/devise.rb#L134
22+
23+
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.
24+
25+
### Patches
26+
Update `devise_invitable` to version `2.0.9` or above by running the following command:
27+
28+
```
29+
$ bundle update devise_invitable
30+
```
31+
32+
### Workarounds
33+
The invitations can be cancelled directly from the database by running the following command from the Rails console:
34+
35+
```
36+
> Decidim::User.invitation_not_accepted.update_all(invitation_token: nil)
37+
```
38+
39+
### References
40+
OWASP ASVS V4.0.3-2.3.1
41+
42+
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:
43+
https://github.com/scambra/devise_invitable/commit/94d859c7de0829bf63f679ae5dd3cab2b866a098
44+
45+
All versions since then are affected.
46+
47+
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:
48+
https://github.com/decidim/decidim/commit/073e60e2e4224dd81815a784002ebba30f2ebb34
49+
50+
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:
51+
https://github.com/decidim/decidim/commit/b12800717a689c295a9ea680a38ca9f823d2c454
52+
53+
### Credits
54+
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).
55+
cvss_v3: 5.7
56+
unaffected_versions:
57+
- "< 0.0.1.alpha3"
58+
patched_versions:
59+
- "~> 0.26.9"
60+
- ">= 0.27.5"
61+
related:
62+
url:
63+
- https://github.com/decidim/decidim/security/advisories/GHSA-w3q8-m492-4pwp
64+
- https://nvd.nist.gov/vuln/detail/CVE-2023-48220
65+
- https://github.com/decidim/decidim/commit/073e60e2e4224dd81815a784002ebba30f2ebb34
66+
- https://github.com/decidim/decidim/commit/b12800717a689c295a9ea680a38ca9f823d2c454
67+
- https://github.com/scambra/devise_invitable/commit/94d859c7de0829bf63f679ae5dd3cab2b866a098
68+
- https://github.com/decidim/decidim/blob/d2d390578050772d1bdb6d731395f1afc39dcbfc/decidim-core/config/initializers/devise.rb#L134
69+
- https://github.com/decidim/decidim/releases/tag/v0.26.9
70+
- https://github.com/decidim/decidim/releases/tag/v0.27.5
71+
- https://github.com/decidim/decidim/releases/tag/v0.28.0
72+
- https://github.com/scambra/devise_invitable/blob/41f58970ff76fb64382a9b9ea1bd530f7c3adab2/lib/devise_invitable/models.rb#L198
73+
- https://github.com/advisories/GHSA-w3q8-m492-4pwp
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
gem: decidim-templates
3+
cve: 2023-47635
4+
ghsa: f3qm-vfc3-jg6v
5+
url: https://github.com/decidim/decidim/security/advisories/GHSA-f3qm-vfc3-jg6v
6+
title: Possible CSRF attack at questionnaire templates preview
7+
date: 2024-02-20
8+
description: |
9+
### Impact
10+
The CSRF authenticity token check is currently disabled for the questionnaire templates preview as per:
11+
https://github.com/decidim/decidim/blob/3187bdfd40ea1c57c2c12512b09a7fec0b2bed08/decidim-templates/app/controllers/decidim/templates/admin/questionnaire_templates_controller.rb#L11
12+
13+
This was introduced by this commit in the PR that introduced this feature (#6247):
14+
https://github.com/decidim/decidim/pull/6247/commits/5542227be66e3b6d7530f5b536069bce09376660
15+
16+
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.
17+
18+
### Patches
19+
#11743
20+
21+
### Workarounds
22+
Disable the templates functionality or remove all available templates.
23+
24+
### References
25+
#11743
26+
cvss_v3: 4.5
27+
unaffected_versions:
28+
- "< 0.23.0"
29+
patched_versions:
30+
- ">= 0.27.5"
31+
related:
32+
url:
33+
- https://github.com/decidim/decidim/security/advisories/GHSA-f3qm-vfc3-jg6v
34+
- https://github.com/decidim/decidim/pull/11743
35+
- https://nvd.nist.gov/vuln/detail/CVE-2023-47635
36+
- https://github.com/decidim/decidim/pull/6247
37+
- https://github.com/decidim/decidim/commit/5542227be66e3b6d7530f5b536069bce09376660
38+
- https://github.com/decidim/decidim/commit/57a4b467787448307b5d9b01ce6e2c8502e121ac
39+
- https://github.com/decidim/decidim/blob/3187bdfd40ea1c57c2c12512b09a7fec0b2bed08/decidim-templates/app/controllers/decidim/templates/admin/questionnaire_templates_controller.rb#L11
40+
- https://github.com/decidim/decidim/releases/tag/v0.27.5
41+
- https://github.com/decidim/decidim/releases/tag/v0.28.0
42+
- https://github.com/advisories/GHSA-f3qm-vfc3-jg6v

gems/decidim/CVE-2023-47634.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
gem: decidim
3+
cve: 2023-47634
4+
ghsa: r275-j57c-7mf2
5+
url: https://github.com/decidim/decidim/security/advisories/GHSA-r275-j57c-7mf2
6+
title: Race condition in Endorsements
7+
date: 2024-02-20
8+
description: |
9+
"### Impact\n\nA race condition in the endorsement of resources (for
10+
instance, a proposal) allows a user to make more than once endorsement.\n\nTo exploit
11+
this vulnerability, the request to set an endorsement must be sent several times
12+
in parallel.\n \n### Workarounds\n\nDisable the Endorsement feature in the components. "
13+
cvss_v3: 3.1
14+
unaffected_versions:
15+
- "< 0.10.0"
16+
patched_versions:
17+
- "~> 0.26.9"
18+
- ">= 0.27.5"
19+
related:
20+
url:
21+
- https://github.com/decidim/decidim/security/advisories/GHSA-r275-j57c-7mf2
22+
- https://github.com/decidim/decidim/commit/5c5ee7a50d75c10643dd8c495e2517641e4d74db
23+
- https://github.com/decidim/decidim/commit/7b840d2c37a562709f4481db644d8c43add28536
24+
- https://github.com/advisories/GHSA-r275-j57c-7mf2

gems/decidim/CVE-2023-48220.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
gem: decidim
3+
cve: 2023-48220
4+
ghsa: w3q8-m492-4pwp
5+
url: https://github.com/decidim/decidim/security/advisories/GHSA-w3q8-m492-4pwp
6+
title: Possibility to circumvent the invitation token expiry period
7+
date: 2024-02-20
8+
description: |
9+
### Impact
10+
The invites feature allows users to accept the invitation for an unlimited amount of time through the password reset functionality.
11+
12+
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:
13+
https://github.com/scambra/devise_invitable/blob/41f58970ff76fb64382a9b9ea1bd530f7c3adab2/lib/devise_invitable/models.rb#L198
14+
15+
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:
16+
https://github.com/scambra/devise_invitable#model-configuration-
17+
18+
> `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.
19+
20+
Decidim sets this configuration to `2.weeks` so this configuration should be respected:
21+
https://github.com/decidim/decidim/blob/d2d390578050772d1bdb6d731395f1afc39dcbfc/decidim-core/config/initializers/devise.rb#L134
22+
23+
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.
24+
25+
### Patches
26+
Update `devise_invitable` to version `2.0.9` or above by running the following command:
27+
28+
```
29+
$ bundle update devise_invitable
30+
```
31+
32+
### Workarounds
33+
The invitations can be cancelled directly from the database by running the following command from the Rails console:
34+
35+
```
36+
> Decidim::User.invitation_not_accepted.update_all(invitation_token: nil)
37+
```
38+
39+
### References
40+
OWASP ASVS V4.0.3-2.3.1
41+
42+
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:
43+
https://github.com/scambra/devise_invitable/commit/94d859c7de0829bf63f679ae5dd3cab2b866a098
44+
45+
All versions since then are affected.
46+
47+
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:
48+
https://github.com/decidim/decidim/commit/073e60e2e4224dd81815a784002ebba30f2ebb34
49+
50+
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:
51+
https://github.com/decidim/decidim/commit/b12800717a689c295a9ea680a38ca9f823d2c454
52+
53+
### Credits
54+
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).
55+
cvss_v3: 5.7
56+
unaffected_versions:
57+
- "< 0.0.1.alpha3"
58+
patched_versions:
59+
- "~> 0.26.9"
60+
- ">= 0.27.5"
61+
related:
62+
url:
63+
- https://github.com/decidim/decidim/security/advisories/GHSA-w3q8-m492-4pwp
64+
- https://nvd.nist.gov/vuln/detail/CVE-2023-48220
65+
- https://github.com/decidim/decidim/commit/073e60e2e4224dd81815a784002ebba30f2ebb34
66+
- https://github.com/decidim/decidim/commit/b12800717a689c295a9ea680a38ca9f823d2c454
67+
- https://github.com/scambra/devise_invitable/commit/94d859c7de0829bf63f679ae5dd3cab2b866a098
68+
- https://github.com/decidim/decidim/blob/d2d390578050772d1bdb6d731395f1afc39dcbfc/decidim-core/config/initializers/devise.rb#L134
69+
- https://github.com/decidim/decidim/releases/tag/v0.26.9
70+
- https://github.com/decidim/decidim/releases/tag/v0.27.5
71+
- https://github.com/decidim/decidim/releases/tag/v0.28.0
72+
- https://github.com/scambra/devise_invitable/blob/41f58970ff76fb64382a9b9ea1bd530f7c3adab2/lib/devise_invitable/models.rb#L198
73+
- https://github.com/advisories/GHSA-w3q8-m492-4pwp

0 commit comments

Comments
 (0)