# CVE-2019-18197: Nokogiri affected by libxslt Use of Uninitialized Resource/Use After Free vulnerability

> A use-after-free flaw in libxslt allows attackers to write out-of-bounds or disclose uninitialized memory, potentially leading to code execution.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 18 Oct 2019
- **Updated:** 28 May 2026
- **Also known as:** ALPINE-CVE-2019-18197, DEBIAN-CVE-2019-18197, DLA-1973-1, GHSA-242x-7cm6-4w8j, JLSEC-2026-580, SUSE-SU-2020:0920-1, SUSE-SU-2020:0920-2, UBUNTU-CVE-2019-18197

## What is CVE-2019-18197?

CVE-2019-18197 is a high-severity use after free vulnerability in Canonical Ubuntu Linux, published on 18 Oct 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

In xsltCopyText in transform.c in libxslt 1.1.33, a pointer variable isn't reset under certain circumstances. If the relevant memory area happened to be freed and reused in a certain way, a bounds check could fail and memory outside a buffer could be written to, or uninitialized data could be disclosed.

Weakness: CWE-908 (Use of Uninitialized Resource), CWE-416 (Use After Free)

## Which versions are affected by CVE-2019-18197?

2 open source packages ship an affected version, including nokogiri. It affects 3 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `nokogiri` | RubyGems | All versions | 1.10.5 |
| `nokogiri` | RubyGems | All versions | 1.10.5 |
| `libxslt` | SUSE:Enterprise Storage 5 | All versions | 1.1.28-17.9.1 |
| `libxslt` | SUSE:HPE Helion OpenStack 8 | All versions | 1.1.28-17.9.1 |
| `libxslt` | SUSE:Linux Enterprise Server 12 SP2-BCL | All versions | 1.1.28-17.9.1 |
| `libxslt` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 1.1.28-17.9.1 |
| `libxslt` | SUSE:Linux Enterprise Server 12 SP3-BCL | All versions | 1.1.28-17.9.1 |
| `libxslt` | SUSE:Linux Enterprise Server 12 SP3-LTSS | All versions | 1.1.28-17.9.1 |
| `libxslt` | SUSE:Linux Enterprise Server 12 SP4 | All versions | 1.1.28-17.9.1 |
| `libxslt` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 1.1.28-17.9.1 |
| `libxslt` | SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | All versions | 1.1.28-17.9.1 |
| `libxslt` | SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | All versions | 1.1.28-17.9.1 |
| `libxslt` | SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | All versions | 1.1.28-17.9.1 |
| `libxslt` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 1.1.28-17.9.1 |
| `libxslt` | SUSE:Linux Enterprise Software Development Kit 12 SP4 | All versions | 1.1.28-17.9.1 |
| `libxslt` | SUSE:Linux Enterprise Software Development Kit 12 SP5 | All versions | 1.1.28-17.9.1 |
| `libxslt` | SUSE:OpenStack Cloud 7 | All versions | 1.1.28-17.9.1 |
| `libxslt` | SUSE:OpenStack Cloud 8 | All versions | 1.1.28-17.9.1 |
| `libxslt` | SUSE:OpenStack Cloud Crowbar 8 | All versions | 1.1.28-17.9.1 |

Products: Canonical Ubuntu Linux, Debian Debian Linux, Xmlsoft Libxslt.

## How do I fix CVE-2019-18197?

Upgrade nokogiri to 1.10.5 or later.

## Is CVE-2019-18197 being exploited?

There is no known exploitation of CVE-2019-18197 in the wild and no public exploit code.

## Other vulnerabilities in Canonical Ubuntu Linux

- [CVE-2020-11651](https://insights.sbomify.com/CVE-2020-11651/): SaltStack Salt Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2020-7247](https://insights.sbomify.com/CVE-2020-7247/): OpenSMTPD Remote Code Execution (critical 9.8, exploited in the wild)
- [CVE-2019-16928](https://insights.sbomify.com/CVE-2019-16928/): Exim Out-of-bounds Write (critical 9.8, exploited in the wild)
- [CVE-2018-6789](https://insights.sbomify.com/CVE-2018-6789/): Exim Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2015-2590](https://insights.sbomify.com/CVE-2015-2590/): Oracle Java SE and Java SE Embedded Remote Code Execution (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-18197 and fix it if it is affected.

What it is: CVE-2019-18197 is a high-severity use after free vulnerability in Canonical Ubuntu Linux, published on 18 Oct 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2019-18197 in the wild and no public exploit code.

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

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/CVE-2019-18197/ (Markdown: https://insights.sbomify.com/CVE-2019-18197/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2019-18197
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2019-18197
- OSV: https://osv.dev/vulnerability/CVE-2019-18197

---
From sbomify Insights: https://insights.sbomify.com/CVE-2019-18197/
Summaries are generated and may contain mistakes; the official description above is the record.
