VYPR
High severityNVD Advisory· Published Jan 16, 2024· Updated Oct 21, 2024

Stored cross-site scripting (XSS) in `key_value` field in Avo

CVE-2024-22191

Description

Avo is a framework to create admin panels for Ruby on Rails apps. A stored cross-site scripting (XSS) vulnerability was found in the key_value field of Avo v3.2.3 and v2.46.0. This vulnerability could allow an attacker to execute arbitrary JavaScript code in the victim's browser. 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 could be used to steal sensitive information from victims that could be used to hijack victims' accounts or redirect them to malicious websites. Avo 3.2.4 and 2.47.0 include a fix for this issue. Users are advised to upgrade.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
avoRubyGems
>= 3.0.0.beta1, < 3.2.43.2.4
avoRubyGems
< 2.47.02.47.0

Affected products

1

Patches

2
fc92a05a8556

security: v2 CVE-2024-22191 (#2382)

https://github.com/avo-hq/avoPaul BobJan 18, 2024via ghsa
3 files changed · +8 1
  • app/javascript/js/controllers/fields/key_value_controller.js+2 1 modified
    @@ -1,4 +1,5 @@
     /* eslint-disable max-len */
    +import * as DOMPurify from 'dompurify'
     import { Controller } from '@hotwired/stimulus'
     import { castBoolean } from '../../helpers/cast_boolean'
     
    @@ -80,7 +81,7 @@ export default class extends Controller {
         let index = 0
         this.fieldValue.forEach((row) => {
           const [key, value] = row
    -      result += this.interpolatedRow(key, value, index)
    +      result += this.interpolatedRow(DOMPurify.sanitize(key), DOMPurify.sanitize(value), index)
           index++
         })
         this.rowsTarget.innerHTML = result
    
  • package.json+1 0 modified
    @@ -36,6 +36,7 @@
         "codemirror": "5.59.1",
         "core-js": "^3.21.0",
         "css-loader": "^6.7.0",
    +    "dompurify": "^3.0.8",
         "easymde": "^2.18.0",
         "el-transition": "^0.0.7",
         "esbuild": "^0.14.25",
    
  • yarn.lock+5 0 modified
    @@ -1298,6 +1298,11 @@ doctrine@^3.0.0:
       dependencies:
         esutils "^2.0.2"
     
    +dompurify@^3.0.8:
    +  version "3.0.8"
    +  resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.0.8.tgz#e0021ab1b09184bc8af7e35c7dd9063f43a8a437"
    +  integrity sha512-b7uwreMYL2eZhrSCRC4ahLTeZcPZxSmYfmcQGXGkXiZSNW1X85v+SDM5KsWcpivIiUBH47Ji7NtyUdpLeF5JZQ==
    +
     easymde@^2.18.0:
       version "2.18.0"
       resolved "https://registry.yarnpkg.com/easymde/-/easymde-2.18.0.tgz#ff1397d07329b1a7b9187d2d0c20766fa16b3b1b"
    
51bb80b181cd

security: sanitize key_value field content (#2357)

https://github.com/avo-hq/avoAdrian MarinJan 12, 2024via ghsa
3 files changed · +8 1
  • app/javascript/js/controllers/fields/key_value_controller.js+2 1 modified
    @@ -1,4 +1,5 @@
     /* eslint-disable max-len */
    +import * as DOMPurify from 'dompurify'
     import { Controller } from '@hotwired/stimulus'
     import { castBoolean } from '../../helpers/cast_boolean'
     
    @@ -80,7 +81,7 @@ export default class extends Controller {
         let index = 0
         this.fieldValue.forEach((row) => {
           const [key, value] = row
    -      result += this.interpolatedRow(key, value, index)
    +      result += this.interpolatedRow(DOMPurify.sanitize(key), DOMPurify.sanitize(value), index)
           index++
         })
         this.rowsTarget.innerHTML = result
    
  • package.json+1 0 modified
    @@ -34,6 +34,7 @@
         "codemirror": "5.59.1",
         "core-js": "^3.35.0",
         "css-loader": "^6.9.0",
    +    "dompurify": "^3.0.8",
         "easymde": "^2.18.0",
         "el-transition": "^0.0.7",
         "esbuild": "^0.14.54",
    
  • yarn.lock+5 0 modified
    @@ -2090,6 +2090,11 @@ doctrine@^3.0.0:
       dependencies:
         esutils "^2.0.2"
     
    +dompurify@^3.0.8:
    +  version "3.0.8"
    +  resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.0.8.tgz#e0021ab1b09184bc8af7e35c7dd9063f43a8a437"
    +  integrity sha512-b7uwreMYL2eZhrSCRC4ahLTeZcPZxSmYfmcQGXGkXiZSNW1X85v+SDM5KsWcpivIiUBH47Ji7NtyUdpLeF5JZQ==
    +
     easymde@^2.18.0:
       version "2.18.0"
       resolved "https://registry.yarnpkg.com/easymde/-/easymde-2.18.0.tgz#ff1397d07329b1a7b9187d2d0c20766fa16b3b1b"
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

6

News mentions

0

No linked articles in our index yet.