# CVE-2026-81721: openssl_encrypt KDF cost parameter validation bypass

Source: https://junglewise.ai/threats/cve-2026-81721-openssl-encrypt-kdf-cost-parameter-validation-bypass  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-27. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-81721 · Severity: high · CVSS 7.5 · Published 2026-08-27

openssl_encrypt is a Python library for encrypting and decrypting files using password-based key derivation. An attacker can craft a malicious encrypted file that declares extremely large memory-hard key derivation function (KDF) parameters, causing the decryption process to allocate gigabytes to terabytes of memory before the password is even validated. This allows an unauthenticated attacker to crash the application or entire system without needing the correct password.

Technologies: [Jahlives Openssl Encrypt](https://junglewise.ai/threats/technologies/openssl-encrypt), [openssl-encrypt (PyPI)](https://junglewise.ai/threats/technologies/pypi-openssl-encrypt). Vendors: [Jahlives](https://junglewise.ai/threats/vendors/jahlives), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-81721 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-81721 being exploited in the wild.

**How severe is CVE-2026-81721?** High severity, with a CVSS score of 7.5, published 27 August 2026.

**Which products and versions are affected?** openssl-encrypt (PyPI) ECOSYSTEM:introduced=0,fixed=1.4.9.

**Is there a fix for CVE-2026-81721?** Yes. openssl-encrypt (PyPI): upgrade to 1.4.9 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-81721 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-81721?** Check whether you run Jahlives Openssl Encrypt or openssl-encrypt (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- openssl-encrypt (PyPI): upgrade to 1.4.9 or later

  ```sh
  pip install "openssl-encrypt>=1.4.9"
  ```


## Technical details

The vulnerability exists in openssl_encrypt versions before 1.4.9, which fails to validate KDF cost parameters (such as Argon2 memory_cost, scrypt N, or balloon space_cost) when reading encrypted file metadata and keystore headers. An attacker can craft a malicious encrypted file declaring arbitrarily large memory-hard KDF parameters that are consumed during the key derivation phase, before any password authentication occurs. This pre-authentication memory exhaustion triggers unbounded allocation of gigabytes to terabytes of RAM, causing an out-of-memory crash with no authentication required. The fix applies a memory ceiling (default 8 GiB, configurable via --allow-high-kdf-cost flag) to both file decryption and keystore load operations.

## Affected products

- openssl_encrypt (jahlives) openssl_encrypt before 1.4.9

## Identifiers

- CVE-2026-81721
- PYSEC-2026-3803

## Timeline

- 2026-08-27: disclosed
- 2026-08-27: patched: version 1.4.9 released with fix

## References

- [https://github.com/jahlives/openssl_encrypt/security/advisories/GHSA-7894-5gw8-69hr](https://github.com/jahlives/openssl_encrypt/security/advisories/GHSA-7894-5gw8-69hr)
- [https://www.vulncheck.com/advisories/openssl-encrypt-before-1.4.9-denial-of-service-via-kdf-2](https://www.vulncheck.com/advisories/openssl-encrypt-before-1.4.9-denial-of-service-via-kdf-2)

## Related threats

- [openssl_encrypt memory exhaustion in identity file protection block](https://junglewise.ai/threats/cve-2026-81720-openssl-encrypt-memory-exhaustion-in-identity-file-protection)
- [openssl_encrypt arbitrary code execution via plugin signature bypass](https://junglewise.ai/threats/cve-2026-81719-openssl-encrypt-arbitrary-code-execution-via-plugin-signature)
- [openssl_encrypt weak PBKDF2 parameters in keyfile encryption](https://junglewise.ai/threats/cve-2026-81718-openssl-encrypt-weak-pbkdf2-parameters-in-keyfile-encryption)
- [openssl_encrypt USB drive integrity bypass with fixed KDF salt](https://junglewise.ai/threats/cve-2026-81717-openssl-encrypt-usb-drive-integrity-bypass-with-fixed-kdf-salt)
- [openssl-encrypt path traversal in PluginSandbox](https://junglewise.ai/threats/cve-2026-81716-openssl-encrypt-path-traversal-in-pluginsandbox)
