Description
The Crypto.Random.atfork function in PyCrypto before 2.6.1 does not properly reseed the pseudo-random number generator (PRNG) before allowing a child process to access it, which makes it easier for context-dependent attackers to obtain sensitive information by leveraging a race condition in which a child process is created and accesses the PRNG within the same rate-limit period as another process.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 7 | python-crypto | 2.6-4+deb7u1 | DSA-2781-1 |
| Debian 6.0 | python-crypto | 2.1.0-2+squeeze2 | DSA-2781-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | pycrypto | < 2.6.1 | 2.6.1 | GHSA-x377-f64p-hf5j |
Advisories 1
- DSA-2781-1 python-crypto - PRNG not correctly reseeded in some situations Debian Security (DSA / DLA) · Mar 9, 2026