HSEC-2026-0006 Cabal deletes project source files during configure

Not scored Published

Cabal build tool deletes source header files during configuration, causing data loss and build failures for developers.

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

What is HSEC-2026-0006?

HSEC-2026-0006 is a denial of service vulnerability in Cabal, published on 8 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

Cabal deletes project source files during configure

The checkDuplicateHeaders function in Distribution.Simple.Configure removes header files from the source directory when a header with the same name exists in both the build directory and the source directory.

This behavior was introduced in commit 3a9830b to resolve header precedence issues, as C compilers prefer relative includes over -I search paths. The workaround uses removeFile on source directory files, which is destructive and should not happen during a build process.

While the current implementation does not follow symlinks explicitly, the deletion of source files outside of the project during a build operation is possible on Microsoft Windows.

Which versions are affected by HSEC-2026-0006?

1 open source package ship an affected version, including Cabal.

PackageAffectedFixed in
Cabal HackageFrom 2.2None

How do I fix HSEC-2026-0006?

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

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is HSEC-2026-0006 being exploited?

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

Sources

Is HSEC-2026-0006 in your software?

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

Check your SBOMs for free