# CVE-2025-23165: Denial of service in node

> A memory leak in Node.js ReadFileUtf8 binding allows attackers to cause unbounded memory growth and denial of service.

- **Severity:** Low 3.7 (`CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 19 May 2025
- **Updated:** 28 May 2025
- **Also known as:** ALPINE-CVE-2025-23165, AZL-61913, BELL-CVE-2025-23165, BIT-node-2025-23165, BIT-node-min-2025-23165, DEBIAN-CVE-2025-23165, GHSA-gcf6-vgcr-474f, MINI-655w-5rhh-237h, MINI-c52x-7wfp-m9f3, MINI-qjxv-6f25-27wj, MINI-rhc5-hq55-8g57

## What is CVE-2025-23165?

CVE-2025-23165 is a low-severity denial of service vulnerability in nodejs node, published on 19 May 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

In Node.js, the `ReadFileUtf8` internal binding leaks memory due to a corrupted pointer in `uv_fs_s.file`: a UTF-16 path buffer is allocated but subsequently overwritten when the file descriptor is set. This results in an unrecoverable memory leak on every call. Repeated use can cause unbounded memory growth, leading to a denial of service.

Impact:
* This vulnerability affects APIs relying on `ReadFileUtf8` on Node.js release lines: v20 and v22.

Weakness: CWE-401 (Missing Release of Memory after Effective Lifetime)

## Which versions are affected by CVE-2025-23165?

2 open source packages ship an affected version, including node and node-min.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `node` | Bitnami | All versions | 20.19.2, 22.15.1 |
| `node-min` | Bitnami | All versions | 20.19.2, 22.15.1 |

## How do I fix CVE-2025-23165?

Upgrade node to a fixed version for your release line: 20.19.2 or 22.15.1.

## Is CVE-2025-23165 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-23165 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-23165 and fix it if it is affected.

What it is: CVE-2025-23165 is a low-severity denial of service vulnerability in nodejs node, published on 19 May 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-23165 exists.

Affected packages and fixed versions:
- node (Bitnami): affected all versions; fixed in 20.19.2, 22.15.1
- node-min (Bitnami): affected all versions; fixed in 20.19.2, 22.15.1

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

## Sources

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

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