GHSA-vvfq-8hwr-qm4m: Nokogiri Nokogiri Updates Packaged Libxml2 To Vulnerability

LOW
CWE-121 CWE-1395 CWE-416
Published
Advisory Summary

GHSA-vvfq-8hwr-qm4m is a LOW nokogiri updates packaged libxml2 to vulnerability (CWE-121: Stack-based Buffer Overflow) affecting Nokogiri libraries in the RubyGems ecosystem. The issue involves nokogiri updates packaged libxml2 to 2.13.6 to resolve cve-2025-24928 and cve-2024-56171. Remediation is available by upgrading affected packages to version 1.18.3.

GHSA-vvfq-8hwr-qm4m at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-vvfq-8hwr-qm4m
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-121: Stack-based Buffer Overflow
Affected Product Nokogiri
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix GHSA-vvfq-8hwr-qm4m

To remediate this vulnerability, upgrade all affected Nokogiri dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

nokogiri fixed: 1.18.3
Upgrade nokogiri to 1.18.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for nokogiri

How to Check if You Are Affected

To determine whether your application is affected by GHSA-vvfq-8hwr-qm4m, inspect your project dependencies for Nokogiri:

inspect dependencies for nokogiri

Analyze the terminal output to locate any version of Nokogiri in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.18.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-121: Stack-based Buffer Overflow, where a stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). In Nokogiri, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary Nokogiri v1.18.3 upgrades its dependency libxml2 to [v2.13.6](https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.13.6). libxml2 v2.13.6 addresses: - CVE-2025-24928 - described at https://gitlab.gnome.org/GNOME/libxml2/-/issues/847 - CVE-2024-56171 - described at https://gitlab.gnome.org/GNOME/libxml2/-/issues/828 ## Impact ### CVE-2025-24928 Stack-buffer overflow is possible when reporting DTD validation errors if the input contains a long (~3kb) QName prefix. ### CVE-2024-56171 Use-after-free is possible during validation against untrusted XML Schemas (.xsd) and, potentially, validation of untrusted documents against trusted Schemas if they make use of `xsd:keyref` in combination with recursively defined types that have additional identity constraints.

GHSA-vvfq-8hwr-qm4m Affected Nokogiri Versions

1 component(s)
Fixed Versions:
1.18.3
Product / Package Ecosystem Affected Versions Fixed Version
nokogiri
RubyGems
< 1.18.3
1.18.3

References

Frequently Asked Questions

What is GHSA-vvfq-8hwr-qm4m?
GHSA-vvfq-8hwr-qm4m is a security vulnerability in Nokogiri involving Nokogiri updates packaged libxml2 to 2.13.6 to resolve CVE-2025-24928 and CVE-2024-56171 under CWE-121: Stack-based Buffer Overflow.
Which Nokogiri versions are affected?
Affected versions include releases prior to 1.18.3 across affected packages: nokogiri.
What version fixes GHSA-vvfq-8hwr-qm4m?
Upgrading to 1.18.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nokogiri affected?
Yes, nokogiri is affected in releases prior to 1.18.3. Upgrade your dependency to 1.18.3 or later.
What CWE is associated with GHSA-vvfq-8hwr-qm4m?
GHSA-vvfq-8hwr-qm4m is classified under CWE-121: Stack-based Buffer Overflow (A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function).).
How can I check RubyGems dependencies for GHSA-vvfq-8hwr-qm4m?
Run the dependency tree command: 'inspect dependencies for nokogiri'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vvfq-8hwr-qm4m",
  "modified" : "2025-03-10T22:36:22Z",
  "published" : "2025-02-18T22:36:03Z",
  "aliases" : [ ],
  "summary" : "Nokogiri updates packaged libxml2 to 2.13.6 to resolve CVE-2025-24928 and CVE-2024-56171",
  "details" : "## Summary\n\nNokogiri v1.18.3 upgrades its dependency libxml2 to [v2.13.6](https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.13.6).\n\nlibxml2 v2.13.6 addresses:\n\n- CVE-2025-24928\n  - described at https://gitlab.gnome.org/GNOME/libxml2/-/issues/847\n- CVE-2024-56171\n   - described at https://gitlab.gnome.org/GNOME/libxml2/-/issues/828\n\n## Impact\n\n### CVE-2025-24928\n\nStack-buffer overflow is possible when reporting DTD validation errors if the input contains a long (~3kb) QName prefix.\n\n### CVE-2024-56171\n\nUse-after-free is possible during validation against untrusted XML Schemas (.xsd) and, potentially, validation of untrusted documents against trusted Schemas if they make use of `xsd:keyref` in combination with recursively defined types that have additional identity constraints.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "nokogiri"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.18.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-vvfq-8hwr-qm4m"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/GHSA-vvfq-8hwr-qm4m.yml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sparklemotion/nokogiri"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-121", "CWE-1395", "CWE-416" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-02-18T22:36:03Z",
    "nvd_published_at" : null
  }
}