{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "source": "REFERENCES"
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "644a89e080bced793295f61f18aac8cfad6bece2"
            },
            {
              "fixed": "c846986356fc149915a74972bf198abc266bc2c0"
            }
          ],
          "repo": "https://github.com/gnome/libxml2",
          "type": "GIT"
        },
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:nokogiri:nokogiri:*:*:*:*:*:ruby:*:*",
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "1.13.9"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "CPE_RANGE"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "897759cc25b57ebf2754897e910c86931dec7d39"
            }
          ],
          "repo": "https://github.com/sparklemotion/nokogiri",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-2qc6-mcvw-92cw"
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-476"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50998.json"
  },
  "details": "Nokogiri before 1.13.9 (CRuby implementation using packaged libraries) bundles libxml2 v2.9.14, which is affected by CVE-2022-40304 (data corruption / double-free from an entity reference cycle when entity content is allocated from a dict) and CVE-2022-40303 (integer overflows when parsing with XML_PARSE_HUGE). Nokogiri 1.13.9 upgrades the packaged libxml2 to v2.10.3 to address these issues. Processing crafted XML input may lead to denial of service or memory corruption. (The advisory also references CVE-2022-2309, a NULL pointer dereference via iterwalk/canonicalize, which maintainers determined does not affect Nokogiri users.)",
  "id": "CVE-2022-50998",
  "modified": "2026-09-03T03:31:03.748552709Z",
  "published": "2026-08-25T15:15:53.830Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50998.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-2qc6-mcvw-92cw"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-50998"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/nokogiri-before-multiple-vulnerabilities-via-libxml2-2"
    },
    {
      "type": "FIX",
      "url": "https://github.com/GNOME/libxml2/commit/644a89e080bced793295f61f18aac8cfad6bece2"
    },
    {
      "type": "FIX",
      "url": "https://github.com/GNOME/libxml2/commit/c846986356fc149915a74972bf198abc266bc2c0"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Nokogiri before 1.13.9 Multiple Vulnerabilities via libxml2"
}