Description
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.
Published: 2026-08-17
Score: 9.3 Critical
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability originates from the import of Python's non‑cryptographic 'random' module in a cryptographic library prior to release 1.4.0. Although no cryptographic functions directly call the module, its presence creates a path for developers to mistakenly use functions such as random.randint() instead of a secure source, potentially compromising the randomness of sensitive data. The immediate impact is a future‑risk constraint rather than an active attack vector; the risk is that predictable outputs could be reproduced if the Mersenne Twister state is partially exposed.

Affected Systems

The issue affects the Jahlives openssl_encrypt project, specifically all versions before 1.4.0. Users deploying those releases are at risk if they import or reference the random module in subsequent code paths.

Risk and Exploitability

The CVSS score of 9.3 indicates a high severity, but the EPSS score is not available and the vulnerability is not listed in the CISA KEV catalog, implying no reported active exploitation. The likely pathway for exploitation requires a future developer to adopt the insecure random methods, so timely remediation mitigates the risk before it can be exploited.

Generated by OpenCVE AI on August 17, 2026 at 12:55 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to openssl_encrypt version 1.4.0 or later where the import has been removed
  • If an upgrade is not immediately possible, remove the import statement of Python's random module and replace all random function calls with secure alternatives such as secrets.randbits() or os.urandom
  • Conduct a code review or static analysis to detect any accidental usage of random module functions and audit any cryptographic or security‑sensitive paths for proper randomness providers

Generated by OpenCVE AI on August 17, 2026 at 12:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 17 Aug 2026 11:15:00 +0000

Type Values Removed Values Added
Description 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.
Title openssl_encrypt before 1.4.0 Insecure Random Import in PQC Module
Weaknesses CWE-338
References
Metrics cvssV3_1

{'score': 0, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:N'}

cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-17T11:04:51.799Z

Reserved: 2026-08-17T10:42:40.455Z

Link: CVE-2026-74887

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-17T11:16:43.523

Modified: 2026-08-17T11:16:43.523

Link: CVE-2026-74887

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-17T13:00:13Z

Weaknesses
  • CWE-338

    Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)