CVE-2022-3358
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedOpenSSL 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).
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceOpenSSL 3.0.0-3.0.5 incorrectly handles legacy custom ciphers created with EVP_CIPHER_meth_new() using NID_undef. When such ciphers are used with EVP_EncryptInit_ex2(), EVP_DecryptInit_ex2(), or EVP_CipherInit_ex2(), the function mistakenly fetches the NULL cipher from providers instead of using the custom cipher directly, causing plaintext to be emitted as ciphertext.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data>= 3.0.0, < 3.0.6CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- 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
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Check installed OpenSSL versionRun 'openssl version' or inspect the libssl library version. On Linux: 'ldd --version' or check /usr/lib/x86_64-linux-gnu/libssl.so.3'. On Windows: check file properties of libssl-3.dll or ssleay32.dll.Affected if Version is 3.0.0 through 3.0.5 inclusive (vulnerable range)
-
Identify custom cipher implementation in application codeSearch application source code for calls to EVP_CIPHER_meth_new(). Inspect the arguments passed to this function, particularly the second parameter (nid).Affected if EVP_CIPHER_mth_new() is called with NID_undef as the cipher NID parameter
-
Check for usage of affected init functions with custom ciphersSearch for calls to EVP_EncryptInit_ex2(), EVP_DecryptInit_ex2(), or EVP_CipherInit_ex2() in application code. Identify if any of these are called with a cipher object created from EVP_CIPHER_meth_new() using NID_undef.Affected if Any of these init functions are invoked with a custom cipher built using NID_undef
-
Inspect runtime cipher configurationAt runtime, enumerate loaded ciphers via SSL_CTX_get_cipher_list() or OpenSSL's command-line 'openssl ciphers -v' to identify any custom or non-standard cipher entries.Affected if Non-standard ciphers appear in the cipher list that were not installed via standard OpenSSL configuration
A user is affected if they are running OpenSSL 3.0.0-3.0.5 AND their application code creates custom ciphers via EVP_CIPHER_meth_new() with NID_undef and uses them with the affected init functions.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped3.0.6
Upgrade to OpenSSL 3.0.6 or later, and audit application code to ensure EVP_CIPHER_meth_new() is not called with NID_undef; replace with appropriate NID values for custom ciphers.
OpenSSL 3.0.6
- 1. Identify all systems and applications running OpenSSL 3.0.0-3.0.6
- 2. Verify that any locally developed applications use EVP_CIPHER_meth_new() with NID_undef by reviewing code for calls to EVP_CIPHER_meth_new() and EVP_EncryptInit_ex2()/EVP_DecryptInit_ex2()/EVP_CipherInit_ex2()
- 3. If vulnerable custom cipher code is found, plan to either remove the deprecated legacy custom cipher implementation or update it to use proper NID values instead of NID_undef
- 4. Upgrade OpenSSL to version 3.0.6 or later from the official OpenSSL website or distribution package manager
- 5. Test all affected applications to ensure encryption/decryption functionality works correctly after the upgrade
- 6. Verify the upgrade by checking OpenSSL version: openssl version
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation4.0 h
- Testing4.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,968.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2022-3358 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2022-3358 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data