Skip to main content
Public proof of conceptFix available

CVE-2022-3358

A public proof of concept exists; no exploitation attested.

  • Published2022-10-11
  • Fixed in3.0.6
  • WeaknessCWE-476

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

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).

Timeline

dates in UTC
  1. 2022-10-1115:15CVE publishedNVD

Versions per branch

NVD · OSV
OpenSSL
BranchAffectedFixed in
3.0≥ 3.0.0, < 3.0.63.0.6
openssl-src
BranchAffectedFixed in
300.0≥ 300.0.0, < 300.0.10300.0.10

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • edk2Ubuntu:Pro:16.04:LTSall versions · no fixed version listed
  • opensslWolfiall versions · fixed in 3.0.7-r0
  • opensslUbuntu:22.04:LTSall versions · fixed in 3.0.2-0ubuntu1.7
  • opensslRed Hat:enterprise_linux:9::baseosall versions · fixed in 1:3.0.7-6.el9_2and 4 other packages
  • opensslDebian:14all versions · fixed in 3.0.7-1
  • opensslDebian:13all versions · fixed in 3.0.7-1
  • opensslDebian:12all versions · fixed in 3.0.7-1
  • opensslCleanStartall versions · fixed in 3.0.6-r0

19 more package ranges on OSV.dev

Vendor advisories

  • CVE-2022-3358 Red Hat Product Security49 products fixed · 14 known affected

    openssl: Using a Custom Cipher with NID_undef may lead to NULL encryption

    openssl as a component of Red Hat Enterprise Linux 6 · openssl-devel as a component of Red Hat Enterprise Linux 6 · openssl-perl as a component of Red Hat Enterprise Linux 6 · +11 more

  • RHSA-2023:2523 Red Hat Product Security49 products fixed

    Red Hat Security Advisory: openssl security and bug fix update

Full record on NVD

Fix

  1. Update OpenSSL to 3.0.6
  2. Vendor fix Red Hat Product Security RHSA-2023:2523 · 49 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 For the update to take effect, all services linked to the OpenSSL library must be restarted, or the system rebooted.
  3. No fix planned, says the vendor Red Hat Product Security CVE-2022-3358 · 14 productsOut of support scope

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
1 moduleauxiliary/scanner/ssl/ssl_versionrank: normalModule metadata: Metasploit Framework, © Rapid7, Inc., BSD-3-Clause.
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Published
2022-10-11
Last modified
2026-06-17
NVD status
Modified
GitHub advisory
GHSA-4f63-89w9-3jjv

Frequently asked questions

What is CVE-2022-3358?

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).

Is CVE-2022-3358 actively exploited?

Active exploitation of CVE-2022-3358 has not been confirmed. Its EPSS score was 4.0% on 2026-12-03, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2022-3358?

CVE-2022-3358 has a CVSS v3 base score of 7.5 (High severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.

Running OpenSSL? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record