HSEC-2026-0006
MEDIUM 5.5CVSS 3.1Cabal deletes project source files during configure
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.
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | HSEC | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | Hackage | Cabal | >= 2.2, < 3.18.1.0 | 3.18.1.0 |
References
- https://github.com/haskell/cabal/issues/11176 · REPORT
- https://github.com/haskell/cabal/pull/11733 · FIX
- https://github.com/haskell/cabal/commit/3a9830bbdabef2f1009a69957966b778c7c1a9ee · INTRODUCED
History
- 28 Nov 2026 12:27 UTC · OSV: affected list changed (1 entry); 1 reference added
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 8 Apr 2026)