Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS01Y3I5LTVqeDMtMmczOc4AAzrM

avo vulnerable to Stored XSS (Cross Site Scripting) in html content based fields

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.

PoC

image
Adding javascript in the post request which is used when editing a "post" resource (body is declared as a trix field)

image
Successful execution of JS code on live demo environment

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

Permalink: https://github.com/advisories/GHSA-5cr9-5jx3-2g39
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS01Y3I5LTVqeDMtMmczOc4AAzrM
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: 11 months ago
Updated: 6 months ago


CVSS Score: 7.3
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N

Identifiers: GHSA-5cr9-5jx3-2g39, CVE-2023-34103
References: Repository: https://github.com/avo-hq/avo
Blast Radius: 10.7

Affected Packages

rubygems:avo
Dependent packages: 0
Dependent repositories: 29
Downloads: 640,525 total
Affected Version Ranges: >= 3.0.0.pre1, <= 3.0.0.pre12, <= 2.33.2
F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