Advisory

PYSEC-2026-3745

Also known as: CVE-2026-74887, GHSA-cx72-m6xj-3vf6

Summary

The record has no summary.

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.

Severity

Medium Basis: CVSS v3 score 5.9, vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

Dates

Published
2026-08-17 11:16 UTC
Modified
2026-09-01 09:15 UTC

Affected packages and fixes

openssl-encrypt

PyPI · All systems

Affected

  • introduced 0, fixed 1.4.0 (ecosystem)

Fixed versions

1.4.0

Fix

  • Fixed version 1.4.0
    pip install --upgrade openssl-encrypt==1.4.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences