Breaking News: Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2022-3358

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

Overview

Published
11 Oct 2022
Modified
17 Jun 2026
High CVE
2 Registry packages
20 OS packages
16 Linux distributions
Yes Fix available

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

Source: OX vulnerability database

Severity

7.5 · HIGH

CVSS 3.1 base score, scored by NVD.

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Weakness: CWE-476

Affected packages · 2

Packages affected by CVE-2022-3358
EcosystemPackageVulnerableFixed in
Cargo (Rust) openssl-src >=300.0.0, <300.0.10 300.0.10
Conan (C/C++) openssl >=3.0.0 <3.0.6 3.0.12

Open a package to see all its vulnerabilities.

Operating systems · 26 fixes

Oracle Linux 1 release · 1 package

fixed 1
openssl
Oracle Linux fixes for CVE-2022-3358
ReleasePackageFixed in
9 openssl +3 1:3.0.7-6.0.1.el9_2

Photon OS 1 release · 1 package

fixed 1
openssl
Photon OS fixes for CVE-2022-3358
ReleasePackageFixed in
4.0 openssl +4 3.0.6-1.ph4

Red Hat 2 releases · 2 packages

eol 1 fixed 1
aavmf openssl
Red Hat fixes for CVE-2022-3358
ReleasePackageFixed inAdvisory
7 aavmf +6 eol —
9 openssl +3 1:3.0.7-6.el9_2 RHSA-2023:2523

SUSE Linux Enterprise 1 release · 1 package

fixed 1
libopenssl-3-devel
SUSE Linux Enterprise fixes for CVE-2022-3358
ReleasePackageFixed inAdvisory
15.4 libopenssl-3-devel +2 3.0.1-150400.4.11.1 SUSE-SU-2022:3843-1

alma 1 release · 1 package

fixed 1
openssl
alma fixes for CVE-2022-3358
ReleasePackageFixed in
9 openssl +3 1:3.0.7-6.el9_2

alpine 4 releases · 1 package

fixed 4
openssl
alpine fixes for CVE-2022-3358
ReleasePackageFixed in
3.22 openssl 3.0.6-r0
3.23 openssl 3.0.6-r0
3.24 openssl 3.0.6-r0
edge openssl 3.0.6-r0

amazon linux 1 release · 1 package

fixed 1
openssl
amazon linux fixes for CVE-2022-3358
ReleasePackageFixed in
2023 openssl +6 1:3.0.8-1.amzn2023.0.1

chainguard 1 release · 2 packages

not affected 1 fixed 1
ruby-3-1 openssl
chainguard fixes for CVE-2022-3358
ReleasePackageFixed in
ruby-3-1 not affected
openssl 3.0.7-r0

debian 3 releases · 1 package

fixed 3
openssl
debian fixes for CVE-2022-3358
ReleasePackageFixed in
12 openssl 3.0.7-1
13 openssl 3.0.7-1
14 openssl 3.0.7-1

echo 1 release · 1 package

fixed 1
openssl
echo fixes for CVE-2022-3358
ReleasePackageFixed in
openssl 3.0.7-1

openSUSE 1 release · 1 package

fixed 1
libopenssl-3-devel
openSUSE fixes for CVE-2022-3358
ReleasePackageFixed inAdvisory
Tumbleweed libopenssl-3-devel +5 3.0.7-1.1 openSUSE-SU-2024:12475-1

root.io alpine 1 release · 1 package

fixed 1
rootio-openssl
root.io alpine fixes for CVE-2022-3358
ReleasePackageFixed in
3.23 rootio-openssl 3.0.6-r0

root.io debian 1 release · 1 package

fixed 1
rootio-openssl
root.io debian fixes for CVE-2022-3358
ReleasePackageFixed in
12 rootio-openssl 3.0.7-1

seal debian 1 release · 1 package

fixed 1
openssl
seal debian fixes for CVE-2022-3358
ReleasePackageFixed in
openssl +1 1.1.1w-0+deb11u2+sp999

ubuntu 3 releases · 1 package

fixed 3
openssl
ubuntu fixes for CVE-2022-3358
ReleasePackageFixed in
22.04 openssl 3.0.2-0ubuntu1.7
24.04 openssl 3.0.5-2ubuntu2
26.04 openssl 3.0.5-2ubuntu2

wolfi 1 release · 2 packages

not affected 1 fixed 1
ruby-3-1 openssl
wolfi fixes for CVE-2022-3358
ReleasePackageFixed in
ruby-3-1 not affected
openssl 3.0.7-r0

References

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.