CVE-2026-2340 Samba: vfs_worm does not block directory modification

Medium 6.5 Published Updated

An authenticated user can bypass WORM protections to overwrite protected files via rename operations in Samba's vfs_worm module.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-2340?

CVE-2026-2340 is a medium-severity vulnerability in Redhat Enterprise Linux, published on 27 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

A flaw was found in Samba’s vfs_worm module. The module is intended to provide write-once, read-many (WORM) protections by preventing modification of files after a configurable grace period. Due to insufficient validation during rename operations, an authenticated user with write access to a share could overwrite a protected file by renaming a newly created file over the existing WORM-protected file.

Weakness: CWE-280

Which versions are affected by CVE-2026-2340?

It affects 3 products.

Products include Redhat Enterprise Linux, Redhat Openshift Container Platform, Samba Samba.

How do I fix CVE-2026-2340?

Apply the vendor's patch.

Is CVE-2026-2340 being exploited?

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

All Redhat Enterprise Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2026-2340, AZL-89145, CLSA-2026-1780403538, DEBIAN-CVE-2026-2340, ECHO-8127-8787-df33, GHSA-m6w2-p258-gxqp and 2 more.

Is CVE-2026-2340 in your software?

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

Check your SBOMs for free