# GHSA-mrxw-mxhj-p664: Nokogiri updates packaged libxslt to v1.1.43 to resolve multiple CVEs


- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 14 Mar 2025

## What is GHSA-mrxw-mxhj-p664?

GHSA-mrxw-mxhj-p664 is a vulnerability in nokogiri, published on 14 Mar 2025. 

### Official description

## 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

## Which versions are affected by GHSA-mrxw-mxhj-p664?

1 open source package ship an affected version, including nokogiri.


| Package | Ecosystem | PURL | Affected | Fixed in |
| --- | --- | --- | --- | --- |
| `nokogiri` | RubyGems | `pkg:gem/nokogiri` | All versions | 1.18.4 |

Status by vendor (upstream, then each distribution release and vendor build):

| Who | Release | Status | Packages | Fixed in |
| --- | --- | --- | --- | --- |
| Upstream |  | fixed | `nokogiri` | 1.18.4 |

## How do I fix GHSA-mrxw-mxhj-p664?

Upgrade nokogiri to 1.18.4 or later.

## Is GHSA-mrxw-mxhj-p664 being exploited?

There is no known exploitation of GHSA-mrxw-mxhj-p664 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-mrxw-mxhj-p664 and fix it if it is affected.

What it is: GHSA-mrxw-mxhj-p664 is a vulnerability in nokogiri, published on 14 Mar 2025. 
Exploitation: There is no known exploitation of GHSA-mrxw-mxhj-p664 in the wild and no public exploit code.

Affected packages and fixed versions:
- nokogiri (RubyGems): affected all versions; fixed in 1.18.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-mrxw-mxhj-p664/ (Markdown: https://insights.sbomify.com/GHSA-mrxw-mxhj-p664/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-mrxw-mxhj-p664

---
From sbomify Insights: https://insights.sbomify.com/GHSA-mrxw-mxhj-p664/
Summaries are generated and may contain mistakes; the official description above is the record.
