CVE-2026-74887openssl_encrypt before 1.4.0 Insecure Random Import in PQC Module
openssl_encrypt before 1.4.0 imports Python's non-cryptographic 'random' module (Mersenne Twister PRNG) at line 15 of openssl_encrypt/modules/pqc.py. No direct calls to random.* were present in the code, so no cryptographic operation is currently affected; however, the import creates a hazard that future code could inadvertently use random.randint() instead of a cryptographically secure alternative (secrets/os.urandom), producing predictable values since the Mersenne Twister state can be recovered from approximately 624 outputs. Fixed by removing the import in 1.4.0.
What to do
Fixed builds are available from PyPI: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| PyPI library | openssl-encrypt | Fixed | 1.4.0 | PYSEC-2026-3745 |
What the vendor says
As published in the CVE record by VulnCheck, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- jahlives openssl_encrypt: affected: before 1.4.0, 1.4.0 not affected; fixed in
1.4.0
Vendor advisories:
- https://github.com/jahlives/openssl_encrypt/security/advisories/GHSA-cx72-m6xj-3vf6 (vendor-advisory)
References
- https://github.com/jahlives/openssl_encrypt/security/advisories/GHSA-cx72-m6xj-3vf6
- https://www.vulncheck.com/advisories/openssl-encrypt-before-insecure-random-import-in-pqc-module
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.