GHSA-j48q-4c78-rhf9: openssl-encrypt Dynamic .so Loading For Whirlpool Vulnerability
MODERATEGHSA-j48q-4c78-rhf9 is a MODERATE dynamic .so loading for whirlpool vulnerability (CWE-427: Uncontrolled Search Path Element) affecting openssl-encrypt libraries in the PyPI ecosystem. The issue involves dynamic .so loading for whirlpool uses broad glob pattern without integrity verification. Remediation is available by upgrading affected packages to version 1.4.0.
GHSA-j48q-4c78-rhf9 at a Glance
How to Fix GHSA-j48q-4c78-rhf9
To remediate this vulnerability, upgrade all affected openssl-encrypt dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install openssl-encrypt>=1.4.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show openssl-encrypt
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-j48q-4c78-rhf9, inspect your installed packages using pip:
pip show openssl-encrypt
Analyze the terminal output to locate any version of openssl-encrypt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.0), your application is affected.
Note: The pip show openssl-encrypt command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-427: Uncontrolled Search Path Element, where the product uses a fixed or controlled search path to find resources, but one or more locations in that path can be under the control of unintended actors. In openssl-encrypt, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-j48q-4c78-rhf9 Affected openssl-encrypt Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
openssl-encrypt
|
PyPI |
< 1.4.0
|
1.4.0
|
References
Frequently Asked Questions
What is GHSA-j48q-4c78-rhf9?
Which openssl-encrypt versions are affected?
What version fixes GHSA-j48q-4c78-rhf9?
Is openssl-encrypt affected?
What CWE is associated with GHSA-j48q-4c78-rhf9?
How can I check PyPI dependencies for GHSA-j48q-4c78-rhf9?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-j48q-4c78-rhf9",
"modified" : "2026-03-31T23:31:29Z",
"published" : "2026-03-31T23:31:29Z",
"aliases" : [ ],
"summary" : "openssl-encrypt: Dynamic .so loading for Whirlpool uses broad glob pattern without integrity verification",
"details" : "## Severity: HIGH\n\n### Summary\n\nThe 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.\n\n### Affected Code\n\n```python\nfor site_pkg in site.getsitepackages():\n pattern = os.path.join(site_pkg, \"whirlpool*py313*.so\")\n py313_modules = glob.glob(pattern)\n if py313_modules:\n module_path = py313_modules[0] # Takes first match\n loader = ExtensionFileLoader(\"whirlpool\", module_path)\n spec = importlib.util.spec_from_file_location(\"whirlpool\", module_path, loader=loader)\n whirlpool_module = importlib.util.module_from_spec(spec)\n spec.loader.exec_module(whirlpool_module)\n```\n\n### Impact\n\nThe glob pattern `\"whirlpool*py313*.so\"` is broad and takes the first match without verifying:\n- File hash/signature\n- File ownership/permissions\n- Whether it's a legitimate module\n\nIf an attacker can place a malicious `.so` file matching this pattern in any site-packages directory, it will be loaded and native code executed.\n\n### Recommended Fix\n\n- Verify the module's integrity (hash or signature) before loading\n- Use a specific filename rather than a glob pattern\n- Check file permissions and ownership\n\n### Fix\n\nFixed 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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "openssl-encrypt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.4.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/jahlives/openssl_encrypt/security/advisories/GHSA-j48q-4c78-rhf9"
}, {
"type" : "WEB",
"url" : "https://github.com/jahlives/openssl_encrypt/commit/963d0d1278b722ea134272f9df65fddcd3e6ab47"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jahlives/openssl_encrypt"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-427" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-31T23:31:29Z",
"nvd_published_at" : null
}
}