CVE-2026-45257 Arbitrary file overwrite via the KTLS receive path

High 7.8 Published Updated

Local attackers can overwrite file contents via KTLS receive path, bypassing file flags and escalating privileges to root.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-45257?

CVE-2026-45257 is a high-severity memory corruption vulnerability in Freebsd Freebsd, published on 26 Jun 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

The KTLS receive path decrypted each record in place, assuming that the mbufs holding received data were anonymous and safe to modify. This assumption does not hold for data placed on a socket by sendfile(2), which can reference file-backed memory directly through non-anonymous M_EXTPG pages or EXT_SFBUF mbufs. When the sender transmits such data over a loopback connection without enabling KTLS on the transmit side, the file-backed mbufs reach the receiver's decryption path unchanged. Decrypting a record in place then overwrites the backing file's page cache instead of a private copy of the data.

An unprivileged local user who can read a file can overwrite its contents with data of their choosing by sending the file over a loopback connection on which they have enabled KTLS receive. The write modifies the page cache directly, so it bypasses file flags such as schg and is written back to disk. By overwriting a setuid binary or other trusted file, a local user can escalate privileges, potentially gaining full control of the affected system.

Weakness: CWE-123

Which versions are affected by CVE-2026-45257?

It affects 1 product.

Products include Freebsd Freebsd.

How do I fix CVE-2026-45257?

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

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2026-45257 being exploited?

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

All Freebsd Freebsd vulnerabilities

Sources

Is CVE-2026-45257 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free