Skip to content

Commit 432e641

Browse files
jasnowpostmodern
authored andcommitted
3 advisories from GHSA sync script
1 parent 5a81054 commit 432e641

File tree

3 files changed

+154
-0
lines changed

3 files changed

+154
-0
lines changed

gems/RedCloth/CVE-2023-31606.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
gem: RedCloth
3+
cve: 2023-31606
4+
ghsa: qcm3-vfq5-wfr2
5+
url: https://github.com/e23e/CVE-2023-31606#readme
6+
title: RedCloth Regular Expression Denial of Service issue
7+
date: 2023-06-06
8+
description: |
9+
A Regular Expression Denial of Service (ReDoS) issue was discovered
10+
in the "sanitize_html" function of RedCloth gem >= v4.0.0.
11+
This vulnerability allows attackers to cause a
12+
Denial of Service (DoS) via supplying a crafted payload.
13+
cvss_v3: 7.5
14+
unaffected_versions:
15+
- "< 4.0.0"
16+
notes: "Never patched: vulnerableVersionRange: <= 4.3.2; NVD has no cvss values"
17+
related:
18+
url:
19+
- https://nvd.nist.gov/vuln/detail/CVE-2023-31606
20+
- https://github.com/e23e/CVE-2023-31606#readme
21+
- https://github.com/jgarber/redcloth/issues/73
22+
- https://github.com/jgarber/redcloth/blob/v4.3.2/lib/redcloth/formatters/html.rb#L327
23+
- https://github.com/advisories/GHSA-qcm3-vfq5-wfr2

gems/avo/CVE-2023-34102.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
gem: avo
3+
cve: 2023-34102
4+
ghsa: 86h2-2g4g-29qx
5+
url: https://github.com/avo-hq/avo/security/advisories/GHSA-86h2-2g4g-29qx
6+
title: avo possible unsafe reflection / partial DoS vulnerability
7+
date: 2023-06-06
8+
description: |
9+
### Summary
10+
11+
"The polymorphic field type stores the classes to operate on when updating
12+
a record with user input, and does not validate them in the back end.
13+
This can lead to unexpected behavior, remote code execution, or
14+
application crashes when viewing a manipulated record.
15+
16+
### Details
17+
18+
After reviewing the polymorphic field implementation and performing
19+
some black box approaches, we identified a potential security issue
20+
related to the use of safe_constantize / constantize. This Rails
21+
functionality is capable of searching for classes within the Rails
22+
context and returning the class for further use. Because Avo does
23+
not validate user input when updating or creating a new polymorphic
24+
resource, it is possible to create database entries with completely
25+
different or invalid class names than the preselected ones. Avo
26+
assumes that the class specified by the user request is a valid one
27+
and attempts to work with it, which may result in dangerous behavior
28+
and code execution.
29+
30+
### PoC
31+
32+
![image](https://user-images.githubusercontent.com/26464774/243437854-933d94c8-4ae0-43fe-b2da-35b103e28796.png)\n_In the test scenario we choose the demo app and the review resource which has a polymorphic
33+
reviewable field._![image](https://user-images.githubusercontent.com/26464774/243437954-2d947c6d-4e97-4e91-a442-405e553dd047.png)\n_Intercepting
34+
the request and switching the review[reviewable_type] from “Fish”
35+
to “File” which is a real class inside Rails_![image](https://user-images.githubusercontent.com/26464774/243438031-109de6d0-9370-4318-b18e-c5bcea61cf54.png)\n_Corrupting
36+
the database with unusable classes will cause a crash at the
37+
application while viewing the new record or the index
38+
view (partial DoS)_\n\n![image](https://user-images.githubusercontent.com/26464774/243438104-80df5aae-86de-40fc-870d-689a03cae389.png)\n_Manual
39+
delete the corrupted resource in order to recover the applications functionality_\n\n![image](https://user-images.githubusercontent.com/26464774/243438182-1e7eef54-73ba-47d0-b5df-4bad14859af3.png)\n_Of
40+
course it is possible to use other class names or namespaces. The
41+
local development environment displays the backend error message
42+
when visiting a corrupted record. Avo is trying to apply a scope to
43+
this class that does not exist._\n\n![image](https://user-images.githubusercontent.com/26464774/243438257-dbb59153-58a8-4421-b796-f2a0f2c20083.png)\n_Specifying
44+
an invalid class name in the parameter will cause the application
45+
to crash again while trying constanize the provided string_
46+
47+
### Impact
48+
49+
The final exploitation of this vulnerability requires more time than
50+
is provided in this assessment, but initial testing of the post request
51+
shows the potential critical risk. The classes could be instantiated
52+
at any point in the code and this could also lead to code execution.
53+
54+
### Recommendation
55+
56+
Avo should be configured to never trust user-supplied input, especially
57+
when defining classes for records. In this particular case, Avo can
58+
evaluate the options list given for the polymorphic field and only allow
59+
strings from that list. With this white-list approach, an attacker
60+
cannot supply unintended classes."
61+
cvss_v3: 8.3
62+
patched_versions:
63+
- ">= 2.33.3"
64+
related:
65+
url:
66+
- https://github.com/avo-hq/avo/security/advisories/GHSA-86h2-2g4g-29qx
67+
- https://nvd.nist.gov/vuln/detail/CVE-2023-34102
68+
- https://github.com/avo-hq/avo/commit/ec117882ddb1b519481bdd046dc3cfa4474e6e17
69+
- https://github.com/avo-hq/avo/releases/tag/v2.33.3
70+
- https://github.com/advisories/GHSA-86h2-2g4g-29qx

gems/avo/CVE-2023-34103.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
gem: avo
3+
cve: 2023-34103
4+
ghsa: 5cr9-5jx3-2g39
5+
url: https://github.com/avo-hq/avo/security/advisories/GHSA-5cr9-5jx3-2g39
6+
title: avo vulnerable to Stored XSS (Cross Site Scripting) in
7+
html content based fields
8+
date: 2023-06-06
9+
description: |
10+
### Summary
11+
12+
Some avo fields are vulnerable to XSS when rendering html based content.
13+
14+
### Details
15+
During the analysis of the web application, a rendered field was
16+
discovered that did not filter JS / HTML tags in a safe way and can
17+
be abused to execute js code on a client side. The trix field uses
18+
the trix editor in the backend to edit rich text data which basically
19+
operates with html tags. To display the stored data in a rendered view,
20+
the HasHTMLAttributes concern is used. This can be exploited by an
21+
attacker to store javascript code in any trix field by intercepting
22+
the request and modifying the post data, as the trix editor does not
23+
allow adding custom html or js tags on the frontend.
24+
25+
### PoC
26+
27+
![image](https://user-images.githubusercontent.com/26464774/243434868-47857054-9b20-437f-842f-0750d53c9b0e.png)
28+
_Adding javascript in the post request which is used when editing a "post" resource (body is declared as a trix field)_
29+
![image](https://user-images.githubusercontent.com/26464774/243435009-948593a0-5179-4368-977c-ec36d2373925.png)
30+
_Successful execution of JS code on live demo environment_
31+
32+
### Impact
33+
34+
Unlike non-persistent XSS, persistent XSS does not require a social
35+
engineering phase. Victims of this attack do not need to be tricked
36+
into clicking a link or something like that. However, by exploiting
37+
such a vulnerability on this particular target, attackers may be able
38+
to gain access to accounts that require special protection, such as
39+
administrators of the web service, which is what Avo is primarily
40+
intended to be used for.
41+
42+
### Recommendation
43+
44+
The content of a field that contains html code should be sanitized
45+
using the according rails helper which uses a whitelist of known-safe
46+
tags and attributes. Also this security consideration should be
47+
applied to the “as_html” attribute as well because it may contain
48+
user controlled input as well.
49+
50+
https://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html
51+
52+
cvss_v3: 7.3
53+
patched_versions:
54+
- ">= 2.33.3"
55+
related:
56+
url:
57+
- https://github.com/avo-hq/avo/security/advisories/GHSA-5cr9-5jx3-2g39
58+
- https://nvd.nist.gov/vuln/detail/CVE-2023-34103
59+
- https://github.com/avo-hq/avo/releases/tag/v2.33.3
60+
- https://github.com/avo-hq/avo/commit/7891c01e1fba9ca5d7dbccc43d27f385e5d08563
61+
- https://github.com/advisories/GHSA-5cr9-5jx3-2g39

0 commit comments

Comments
 (0)