9.3critical
openssl_encrypt before 1.4.0 Arbitrary Code Execution via Whirlpool
- Severity
- 9.3critical CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.46% (higher than 41% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-j48q-4c78-rhf9PYSEC-2026-3742
Description
openssl_encrypt versions before 1.4.0 contain an arbitrary code execution vulnerability in the Whirlpool hash implementation that uses broad glob patterns to load .so modules without integrity verification. Attackers can place malicious .so files matching the whirlpool*py313*.so pattern in site-packages directories to achieve native code execution when the module is loaded.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| jahlives openssl_encrypt | before 1.4.0 Not affected: 1.4.0 | CVE List, NVD |
| openssl-encrypt (PyPI) | before 1.4.0 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| VulnCheck | 9.3critical CVSS:4.0 | 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 |
| VulnCheck | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:U |
| PyPA Advisory Database | Not scored CVSS:4.0 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
Classification
What each source says
CVE List
openssl_encrypt versions before 1.4.0 contain an arbitrary code execution vulnerability in the Whirlpool hash implementation that uses broad glob patterns to load .so modules without integrity verification. Attackers can place malicious .so files matching the whirlpool*py313*.so pattern in site-packages directories to achieve native code execution when the module is loaded.
GitHub Advisory Database
Severity: HIGH
Summary
The Whirlpool hash implementation in openssl_encrypt/modules/registry/hash_registry.py at lines 570-589 uses glob patterns to find .so modules in site-packages and loads the first match via importlib without verifying module integrity.
Affected Code
for site_pkg in site.getsitepackages():
pattern = os.path.join(site_pkg, "whirlpool*py313*.so")
py313_modules = glob.glob(pattern)
if py313_modules:
module_path = py313_modules[0] # Takes first match
loader = ExtensionFileLoader("whirlpool", module_path)
spec = importlib.util.spec_from_file_location("whirlpool", module_path, loader=loader)
whirlpool_module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(whirlpool_module)
Impact
The glob pattern "whirlpool*py313*.so" is broad and takes the first match without verifying:
- File hash/signature
- File ownership/permissions
- Whether it's a legitimate module
If an attacker can place a malicious .so file matching this pattern in any site-packages directory, it will be loaded and native code executed.
Recommended Fix
- Verify the module's integrity (hash or signature) before loading
- Use a specific filename rather than a glob pattern
- Check file permissions and ownership
Fix
Fixed in commit 963d0d1 on branch releases/1.4.x — added os.path.realpath() to resolve symlinks and validation that found .so files are within known site-packages directories before loading.
References
| https://github.com/jahlives/openssl_encrypt/security/advisories/GHSA-j48q-4c78-rhf9 | advisory, mitigation, vendor-advisory, web | |
| https://www.vulncheck.com/advisories/openssl-encrypt-before-arbitrary-code-execution-via-whirlpool | advisory, third-party-advisory | |
| https://github.com/jahlives/openssl_encrypt/commit/963d0d1278b722ea134272f9df65fddcd3e6ab47 | web | |
| https://github.com/jahlives/openssl_encrypt | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-74872 changed 2026-10-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-j48q-4c78-rhf9 changed 2026-09-01 | CC-BY-4.0 |
| NVD | CVE-2026-74872 changed 2026-10-08 | Public domain |
| PyPA Advisory Database | PYSEC-2026-3742 changed 2026-09-01 | CC-BY-4.0 |