Skip to content
Fencer Intel
medium 5.5

HSEC-2026-0006 json

Cabal deletes project source files during configure

published 7mo ago modified 7mo ago

cvss
5.5
version 3.1, OSV
cisa kev
Not listed
not in CISA's catalog
epss
—
no score, EPSS covers CVEs only
public exploits
0
none known

Summary

# 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.

Patch / fix

Is HSEC-2026-0006 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

CVSS scores

assigned by version score vector
OSV 3.1 5.5 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Affected packages

ecosystem package affected fixed in
hackage Cabal
>=2.2
no fix listed

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.