Security mailing lists by PureSourceCode

HSEC-2026-0006

MEDIUM 5.5CVSS 3.1

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

Published
8 Apr 2026
Last modified
28 Nov 2026
Sources
OSVJSON

Scores

SourceScored byVersionScoreVector / 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

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV Hackage Cabal >= 2.2, < 3.18.1.0 3.18.1.0

References

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)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.