GHSA-GHJV-MH6X-7Q6H

Vulnerability from github – Published: 2024-01-16 15:24 – Updated: 2024-06-25 16:56
VLAI?
Summary
avo vulnerable to stored cross-site scripting (XSS) in key_value field
Details

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.

PoC

POC

To reproduce the vulnerability, follow these steps:

  1. Edit an entry with a key_value field.
  2. Enter the following payload into the value field: ```POC\"> alert( 'XSS in key_value' ); Outside-tag
Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 3.2.3"
      },
      "package": {
        "ecosystem": "RubyGems",
        "name": "avo"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "3.0.0.beta1"
            },
            {
              "fixed": "3.2.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 2.46.0"
      },
      "package": {
        "ecosystem": "RubyGems",
        "name": "avo"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.47.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2024-22191"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2024-01-16T15:24:00Z",
    "nvd_published_at": "2024-01-16T22:15:46Z",
    "severity": "HIGH"
  },
  "details": "### Summary\nA **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\u0027s browser.\n\n### Details\nThe 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.\n\nThis 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.\n\nIn [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**.\n\n### PoC\n\n![POC](https://user-images.githubusercontent.com/26570201/295596307-5d4f563e-99c0-4981-a82e-fc42cfd902c5.gif)\n\n\nTo reproduce the vulnerability, follow these steps:\n\n1. Edit an entry with a key_value field.\n2. Enter the following payload into the value field:\n```POC\\\"\u003e \u003cscript\u003ealert( \u0027XSS in key_value\u0027 );\u003c/script\u003e \u003cstrong\u003eOutside-tag\u003c/strong```\n3. Save the entry.\n4. Go to the index page and click on the eye icon next to the entry.\n\nThe malicious JavaScript code will be executed and an alert box will be displayed. \n_On the show and edit page the alert seems not to pop up, but the strong tag breaks out of the expected html tag_\n\n### Impact\nThis vulnerability could be used to steal sensitive information from victims that could be used to hijack victims\u0027 accounts or redirect them to malicious websites.\n",
  "id": "GHSA-ghjv-mh6x-7q6h",
  "modified": "2024-06-25T16:56:00Z",
  "published": "2024-01-16T15:24:00Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/avo-hq/avo/security/advisories/GHSA-ghjv-mh6x-7q6h"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-22191"
    },
    {
      "type": "WEB",
      "url": "https://github.com/avo-hq/avo/commit/51bb80b181cd8e31744bdc4e7f9b501c81172347"
    },
    {
      "type": "WEB",
      "url": "https://github.com/avo-hq/avo/commit/fc92a05a8556b1787c8694643286a1afa6a71258"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/avo-hq/avo"
    },
    {
      "type": "WEB",
      "url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/avo/CVE-2024-22191.yml"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "avo vulnerable to stored cross-site scripting (XSS) in key_value field"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…