CVE-2023-5363 Overview
A critical cryptographic vulnerability has been identified in OpenSSL affecting the processing of key and initialization vector (IV) lengths during symmetric cipher initialization. This flaw can lead to potential truncation or overruns when initializing certain symmetric ciphers, ultimately compromising the confidentiality of encrypted communications.
When applications call EVP_EncryptInit_ex2(), EVP_DecryptInit_ex2(), or EVP_CipherInit_ex2(), the provided OSSL_PARAM array is processed after the key and IV have already been established. Any alterations to the key length via the "keylen" parameter or the IV length via the "ivlen" parameter within the OSSL_PARAM array will not take effect as intended. This results in potential truncation or overreading of these values, affecting multiple cipher implementations.
Critical Impact
IV truncation in CCM, GCM, and OCB cipher modes can result in loss of confidentiality. Following NIST's SP 800-38D guidance for constructing deterministic IVs for AES in GCM mode, truncation of the counter portion could lead to IV reuse, a serious cryptographic weakness that can compromise encrypted data.
Affected Products
- OpenSSL 3.0.x (prior to patched versions)
- OpenSSL 3.1.x (prior to patched versions)
- Debian Linux 12.0
- NetApp H300s Firmware
- NetApp H410s Firmware
- NetApp H500s Firmware
- NetApp H700s Firmware
- NetApp H410c Firmware
Discovery Timeline
- October 24, 2023 - OpenSSL security advisory published
- October 25, 2023 - CVE-2023-5363 published to NVD
- December 2, 2025 - Last updated in NVD database
Technical Details for CVE-2023-5363
Vulnerability Analysis
This vulnerability represents a cryptographic implementation flaw in OpenSSL's cipher initialization routines. The core issue lies in the order of operations when processing encryption parameters. The vulnerable API functions (EVP_EncryptInit_ex2(), EVP_DecryptInit_ex2(), and EVP_CipherInit_ex2()) establish key and IV values before processing the OSSL_PARAM array, causing any subsequent length modifications to be silently ignored.
The impacted ciphers include RC2, RC4, RC5, CCM, GCM, and OCB. For authenticated encryption modes (CCM, GCM, OCB), IV truncation poses the most serious security risk as IV uniqueness is fundamental to maintaining confidentiality. When IVs are reused with the same key, attackers can potentially recover plaintext or forge authenticated messages.
The OpenSSL SSL/TLS implementation is not affected by this issue. Additionally, the OpenSSL 3.0 and 3.1 FIPS providers remain unaffected because the vulnerability lies outside of the FIPS provider boundary.
Root Cause
The root cause stems from incorrect parameter processing order in the cipher initialization functions. The OSSL_PARAM array containing key and IV length modifications is processed after the key and IV have already been established and copied into internal cipher context structures. This design flaw means that length parameters specified by the application developer are effectively ignored, causing the cipher to operate with potentially incorrect key or IV sizes.
The vulnerable API was recently introduced in OpenSSL, making this a regression in newer code paths. The processing sequence should validate and apply all parameters before establishing the key and IV values to ensure application-specified lengths are honored.
Attack Vector
The attack vector requires a network-accessible application using the vulnerable OpenSSL cipher initialization APIs with modified key or IV lengths. An attacker cannot directly exploit this vulnerability remotely; instead, the vulnerability creates conditions where cryptographic protections are weakened.
For GCM mode specifically, if an application follows NIST SP 800-38D section 8.2.1 guidance for constructing deterministic IVs, the counter portion may be truncated. This truncation increases the probability of IV collisions, which can be exploited to:
- Recover plaintext through XOR operations on ciphertexts encrypted with the same IV
- Forge authentication tags under certain conditions
- Compromise forward secrecy of encrypted sessions
The vulnerability manifests when applications explicitly attempt to set non-default key or IV lengths through the OSSL_PARAM mechanism. Developers intending to use custom IV lengths for specific security requirements would unknowingly be using truncated values, weakening their cryptographic implementations. See the OpenSSL Security Advisory for complete technical details.
Detection Methods for CVE-2023-5363
Indicators of Compromise
- Applications using OpenSSL 3.0.x or 3.1.x with custom key or IV length parameters in cipher initialization
- Decryption failures in applications where peers use different OpenSSL versions
- Unexpected memory exceptions during cipher operations when using RC2, RC4, RC5, CCM, GCM, or OCB modes
- Log entries indicating cryptographic operation failures or authentication tag mismatches
Detection Strategies
- Audit application code for calls to EVP_EncryptInit_ex2(), EVP_DecryptInit_ex2(), or EVP_CipherInit_ex2() with "keylen" or "ivlen" parameters in the OSSL_PARAM array
- Implement software composition analysis (SCA) to identify systems running vulnerable OpenSSL versions (3.0.x and 3.1.x prior to patches)
- Monitor for cryptographic operation failures that may indicate IV collision issues in production environments
- Review application logs for patterns suggesting encryption/decryption mismatches between communicating systems
Monitoring Recommendations
- Deploy endpoint detection to identify vulnerable OpenSSL library versions loaded by applications
- Establish baseline metrics for cryptographic operation success rates to detect anomalies
- Monitor network traffic for repeated encryption patterns that may indicate IV reuse conditions
- Implement file integrity monitoring for OpenSSL library files to ensure patched versions remain deployed
How to Mitigate CVE-2023-5363
Immediate Actions Required
- Update OpenSSL to the latest patched version immediately on all affected systems
- Inventory all applications and systems using OpenSSL 3.0.x or 3.1.x to determine exposure scope
- Prioritize updates for systems handling sensitive encrypted communications using GCM, CCM, or OCB cipher modes
- Review application code to identify use of the vulnerable cipher initialization APIs with custom length parameters
Patch Information
OpenSSL has released security patches addressing this vulnerability. Organizations should upgrade to the latest available versions of OpenSSL 3.0.x and 3.1.x that contain the fix. The patches are available through the OpenSSL Git Repository.
Downstream vendors have also released updates:
- Debian: DSA-5532
- NetApp: Multiple advisories including NTAP-20231027-0010
Workarounds
- If immediate patching is not possible, avoid using the "keylen" and "ivlen" parameters in OSSL_PARAM arrays when calling the affected cipher initialization functions
- Use default key and IV lengths for affected cipher modes until patches can be applied
- For GCM mode implementations, ensure IV generation does not rely on application-specified IV lengths that may be ignored
- Consider temporarily switching to cipher modes not affected by this vulnerability if application requirements permit
# Check OpenSSL version on Linux systems
openssl version -a
# Verify patched version is installed
# Look for versions >= 3.0.12 or >= 3.1.4
dpkg -l | grep openssl
# For systems using package managers, update OpenSSL
apt-get update && apt-get upgrade openssl
# Verify library dependencies for applications
ldd /path/to/application | grep libssl
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


