GHSA-vvfq-8hwr-qm4m: Nokogiri Nokogiri Updates Packaged Libxml2 To Vulnerability
LOWGHSA-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
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.
Upgrade nokogiri to 1.18.3
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
GHSA-vvfq-8hwr-qm4m Affected Nokogiri Versions
1 component(s)| 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?
Which Nokogiri versions are affected?
What version fixes GHSA-vvfq-8hwr-qm4m?
Is nokogiri affected?
What CWE is associated with GHSA-vvfq-8hwr-qm4m?
How can I check RubyGems dependencies for GHSA-vvfq-8hwr-qm4m?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}