Skip to content
Fencer Intel
high 7.5

CVE-2022-3358 json

Using a Custom Cipher with NID_undef may lead to NULL encryption

published 4y ago modified last mo. also GHSA-4f63-89w9-3jjv , RUSTSEC-2022-0059 , EUVD-2022-7013

cvss
7.5
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
4.0%
EPSS 4.0% chance of exploitation in 30 days, percentile 90%
public exploits
1
Metasploit

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

Patch / fix

  • crates.io openssl-src 300.0.10
  • openssl openssl 3.0.6
  • openssl Debian 14, Debian 13, Debian 12 3.0.7-1

debian advisories DEBIAN-CVE-2022-3358

  • openssl Ubuntu 22.04 LTS 3.0.2-0ubuntu1.7

ubuntu advisories UBUNTU-CVE-2022-3358

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • openssl RHEL 9 1:3.0.7-6.el9_2
  • openssl-libs RHEL 9 1:3.0.7-6.el9_2
  • openssl-perl RHEL 9 1:3.0.7-6.el9_2

red hat advisories RHSA-2023:2523

  • openssl-3 SLE Module for Basesystem 15 SP4, openSUSE Leap 15.4 3.0.1-150400.4.11.1

suse advisories SUSE-SU-2022:3843-1

  • openssl-3 openSUSE Tumbleweed 3.0.7-1.1

opensuse advisories openSUSE-SU-2024:12475-1

  • openssl AlmaLinux 9 1:3.0.7-6.el9_2
  • openssl-libs AlmaLinux 9 1:3.0.7-6.el9_2
  • openssl-perl AlmaLinux 9 1:3.0.7-6.el9_2

almalinux advisories ALSA-2023:2523

  • openssl Alpine 3.24, Alpine 3.23, Alpine 3.22 +5 more 3.0.6-r0
  • openssl3 Alpine 3.16, Alpine 3.15 3.0.6-r0

alpine advisories ALPINE-CVE-2022-3358

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Is CVE-2022-3358 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2022-3358 updated cvss 7.5

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

  • Red Hat Enterprise Linux 6 openssl, openssl-perl Red Hat Enterprise Linux 7 ovmf, OVMF, AAVMF, openssl, openssl-libs, openssl-perl
    affected: no fix planned “Out of support scope”
  • Red Hat Enterprise Linux AppStream (v. 9) openssl-perl 3.0.7-6.el9_2 Red Hat Enterprise Linux BaseOS (v. 9) openssl 3.0.7-6.el9_2, openssl-libs 3.0.7-6.el9_2
    fixed: vendor fix RHSA-2023:2523
  • Red Hat Enterprise Linux 8 edk2, shim, openssl, shim-x64, edk2-ovmf, shim-aa64, +5 more Red Hat Enterprise Linux 9 edk2, shim, shim-x64, edk2-ovmf, shim-aa64, edk2-tools, +2 more Red Hat JBoss Core Services jbcs-httpd24-openssl, jbcs-httpd24-openssl-libs, jbcs-httpd24-openssl-perl Red Hat JBoss Web Server 3 openssl Red Hat JBoss Web Server 5 openssl
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Timeline

  1. First public exploit (Metasploit auxiliary/scanner/ssl/ssl_version)
  2. Published

Exploit prediction

4.04% chance of exploitation in the next 30 days, higher than 90% of all scored CVEs (FIRST EPSS, 2026-11-09).

Exploits and checks

CVSS scores

assigned by version score vector
NVD 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
GitHub 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected packages

ecosystem package affected fixed in
crates.io openssl-src
>=300.0.0, <300.0.10
300.0.10

Affected products

  • OpenSSL OpenSSL

Classification

Weakness
Technology feeds

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.