GHSA-4f63-89w9-3jjv

Suggest an improvement
Source
https://github.com/advisories/GHSA-4f63-89w9-3jjv
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/10/GHSA-4f63-89w9-3jjv/GHSA-4f63-89w9-3jjv.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-4f63-89w9-3jjv
Aliases
Related
Published
2022-10-11T19:00:29Z
Modified
2023-11-08T04:09:40.031051Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
Summary
Using a Custom Cipher with `NID_undef` may lead to NULL encryption
Details

OpenSSL supports creating a custom cipher via the legacy EVPCIPHERmethnew() 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 EVPEncryptInitex2(), EVPDecryptInitex2() and EVPCipherInitex2() 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 EVPCIPHERmethnew(). This NID is supposed to represent the unique NID for a given cipher. However it is possible for an application to incorrectly pass NIDundef as this value in the call to EVPCIPHERmethnew(). When NIDundef 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 EVPCIPHERmethnew() 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).

References

Affected packages

crates.io / openssl-src

Package

Affected ranges

Type
SEMVER
Events
Introduced
300.0.0
Fixed
300.0.10