{"id":"CVE-2026-74887","summary":"openssl_encrypt before 1.4.0 Insecure Random Import in PQC Module","details":"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.","aliases":["GHSA-cx72-m6xj-3vf6","PYSEC-2026-3745"],"modified":"2026-09-02T03:47:26.996228293Z","published":"2026-08-17T11:04:51.799Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/74xxx/CVE-2026-74887.json","cna_assigner":"VulnCheck","cwe_ids":["CWE-338"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/74xxx/CVE-2026-74887.json"},{"type":"ADVISORY","url":"https://github.com/jahlives/openssl_encrypt/security/advisories/GHSA-cx72-m6xj-3vf6"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-74887"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/openssl-encrypt-before-insecure-random-import-in-pqc-module"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/jahlives/openssl_encrypt","events":[{"introduced":"0"},{"fixed":"768df5cd1910e349509f07a27eeac6951e0003bf"}],"database_specific":{"extracted_events":[{"introduced":"0"},{"fixed":"1.4.0"}],"source":["AFFECTED_FIELD","CPE_RANGE"],"cpe":"cpe:2.3:a:jahlives:openssl_encrypt:*:*:*:*:*:python:*:*"}}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-74887.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"}]}