GHSA-8h88-gxp3-j7pg: Openssl encrypt Openssl-encrypt's Unverified Key Bundle From_dict() Vulnerability
MODERATEGHSA-8h88-gxp3-j7pg is a MODERATE openssl-encrypt's unverified key bundle from_dict() vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Openssl encrypt libraries in the PyPI ecosystem. The issue involves openssl-encrypt's unverified key bundle from_dict() + to_identity() path allows encryption to attacker keys. Remediation is available by upgrading affected packages to version 1.4.0.
GHSA-8h88-gxp3-j7pg at a Glance
How to Fix GHSA-8h88-gxp3-j7pg
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-8h88-gxp3-j7pg, 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-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. 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-8h88-gxp3-j7pg 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-8h88-gxp3-j7pg?
Which Openssl encrypt versions are affected?
What version fixes GHSA-8h88-gxp3-j7pg?
Is openssl-encrypt affected?
What CWE is associated with GHSA-8h88-gxp3-j7pg?
How can I check PyPI dependencies for GHSA-8h88-gxp3-j7pg?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8h88-gxp3-j7pg",
"modified" : "2026-04-01T21:11:14Z",
"published" : "2026-04-01T21:11:14Z",
"aliases" : [ ],
"summary" : "openssl-encrypt's unverified key bundle from_dict() + to_identity() path allows encryption to attacker keys",
"details" : "### Summary\n\nThe `PublicKeyBundle.from_dict()` method in `openssl_encrypt/modules/key_bundle.py` at **lines 329-361** creates bundles from untrusted data without verifying the signature. The docstring warns to call `verify_signature()` after creation, but the `to_identity()` method (line 363-391) can convert an unverified bundle directly to an `Identity` object.\n\n### Affected Code\n\n```python\n@classmethod\ndef from_dict(cls, data: Dict) -> \"PublicKeyBundle\":\n \"\"\"\n SECURITY: Does NOT verify signature. Call verify_signature() after creation.\n \"\"\"\n # Creates bundle without verification\n```\n\n### Impact\n\nIf `from_dict()` followed by `to_identity()` is called without an intervening `verify_signature()` call, encryption could be performed against an attacker's public key, leaking secrets. While `key_resolver.py` (lines 146-147) does verify before use, the unguarded API path remains directly callable.\n\n### Recommended Fix\n\n- Add a `verified` flag to `PublicKeyBundle` that must be set before `to_identity()` can be called\n- Or have `to_identity()` automatically call `verify_signature()` and raise on failure\n- Or make `from_dict()` require verification as part of construction\n\n### Fix\n\nFixed in commit `f4a1ba6` on branch `releases/1.4.x` — from_dict() now verifies self_signature by default (verify=True parameter); raises ValueError on verification failure.",
"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-8h88-gxp3-j7pg"
}, {
"type" : "WEB",
"url" : "https://github.com/jahlives/openssl_encrypt/commit/f4a1ba660063cd9e17883829e5272a248525a16b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jahlives/openssl_encrypt"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-347" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-01T21:11:14Z",
"nvd_published_at" : null
}
}