Using a Custom Cipher with NID_undef may lead to NULL encryption
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Partial Red Hat: 2 fixed, 2 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-476.
Summary
OpenSSL supports creating a custom cipher via the legacy EVP_CIPHER_meth_new() function and associated function calls. This function was deprecated in OpenSSL 3.0 and application authors are instead encouraged to use the new provider mechanism in order to implement custom ciphers. OpenSSL versions 3.0.0 to 3.0.5 incorrectly handle legacy custom ciphers passed to the EVP_EncryptInit_ex2(), EVP_DecryptInit_ex2() and EVP_CipherInit_ex2() functions (as well as other similarly named encryption and decryption initialisation functions). Instead of using the custom cipher directly it incorrectly tries to fetch an equivalent cipher from the available providers. An equivalent cipher is found based on the NID passed to EVP_CIPHER_meth_new(). This NID is supposed to represent the unique NID for a given cipher. However it is possible for an application to incorrectly pass NID_undef as this value in the call to EVP_CIPHER_meth_new(). When NID_undef is used in this way the OpenSSL encryption/decryption initialisation function will match the NULL cipher as being equivalent and will fetch this from the available providers. This will succeed if the default provider has been loaded (or if a third party provider has been loaded that offers this cipher). Using the NULL cipher means that the plaintext is emitted as the ciphertext. Applications are only affected by this issue if they call EVP_CIPHER_meth_new() using NID_undef and subsequently use it in a call to an encryption/decryption initialisation function. Applications that only use SSL/TLS are not impacted by this issue. Fixed in OpenSSL 3.0.6 (Affected 3.0.0-3.0.5).
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| OpenSSL | OpenSSL | Fixed in OpenSSL 3.0.6 (Affected 3.0.0-3.0.5) | — | No fix listed | CNA |
| — | openssl-src (crates.io) | 300.0.0 to before 300.0.10 | 300.0.10 | Patch available | GHSA-4f63-89w9-3jjv |
- OpenSSL VendorOpenSSL Affected Fixed in OpenSSL 3.0.6 (Affected 3.0.0-3.0.5) Fixed in — No fix listed CNA
- openssl-src (crates.io) Vendor— Affected 300.0.0 to before 300.0.10 Fixed in 300.0.10 Patch available GHSA-4f63-89w9-3jjv
Remediation
- Fix · GHSA-4f63-89w9-3jjv openssl-src (crates.io) Fixed in 300.0.10 Advisory →
Red Hat 1 advisory
- RHSA-2023:2523 Released 2023-05-09 · Red Hat rating Lowopenssl security and bug fix update
- Red Hat Enterprise Linux AppStream (v. 9) openssl-devel-1:3.0.7-6.el9_2, openssl-perl-1:3.0.7-6.el9_2
- Red Hat Enterprise Linux BaseOS (v. 9) openssl-1:3.0.7-6.el9_2, openssl-libs-1:3.0.7-6.el9_2
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2023:2523 |
| Red Hat Enterprise Linux BaseOS (v. 9) | Fixed | RHSA-2023:2523 |
Not affected: 5 products
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat JBoss Core Services
- Red Hat JBoss Web Server 3
- Red Hat JBoss Web Server 5
Timeline
- 2026-10-02 Threatist record created from CVE-2022-3358
- 2026-10-03 Alias added: GHSA-4f63-89w9-3jjv
- 2026-10-08 EPSS moved to the 90th–95th percentile
- 2026-10-09 Priority changed: LOW → MEDIUM
References
Advisory 5
Other 5
- https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=5485c56679d7c49b96e8fc8ca708b0b7e7c03c4b
- https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=5485c56679d7c49b96e8fc8ca708b0b7e7c03c4b
- https://github.com/alexcrichton/openssl-src-rs
- https://rustsec.org/advisories/RUSTSEC-2022-0059.html
- https://security.netapp.com/advisory/ntap-20221028-0014
More Openssl vulnerabilities
- TI-2022-01915 The c_rehash script allows command injection CVSS 3.1CRITICAL 9.8
- TI-2021-02645 SM2 Decryption Buffer Overflow CVSS 3.1CRITICAL 9.8
- TI-2009-03392 The TLS protocol, and the SSL protocol 3.0 and possibly earlier, as used in Microsoft… CVSS 3.1CRITICAL 9.8
- TI-2022-01176 The c_rehash script allows command injection CVSS 3.1CRITICAL 9.8
- TI-2014-00154 The (1) TLS and (2) DTLS implementations in OpenSSL 1.0.1 before 1.0.1g do not properly… KEVCVSS 3.1HIGH 7.5
- TI-2025-14107 Stack buffer overflow in CMS (Auth)EnvelopedData parsing CVSS 3.1HIGH 8.8
Sources
- CVE-2022-3358 · CVE Program
- CVE-2022-3358 · NVD
- FIRST EPSS
- GHSA-4f63-89w9-3jjv · GitHub Advisory Database · CC BY 4.0
- CVE-2022-3358 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences