CVE-2024-22191: avo vulnerable to stored cross-site scripting (XSS) in key_value field
Summary A stored cross-site scripting (XSS) vulnerability was found in the keyvalue 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 keyvalue is inserted directly into the HTML code.
Published Jan 16, 2024 · Updated Jan 18, 2024
Affected packages
avo
- Ecosystem
- RubyGems
- Affected
- >= 3.0.0.beta1, <= 3.2.3
- Fixed in
- 3.2.4
- Check
bundle info avo
avo
- Ecosystem
- RubyGems
- Affected
- <= 2.46.0
- Fixed in
- 2.47.0
- Check
bundle info avo
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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]( https://github.com/avo-hq/avo/blob/main/app/components/avo/fields/common/key_value_component.html.erb#L38C21-L38C33) the value is taken in lines 38 and 49 and seems to be interpreted directly as html in lines 44 and 55.
PoC
POC
To reproduce the vulnerability, follow these steps:
- Edit an entry with a key_value field.
- Enter the following payload into the value field:
3. Save the entry.
4. Go to the index page and click on the eye icon next to the entry.
The malicious JavaScript code will be executed and an alert box will be displayed.
_On the show and edit page the alert seems not to pop up, but the strong tag breaks out of the expected html tag_
### 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.Credited to Mys7ic, FLX-0x00, tamaloa.
References
- https://github.com/avo-hq/avo/security/advisories/GHSA-ghjv-mh6x-7q6h
- https://github.com/avo-hq/avo/commit/51bb80b181cd8e31744bdc4e7f9b501c81172347
- https://nvd.nist.gov/vuln/detail/CVE-2024-22191
- https://github.com/avo-hq/avo/commit/fc92a05a8556b1787c8694643286a1afa6a71258
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/avo/CVE-2024-22191.yml
- https://github.com/advisories/GHSA-ghjv-mh6x-7q6h
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More RubyGems vulnerabilities
All RubyGems entriesCVE-2026-53769
Avo: Direct attachment upload endpoint lacks upload authorization and bypasses field-level upload policy
medium6.5Jul 9, 2026CVE-2026-55518
Avo: Missing Authorization in Avo Association Attach Endpoint Allows Unauthorized Relationship Manipulation and Privilege Escalation
critical9.6Jun 17, 2026CVE-2026-42205
Avo: Broken Access Control Through Unauthorized Execution of Arbitrary Action Classes Across Resources
high8.8Apr 24, 2026CVE-2026-33209
Avo has a XSS vulnerability on `return_to` param
medium5.3Mar 18, 2026CVE-2024-22411
Cross-site scripting (XSS) in Action messages on Avo
medium6.5Jan 17, 2024
