# HSEC-2025-0006: Private key leak via inherited file descriptor

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2025-11-17T02:22:38.000Z
- Modified: 2025-11-17T02:27:23.133Z

## Description

# Private key leak via inherited file descriptor

The X.509 key reading function `readKeyFile` opened a file
descriptor to the private key without setting the *close-on-exec*
flag. If a child process is `exec`ed at the same time, it would
inherit that file descriptor and could read the private key
material.

Impact is limited to child processes that run untrusted code, but
that do not close inherited file descriptors. (For example, the
`su(1)` command.)

This leak was fixed by setting the *close-on-exec* flag on
unix-based systems.

(As written by Haskell Security Advisories.)

## Affected

- x509-store (Hackage): from 0.1
- crypton-x509-store (Hackage): from 1.6.9 before 1.6.12

## References

- <https://github.com/kazu-yamamoto/crypton-certificate/commit/e353d450c381c9d6b903c4257927e0c89c97acb1> (fix)

## Sources

- Haskell Security Advisories: [HSEC-2025-0006](https://osv.dev/vulnerability/HSEC-2025-0006), CC0-1.0, modified 2025-11-17

---

Page: https://cve.day/HSEC-2025-0006 · Whole record: https://cve.day/HSEC-2025-0006.json · Rebuilt by cve.day 2026-11-25T22:56:25.651Z
