HSEC-2026-0012: Out-of-bounds read in Eq and Ord on numbers with extreme exponents
Published 2026-11-03 · Updated 2026-11-03
Summary
An out-of-bounds read vulnerability exists in the scientific package due to unnormalized Eq and Ord implementations that overflow on extreme exponents. Maintainers and developers using the scientific library should update their dependencies.
Who is affected
Deployments processing scientific numbers with extreme exponents close to maxBound :: Int are vulnerable to crashes via SIGSEGV due to negative index lookups in cached arrays. The flaw is triggered when comparing, adding, or subtracting numbers with extreme base-10 exponents using affected package versions.
Exploitability
CVSS vector is not provided, EPSS is not yet available, and CISA Known Exploited Vulnerabilities status is no. The vulnerability causes a denial of service through process termination.
Remediation
- Upgrade the scientific package to version 0.3.10.0 or later.
- Ensure all entry points including Eq, Ord, (+), and (-) utilize the corrected library version.
How to check your project
- Check project dependency files (such as cabal files or stack.yaml) for scientific versions introduced at 0.3.9.0 and prior to 0.3.10.0.
- Review property tests or application inputs that generate or handle numbers with extreme exponents.
Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| Hackage | scientific |
>= 0.3.9.0, < 0.3.10.0 | 0.3.10.0 | - |
FAQ
Which package and versions are affected?
The Hackage scientific package version 0.3.9.0 is affected, with fixes available in version 0.3.10.0.
What happens when the vulnerability is triggered?
An integer overflow occurs on extreme base-10 exponents, leading to a negative index lookup in a cached power-of-ten array, causing an out-of-bounds read and a SIGSEGV process termination.
How was the vulnerability resolved?
Version 0.3.10.0 computes logarithms using Integer to fix overflows and adds bounds checks to magnitude so that negative exponents raise an error.
Original advisory description
References
- REPORT https://github.com/basvandijk/scientific/issues/120
- REPORT https://github.com/NorfairKing/validity/issues/121
- FIX https://github.com/basvandijk/scientific/pull/121
- DISCUSSION https://www.reddit.com/r/haskell/comments/1xbj59g/dont_use_scientific_for_calculations_it_can/
Source records: HSEC-2026-0012 (OSV.dev).