# CVE-2025-0373: Buffer overflow in some filesystems via NFS

> A stack buffer overflow in FreeBSD filesystems allows remote attackers to cause a kernel panic or potentially execute code via NFS.

- **Severity:** Medium 6.0 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 30 Jan 2025
- **Updated:** 7 Feb 2025
- **Also known as:** GHSA-4j4g-v3h3-8mqg

## What is CVE-2025-0373?

CVE-2025-0373 is a medium-severity memory corruption vulnerability in FreeBSD, published on 30 Jan 2025. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

On 64-bit systems, the implementation of VOP_VPTOFH() in the cd9660, tarfs and ext2fs filesystems overflows the destination FID buffer by 4 bytes, a stack buffer overflow.

A NFS server that exports a cd9660, tarfs, or ext2fs file system can be made to panic by mounting and accessing the export with an NFS client.  Further exploitation (e.g., bypassing file permission checking or remote kernel code execution) is potentially possible, though this has not been demonstrated.  In particular, release kernels are compiled with stack protection enabled, and some instances of the overflow are caught by this mechanism, causing a panic.

Weakness: CWE-121 (Stack-based Buffer Overflow)

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


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

No fix has been published for CVE-2025-0373 yet. Limit exposure of the affected software until one is available.

## Is CVE-2025-0373 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2025-0373 is a medium-severity memory corruption vulnerability in FreeBSD, published on 30 Jan 2025. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-0373 in the wild and no public exploit code.

Affected product: FreeBSD. No package-level version data is available, so check the vendor advisory linked from the reference page.

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

## Sources

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

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