GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

GSD-2022-23518

Vulnerability from gsd - Updated: 2022-12-13 00:00
Details
## Summary rails-html-sanitizer `>= 1.0.3, < 1.4.4` is vulnerable to cross-site scripting via data URIs when used in combination with Loofah `>= 2.1.0`. ## Mitigation Upgrade to rails-html-sanitizer `>= 1.4.4`.
Aliases

{
  "GSD": {
    "alias": "CVE-2022-23518",
    "id": "GSD-2022-23518",
    "references": [
      "https://www.suse.com/security/cve/CVE-2022-23518.html"
    ]
  },
  "gsd": {
    "metadata": {
      "exploitCode": "unknown",
      "remediation": "unknown",
      "reportConfidence": "confirmed",
      "type": "vulnerability"
    },
    "osvSchema": {
      "affected": [
        {
          "package": {
            "ecosystem": "RubyGems",
            "name": "rails-html-sanitizer",
            "purl": "pkg:gem/rails-html-sanitizer"
          }
        }
      ],
      "aliases": [
        "CVE-2022-23518",
        "GHSA-mcvf-2q2m-x72m"
      ],
      "details": "## Summary\n\nrails-html-sanitizer `\u003e= 1.0.3, \u003c 1.4.4` is vulnerable to cross-site scripting via data URIs when used in combination with Loofah `\u003e= 2.1.0`.\n\n## Mitigation\n\nUpgrade to rails-html-sanitizer `\u003e= 1.4.4`.\n",
      "id": "GSD-2022-23518",
      "modified": "2022-12-13T00:00:00.000Z",
      "published": "2022-12-13T00:00:00.000Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m"
        },
        {
          "type": "WEB",
          "url": "https://cwe.mitre.org/data/definitions/79.html"
        },
        {
          "type": "WEB",
          "url": "https://github.com/w3c/svgwg/issues/266"
        },
        {
          "type": "WEB",
          "url": "https://github.com/rails/rails-html-sanitizer/issues/135"
        },
        {
          "type": "WEB",
          "url": "https://hackerone.com/reports/1694173"
        }
      ],
      "schema_version": "1.4.0",
      "severity": [
        {
          "score": 6.1,
          "type": "CVSS_V3"
        }
      ],
      "summary": "Improper neutralization of data URIs may allow XSS in rails-html-sanitizer"
    }
  },
  "namespaces": {
    "cve.org": {
      "CVE_data_meta": {
        "ASSIGNER": "security-advisories@github.com",
        "ID": "CVE-2022-23518",
        "STATE": "PUBLIC"
      },
      "affects": {
        "vendor": {
          "vendor_data": [
            {
              "product": {
                "product_data": [
                  {
                    "product_name": "rails-html-sanitizer",
                    "version": {
                      "version_data": [
                        {
                          "version_affected": "=",
                          "version_value": "\u003e= 1.0.3, \u003c 1.4.4"
                        }
                      ]
                    }
                  }
                ]
              },
              "vendor_name": "rails"
            }
          ]
        }
      },
      "data_format": "MITRE",
      "data_type": "CVE",
      "data_version": "4.0",
      "description": {
        "description_data": [
          {
            "lang": "eng",
            "value": "rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Versions \u003e= 1.0.3, \u003c 1.4.4 are vulnerable to cross-site scripting via data URIs when used in combination with Loofah \u003e= 2.1.0. This issue is patched in version 1.4.4."
          }
        ]
      },
      "impact": {
        "cvss": [
          {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "NONE",
            "baseScore": 6.1,
            "baseSeverity": "MEDIUM",
            "confidentialityImpact": "LOW",
            "integrityImpact": "LOW",
            "privilegesRequired": "NONE",
            "scope": "CHANGED",
            "userInteraction": "REQUIRED",
            "vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
            "version": "3.0"
          }
        ]
      },
      "problemtype": {
        "problemtype_data": [
          {
            "description": [
              {
                "cweId": "CWE-79",
                "lang": "eng",
                "value": "CWE-79: Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"
              }
            ]
          }
        ]
      },
      "references": {
        "reference_data": [
          {
            "name": "https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m",
            "refsource": "MISC",
            "url": "https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m"
          },
          {
            "name": "https://github.com/rails/rails-html-sanitizer/issues/135",
            "refsource": "MISC",
            "url": "https://github.com/rails/rails-html-sanitizer/issues/135"
          },
          {
            "name": "https://hackerone.com/reports/1694173",
            "refsource": "MISC",
            "url": "https://hackerone.com/reports/1694173"
          },
          {
            "name": "https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html",
            "refsource": "MISC",
            "url": "https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html"
          }
        ]
      },
      "source": {
        "advisory": "GHSA-mcvf-2q2m-x72m",
        "discovery": "UNKNOWN"
      }
    },
    "github.com/rubysec/ruby-advisory-db": {
      "cve": "2022-23518",
      "cvss_v3": 6.1,
      "date": "2022-12-13",
      "description": "## Summary\n\nrails-html-sanitizer `\u003e= 1.0.3, \u003c 1.4.4` is vulnerable to cross-site scripting via data URIs when used in combination with Loofah `\u003e= 2.1.0`.\n\n## Mitigation\n\nUpgrade to rails-html-sanitizer `\u003e= 1.4.4`.\n",
      "gem": "rails-html-sanitizer",
      "ghsa": "mcvf-2q2m-x72m",
      "patched_versions": [
        "\u003e= 1.4.4"
      ],
      "related": {
        "url": [
          "https://cwe.mitre.org/data/definitions/79.html",
          "https://github.com/w3c/svgwg/issues/266",
          "https://github.com/rails/rails-html-sanitizer/issues/135",
          "https://hackerone.com/reports/1694173"
        ]
      },
      "title": "Improper neutralization of data URIs may allow XSS in rails-html-sanitizer",
      "unaffected_versions": [
        "\u003c 1.0.3"
      ],
      "url": "https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m"
    },
    "gitlab.com": {
      "advisories": [
        {
          "affected_range": "\u003c=2.1.0",
          "affected_versions": "All versions up to 2.1.0",
          "cvss_v3": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
          "cwe_ids": [
            "CWE-1035",
            "CWE-79",
            "CWE-937"
          ],
          "date": "2022-12-16",
          "description": "rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Versions \u003e= 1.0.3, \u003c 1.4.4 is vulnerable to cross-site scripting via data URIs when used in combination with Loofah \u003e= 2.1.0. This issue is patched in version 1.4.4.",
          "fixed_versions": [
            "2.1.1"
          ],
          "identifier": "CVE-2022-23518",
          "identifiers": [
            "CVE-2022-23518",
            "GHSA-mcvf-2q2m-x72m"
          ],
          "not_impacted": "All versions after 2.1.0",
          "package_slug": "gem/loofah",
          "pubdate": "2022-12-14",
          "solution": "Upgrade to version 2.1.1 or above.",
          "title": "Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)",
          "urls": [
            "https://nvd.nist.gov/vuln/detail/CVE-2022-23518",
            "https://hackerone.com/reports/1694173",
            "https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m",
            "https://github.com/rails/rails-html-sanitizer/issues/135"
          ],
          "uuid": "e7a333b6-2f22-4e57-a9d3-91e8c7df2434"
        },
        {
          "affected_range": "\u003e=1.0.3 \u003c1.4.4",
          "affected_versions": "All versions starting from 1.0.3 before 1.4.4",
          "cvss_v3": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
          "cwe_ids": [
            "CWE-1035",
            "CWE-79",
            "CWE-937"
          ],
          "date": "2022-12-16",
          "description": "rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Versions \u003e= 1.0.3, \u003c 1.4.4 is vulnerable to cross-site scripting via data URIs when used in combination with Loofah \u003e= 2.1.0. This issue is patched in version 1.4.4.",
          "fixed_versions": [
            "1.4.4"
          ],
          "identifier": "CVE-2022-23518",
          "identifiers": [
            "CVE-2022-23518",
            "GHSA-mcvf-2q2m-x72m",
            "GMS-2022-8300"
          ],
          "not_impacted": "All versions before 1.0.3, all versions starting from 1.4.4",
          "package_slug": "gem/rails-html-sanitizer",
          "pubdate": "2022-12-14",
          "solution": "Upgrade to version 1.4.4 or above.",
          "title": "Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)",
          "urls": [
            "https://nvd.nist.gov/vuln/detail/CVE-2022-23518",
            "https://hackerone.com/reports/1694173",
            "https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m",
            "https://github.com/rails/rails-html-sanitizer/issues/135",
            "https://github.com/w3c/svgwg/issues/266",
            "https://github.com/advisories/GHSA-mcvf-2q2m-x72m"
          ],
          "uuid": "20929dd8-f81f-466e-840a-a2cac4d42a66"
        },
        {
          "affected_range": "\u003c0",
          "affected_versions": "All versions starting from 1.0.3 before 1.4.4",
          "cwe_ids": [
            "CWE-1035",
            "CWE-937"
          ],
          "date": "2022-12-13",
          "description": "## Summary\n\nrails-html-sanitizer `\u003e= 1.0.3, \u003c 1.4.4` is vulnerable to cross-site scripting via data URIs when used in combination with Loofah `\u003e= 2.1.0`.\n\n\n## Mitigation\n\nUpgrade to rails-html-sanitizer `\u003e= 1.4.4`.\n\n\n## Severity\n\nThe maintainers have evaluated this as [Medium Severity 6.1](https://www.first.org/cvss/calculator/3.0#.\n\n\n## References\n\n- [CWE - CWE-79: Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027) (4.9)](https://cwe.mitre.org/data/definitions/79.html)\n- [SVG MIME Type (image/svg+xml) is misleading to developers \u00b7 Issue #266 \u00b7 w3c/svgwg](https://github.com/w3c/svgwg/issues/266)\n- https://github.com/rails/rails-html-sanitizer/issues/135\n- https://hackerone.com/reports/1694173\n\n\n## Credit\n\nThis vulnerability was independently reported by Maciej Piechota (@haqpl) and Mrinmoy Das (@goromlagche).\n",
          "fixed_versions": [
            "1.4.4"
          ],
          "identifier": "GMS-2022-8300",
          "identifiers": [
            "GHSA-mcvf-2q2m-x72m",
            "GMS-2022-8300",
            "CVE-2022-23518"
          ],
          "not_impacted": "All versions before 1.0.3, all versions starting from 1.4.4",
          "package_slug": "gem/rails-html-sanitizer",
          "pubdate": "2022-12-13",
          "solution": "Upgrade to version 1.4.4 or above.",
          "title": "Duplicate of ./gem/rails-html-sanitizer/CVE-2022-23518.yml",
          "urls": [
            "https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m",
            "https://github.com/rails/rails-html-sanitizer/issues/135",
            "https://github.com/w3c/svgwg/issues/266",
            "https://hackerone.com/reports/1694173",
            "https://github.com/advisories/GHSA-mcvf-2q2m-x72m"
          ],
          "uuid": "dcee3852-4127-4c99-898d-9b3eae0d7ddb"
        }
      ]
    },
    "nvd.nist.gov": {
      "cve": {
        "configurations": [
          {
            "nodes": [
              {
                "cpeMatch": [
                  {
                    "criteria": "cpe:2.3:a:rubyonrails:rails_html_sanitizers:*:*:*:*:*:rails:*:*",
                    "matchCriteriaId": "B07277FF-73C7-4F2C-8515-8927193955B2",
                    "versionEndExcluding": "1.4.4",
                    "versionStartIncluding": "1.0.3",
                    "vulnerable": true
                  }
                ],
                "negate": false,
                "operator": "OR"
              }
            ]
          },
          {
            "nodes": [
              {
                "cpeMatch": [
                  {
                    "criteria": "cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*",
                    "matchCriteriaId": "07B237A9-69A3-4A9C-9DA0-4E06BD37AE73",
                    "vulnerable": true
                  }
                ],
                "negate": false,
                "operator": "OR"
              }
            ]
          },
          {
            "nodes": [
              {
                "cpeMatch": [
                  {
                    "criteria": "cpe:2.3:a:loofah_project:loofah:*:*:*:*:*:ruby:*:*",
                    "matchCriteriaId": "68F8B0CB-F78F-410C-942F-7FA80481474D",
                    "versionEndExcluding": "2.19.1",
                    "versionStartIncluding": "2.1.0",
                    "vulnerable": true
                  }
                ],
                "negate": false,
                "operator": "OR"
              }
            ]
          }
        ],
        "descriptions": [
          {
            "lang": "en",
            "value": "rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Versions \u003e= 1.0.3, \u003c 1.4.4 are vulnerable to cross-site scripting via data URIs when used in combination with Loofah \u003e= 2.1.0. This issue is patched in version 1.4.4."
          },
          {
            "lang": "es",
            "value": "rails-html-sanitizer es responsable de sanitizar fragmentos HTML en aplicaciones Rails. Las versiones \u0026gt;= 1.0.3, \u0026lt; 1.4.4 son vulnerables a Cross-Site Scripting (XSS) a trav\u00e9s de URI de datos cuando se usan en combinaci\u00f3n con Loofah \u0026gt;= 2.1.0. Este problema est\u00e1 parcheado en la versi\u00f3n 1.4.4."
          }
        ],
        "id": "CVE-2022-23518",
        "lastModified": "2024-02-01T16:06:58.297",
        "metrics": {
          "cvssMetricV30": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "NETWORK",
                "availabilityImpact": "NONE",
                "baseScore": 6.1,
                "baseSeverity": "MEDIUM",
                "confidentialityImpact": "LOW",
                "integrityImpact": "LOW",
                "privilegesRequired": "NONE",
                "scope": "CHANGED",
                "userInteraction": "REQUIRED",
                "vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
                "version": "3.0"
              },
              "exploitabilityScore": 2.8,
              "impactScore": 2.7,
              "source": "security-advisories@github.com",
              "type": "Secondary"
            }
          ],
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "NETWORK",
                "availabilityImpact": "NONE",
                "baseScore": 6.1,
                "baseSeverity": "MEDIUM",
                "confidentialityImpact": "LOW",
                "integrityImpact": "LOW",
                "privilegesRequired": "NONE",
                "scope": "CHANGED",
                "userInteraction": "REQUIRED",
                "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
                "version": "3.1"
              },
              "exploitabilityScore": 2.8,
              "impactScore": 2.7,
              "source": "nvd@nist.gov",
              "type": "Primary"
            }
          ]
        },
        "published": "2022-12-14T17:15:10.713",
        "references": [
          {
            "source": "security-advisories@github.com",
            "tags": [
              "Exploit",
              "Issue Tracking",
              "Third Party Advisory"
            ],
            "url": "https://github.com/rails/rails-html-sanitizer/issues/135"
          },
          {
            "source": "security-advisories@github.com",
            "tags": [
              "Third Party Advisory"
            ],
            "url": "https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m"
          },
          {
            "source": "security-advisories@github.com",
            "tags": [
              "Permissions Required",
              "Third Party Advisory"
            ],
            "url": "https://hackerone.com/reports/1694173"
          },
          {
            "source": "security-advisories@github.com",
            "tags": [
              "Mailing List",
              "Third Party Advisory"
            ],
            "url": "https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html"
          }
        ],
        "sourceIdentifier": "security-advisories@github.com",
        "vulnStatus": "Analyzed",
        "weaknesses": [
          {
            "description": [
              {
                "lang": "en",
                "value": "CWE-79"
              }
            ],
            "source": "security-advisories@github.com",
            "type": "Primary"
          }
        ]
      }
    }
  }
}



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…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…