GHSA-mrxw-mxhj-p664: Nokogiri Nokogiri Updates Packaged Libxslt To Vulnerability

HIGH
CVSS 7.8
CWE-1395 CWE-416
Published
Advisory Summary

GHSA-mrxw-mxhj-p664 is a HIGH (CVSS 7.8) nokogiri updates packaged libxslt to vulnerability (CWE-1395: Dependency on Vulnerable Third-Party Component) affecting Nokogiri libraries in the RubyGems ecosystem. The issue involves nokogiri updates packaged libxslt to v1.1.43 to resolve multiple cves. Remediation is available by upgrading affected packages to version 1.18.4.

GHSA-mrxw-mxhj-p664 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-mrxw-mxhj-p664
Severity HIGH
CVSS v3.1 Base Score 7.8
CWE Classification CWE-1395: Dependency on Vulnerable Third-Party Component
Affected Product Nokogiri
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 7.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity High (I:H)
Availability High (A:H)

How to Fix GHSA-mrxw-mxhj-p664

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.4
Upgrade nokogiri to 1.18.4
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-mrxw-mxhj-p664, 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.4), 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-1395: Dependency on Vulnerable Third-Party Component, where the product has a dependency on a third-party component that contains one or more known vulnerabilities. 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.4 upgrades its dependency libxslt to [v1.1.43](https://gitlab.gnome.org/GNOME/libxslt/-/releases/v1.1.43). libxslt v1.1.43 resolves: - CVE-2025-24855: Fix use-after-free of XPath context node - CVE-2024-55549: Fix UAF related to excluded namespaces ## Impact ### CVE-2025-24855 - "Use-after-free due to xsltEvalXPathStringNs leaking xpathCtxt->node" - MITRE has rated this 7.8 High CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:H - Upstream report: https://gitlab.gnome.org/GNOME/libxslt/-/issues/128 - NVD entry: https://nvd.nist.gov/vuln/detail/CVE-2025-24855 ### CVE-2024-55549 - "Use-after-free related to excluded result prefixes" - MITRE has rated this 7.8 High CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:H - Upstream report: https://gitlab.gnome.org/GNOME/libxslt/-/issues/127 - NVD entry: https://nvd.nist.gov/vuln/detail/CVE-2024-55549

GHSA-mrxw-mxhj-p664 Affected Nokogiri Versions

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

References

Frequently Asked Questions

What is GHSA-mrxw-mxhj-p664?
GHSA-mrxw-mxhj-p664 is a security vulnerability in Nokogiri involving Nokogiri updates packaged libxslt to v1.1.43 to resolve multiple CVEs under CWE-1395: Dependency on Vulnerable Third-Party Component.
Which Nokogiri versions are affected?
Affected versions include releases prior to 1.18.4 across affected packages: nokogiri.
What version fixes GHSA-mrxw-mxhj-p664?
Upgrading to 1.18.4 (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.4. Upgrade your dependency to 1.18.4 or later.
What is the CVSS score of GHSA-mrxw-mxhj-p664?
GHSA-mrxw-mxhj-p664 has a CVSS v3.1 base score of 7.8 (HIGH) with vector string CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:H.
What CWE is associated with GHSA-mrxw-mxhj-p664?
GHSA-mrxw-mxhj-p664 is classified under CWE-1395: Dependency on Vulnerable Third-Party Component (The product has a dependency on a third-party component that contains one or more known vulnerabilities.).
How can I check RubyGems dependencies for GHSA-mrxw-mxhj-p664?
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-mrxw-mxhj-p664",
  "modified" : "2025-03-21T15:43:15Z",
  "published" : "2025-03-14T18:51:37Z",
  "aliases" : [ ],
  "summary" : "Nokogiri updates packaged libxslt to v1.1.43 to resolve multiple CVEs",
  "details" : "## Summary\n\nNokogiri v1.18.4 upgrades its dependency libxslt to [v1.1.43](https://gitlab.gnome.org/GNOME/libxslt/-/releases/v1.1.43).\n\nlibxslt v1.1.43 resolves:\n\n- CVE-2025-24855: Fix use-after-free of XPath context node\n- CVE-2024-55549: Fix UAF related to excluded namespaces\n\n## Impact\n\n### CVE-2025-24855\n\n- \"Use-after-free due to xsltEvalXPathStringNs leaking xpathCtxt->node\"\n- MITRE has rated this 7.8 High CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:H\n- Upstream report: https://gitlab.gnome.org/GNOME/libxslt/-/issues/128\n- NVD entry: https://nvd.nist.gov/vuln/detail/CVE-2025-24855\n\n### CVE-2024-55549\n\n- \"Use-after-free related to excluded result prefixes\"\n- MITRE has rated this 7.8 High CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:H\n- Upstream report: https://gitlab.gnome.org/GNOME/libxslt/-/issues/127\n- NVD entry: https://nvd.nist.gov/vuln/detail/CVE-2024-55549",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "nokogiri"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.18.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-mrxw-mxhj-p664"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-55549"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-24855"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sparklemotion/nokogiri"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.gnome.org/GNOME/libxslt/-/issues/127"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.gnome.org/GNOME/libxslt/-/issues/128"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1395", "CWE-416" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-14T18:51:37Z",
    "nvd_published_at" : null
  }
}