{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "source": "REFERENCES"
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "92721970"
            }
          ],
          "repo": "https://github.com/gnome/libxml2",
          "type": "GIT"
        },
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "1.16.0"
              },
              {
                "fixed": "1.16.2"
              },
              {
                "introduced": "0"
              },
              {
                "fixed": "1.15.6"
              }
            ],
            "source": "AFFECTED_FIELD"
          },
          "events": [
            {
              "introduced": "34571990eaac1c95a3dea31fd8f31b6baa18df47"
            },
            {
              "fixed": "673756fdd69d1036874b7d7250cc38a51fd4d7b8"
            },
            {
              "introduced": "0"
            },
            {
              "fixed": "7ab63106edb578880c3436c0cc9597e271b5dfcd"
            }
          ],
          "repo": "https://github.com/sparklemotion/nokogiri",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-xc9x-jj77-9p9j"
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-416"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/58xxx/CVE-2024-58378.json"
  },
  "details": "Nokogiri before 1.15.6 and 1.16.x before 1.16.2 (CRuby, when using the packaged libxml2) is affected by a use-after-free vulnerability in libxml2 (CVE-2024-25062) in the xmlTextReader module, which underlies Nokogiri::XML::Reader. When using the XML Reader interface with DTD validation and XInclude expansion enabled, processing a crafted XML document can lead to an xmlValidatePopElement use-after-free. Nokogiri 1.15.6 and 1.16.2 resolve this by upgrading the packaged libxml2 to 2.11.7 and 2.12.5 respectively. JRuby and installations using system libxml2 are not affected.",
  "id": "CVE-2024-58378",
  "modified": "2026-08-30T03:30:36.812571652Z",
  "published": "2026-08-25T15:15:57.242Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/58xxx/CVE-2024-58378.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-xc9x-jj77-9p9j"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-58378"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/nokogiri-before-use-after-free-via-xmltextreader"
    },
    {
      "type": "FIX",
      "url": "https://github.com/GNOME/libxml2/commit/92721970"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Nokogiri before 1.16.2 Use-After-Free via xmlTextReader"
}