avo 0.3.2
avo vulnerable to stored cross-site scripting (XSS) in key_value field
high severity CVE-2024-22191>= 3.2.4
, ~> 2.47, >= 2.47
Summary
A stored cross-site scripting (XSS) vulnerability was found in the key_value field of Avo v3.2.3. This vulnerability could allow an attacker to execute arbitrary JavaScript code in the victim's browser.
Details
The value of the key_value is inserted directly into the HTML code. In the current version of Avo (possibly also older versions), the value is not properly sanitized before it is inserted into the HTML code.
This vulnerability can be exploited by an attacker to inject malicious JavaScript code into the key_value field. When a victim views the page containing the malicious code, the code will be executed in their browser.
In avo/fields/common/key_value_component.html.erb the value is taken in lines 38 and 49 and seems to be interpreted directly as html in lines 44 and 55.
Impact
This vulnerability could be used to steal sensitive information from victims that could be used to hijack victims' accounts or redirect them to malicious websites.
avo vulnerable to Stored XSS (Cross Site Scripting) in html content based fields
high severity CVE-2023-34103>= 2.33.3
Summary
Some avo fields are vulnerable to XSS when rendering html based content.
Details
During the analysis of the web application, a rendered field was discovered that did not filter JS / HTML tags in a safe way and can be abused to execute js code on a client side. The trix field uses the trix editor in the backend to edit rich text data which basically operates with html tags. To display the stored data in a rendered view, the HasHTMLAttributes concern is used. This can be exploited by an attacker to store javascript code in any trix field by intercepting the request and modifying the post data, as the trix editor does not allow adding custom html or js tags on the frontend.
Impact
Unlike non-persistent XSS, persistent XSS does not require a social engineering phase. Victims of this attack do not need to be tricked into clicking a link or something like that. However, by exploiting such a vulnerability on this particular target, attackers may be able to gain access to accounts that require special protection, such as administrators of the web service, which is what Avo is primarily intended to be used for.
Recommendation
The content of a field that contains html code should be sanitized using the according rails helper which uses a whitelist of known-safe tags and attributes. Also this security consideration should be applied to the “as_html” attribute as well because it may contain user controlled input as well.
https://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html
avo possible unsafe reflection / partial DoS vulnerability
high severity CVE-2023-34102>= 2.33.3
Summary
The polymorphic field type stores the classes to operate on when updating a record with user input, and does not validate them in the back end. This can lead to unexpected behavior, remote code execution, or application crashes when viewing a manipulated record.
Details
After reviewing the polymorphic field implementation and performing some black box approaches, we identified a potential security issue related to the use of safe_constantize / constantize. This Rails functionality is capable of searching for classes within the Rails context and returning the class for further use. Because Avo does not validate user input when updating or creating a new polymorphic resource, it is possible to create database entries with completely different or invalid class names than the preselected ones. Avo assumes that the class specified by the user request is a valid one and attempts to work with it, which may result in dangerous behavior and code execution.
Impact
The final exploitation of this vulnerability requires more time than is provided in this assessment, but initial testing of the post request shows the potential critical risk. The classes could be instantiated at any point in the code and this could also lead to code execution.
Recommendation
Avo should be configured to never trust user-supplied input, especially when defining classes for records. In this particular case, Avo can evaluate the options list given for the polymorphic field and only allow strings from that list. With this white-list approach, an attacker cannot supply unintended classes.
Cross-site scripting (XSS) in Action messages on Avo
medium severity CVE-2024-22411>= 3.3.0
, ~> 2.47, >= 2.47
Avo is a framework to create admin panels for Ruby on Rails apps.
In Avo 3 pre12 any HTML inside text that is passed to error
or
succeed
in an Avo::BaseAction
subclass will be rendered directly
without sanitization in the toast/notification that appears in the
UI on Action completion. A malicious user could exploit this
vulnerability to trigger a cross site scripting attack on an
unsuspecting user.
This issue has been addressed in the 3.0.2 release of Avo. Users are advised to upgrade.
No officially reported memory leakage issues detected.
This gem version does not have any officially reported memory leaked issues.
No license issues detected.
This gem version has a license in the gemspec.
This gem version is available.
This gem version has not been yanked and is still available for usage.