Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2022-3358

HIGH 7.5EPSS 94%

Using a Custom Cipher with NID_undef may lead to NULL encryption

Also known as GHSA-4f63-89w9-3jjv, RUSTSEC-2022-0059

Mitigation

  • Upgrade openssl-src to 300.0.10 or later.

Who should check

  • Projects that depend on crates.io package openssl-src (>= 300.0.0, < 300.0.10)
  • Anyone running OpenSSL Fixed in OpenSSL 3.0.6 (Affected 3.0.0-3.0.5)

Vulnerability facts

Affected
openssl-src >= 300.0.0, < 300.0.10
Fixed in
300.0.10
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, no login needed
CVSS
7.5 (v3.1, NVD)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Network
  • Attack complexity: Low
  • Privileges required: None
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: High
  • Integrity impact: None
  • Availability impact: None
EPSS
5.78% chance of exploitation in 30 days (percentile 94, 2026-11-26)
CWE
CWE-476
Published
Modified

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

Affected and fixed versions

Package / productAffectedFixedSource
crates.io openssl-src>= 300.0.0, < 300.0.10300.0.10osv
OpenSSLFixed in OpenSSL 3.0.6 (Affected 3.0.0-3.0.5)—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2022-3358. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-3358.md
Affected: openssl-src >= 300.0.0, < 300.0.10
Fixed in: 300.0.10

Steps:
1. Search this machine and project for openssl-src (crates.io), OpenSSL: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2022-3358 being exploited?

There is no confirmed exploitation: CVE-2022-3358 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 5.78% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2022-3358?

High: CVSS 7.5 (v3.1, scored by NVD). Remote, no login needed.

Which versions are affected by CVE-2022-3358?

openssl-src >= 300.0.0, < 300.0.10.

Is there a fix for CVE-2022-3358?

Yes. Fixed in 300.0.10. Upgrade openssl-src to 300.0.10 or later.

How do I check if I'm affected by CVE-2022-3358?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors