GHSA-8h88-gxp3-j7pg: Openssl encrypt Openssl-encrypt's Unverified Key Bundle From_dict() Vulnerability

MODERATE
CWE-347
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-8h88-gxp3-j7pg
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-347: Improper Verification of Cryptographic Signature
Affected Product Openssl encrypt
Package Ecosystem PyPI
Published Date
Last Updated

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.

openssl-encrypt fixed: 1.4.0
pip install openssl-encrypt>=1.4.0
Verify Direct and Transitive Dependencies

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

### Summary The `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. ### Affected Code ```python @classmethod def from_dict(cls, data: Dict) -> "PublicKeyBundle": """ SECURITY: Does NOT verify signature. Call verify_signature() after creation. """ # Creates bundle without verification ``` ### Impact If `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. ### Recommended Fix - Add a `verified` flag to `PublicKeyBundle` that must be set before `to_identity()` can be called - Or have `to_identity()` automatically call `verify_signature()` and raise on failure - Or make `from_dict()` require verification as part of construction ### Fix Fixed 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.

GHSA-8h88-gxp3-j7pg Affected Openssl encrypt Versions

1 component(s)
Fixed Versions:
1.4.0
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?
GHSA-8h88-gxp3-j7pg is a security vulnerability in Openssl encrypt involving openssl-encrypt's unverified key bundle from_dict() + to_identity() path allows encryption to attacker keys under CWE-347: Improper Verification of Cryptographic Signature.
Which Openssl encrypt versions are affected?
Affected versions include releases prior to 1.4.0 across affected packages: openssl-encrypt.
What version fixes GHSA-8h88-gxp3-j7pg?
Upgrading to 1.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is openssl-encrypt affected?
Yes, openssl-encrypt is affected in releases prior to 1.4.0. Upgrade your dependency to 1.4.0 or later.
What CWE is associated with GHSA-8h88-gxp3-j7pg?
GHSA-8h88-gxp3-j7pg is classified under CWE-347: Improper Verification of Cryptographic Signature (The product does not verify, or incorrectly verifies, the cryptographic signature for data.).
How can I check PyPI dependencies for GHSA-8h88-gxp3-j7pg?
Run the dependency tree command: 'pip show openssl-encrypt'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}