CVE-2022-1434: Openssl src Incorrect MAC Key Used Vulnerability

MODERATE
Advisory Identifier: GHSA-638m-m8mh-7gw2
CVSS 5.9
CWE-327
Published
Advisory Summary

CVE-2022-1434 is a MODERATE (CVSS 5.9) incorrect mac key used vulnerability (CWE-327: Use of a Broken or Risky Cryptographic Algorithm) affecting Openssl src libraries in the crates.io ecosystem. The issue involves incorrect mac key used in the rc4-md5 ciphersuite. Remediation is available by upgrading affected packages to version 300.0.6.

CVE-2022-1434 at a Glance

CVE Identifier CVE-2022-1434
GHSA Identifier GHSA-638m-m8mh-7gw2
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-327: Use of a Broken or Risky Cryptographic Algorithm
Affected Product Openssl src
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 5.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2022-1434

To remediate this vulnerability, upgrade all affected Openssl src dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

openssl-src fixed: 300.0.6
Upgrade openssl-src to 300.0.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for openssl-src

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-1434, inspect your project dependencies for Openssl src:

inspect dependencies for openssl-src

Analyze the terminal output to locate any version of Openssl src in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 300.0.6), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm, where the product uses a broken or risky cryptographic algorithm or protocol. In Openssl src, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The OpenSSL 3.0 implementation of the RC4-MD5 ciphersuite incorrectly uses the AAD data as the MAC key. This makes the MAC key trivially predictable. An attacker could exploit this issue by performing a man-in-the-middle attack to modify data being sent from one endpoint to an OpenSSL 3.0 recipient such that the modified data would still pass the MAC integrity check. Note that data sent from an OpenSSL 3.0 endpoint to a non-OpenSSL 3.0 endpoint will always be rejected by the recipient and the connection will fail at that point. Many application protocols require data to be sent from the client to the server first. Therefore, in such a case, only an OpenSSL 3.0 server would be impacted when talking to a non-OpenSSL 3.0 client. If both endpoints are OpenSSL 3.0 then the attacker could modify data being sent in both directions. In this case both clients and servers could be affected, regardless of the application protocol. Note that in the absence of an attacker this bug means that an OpenSSL 3.0 endpoint communicating with a non-OpenSSL 3.0 endpoint will fail to complete the handshake when using this ciphersuite. The confidentiality of data is not impacted by this issue, i.e. an attacker cannot decrypt data that has been encrypted using this ciphersuite - they can only modify it. In order for this attack to work both endpoints must legitimately negotiate the RC4-MD5 ciphersuite. This ciphersuite is not compiled by default in OpenSSL 3.0, and is not available within the default provider or the default ciphersuite list. This ciphersuite will never be used if TLSv1.3 has been negotiated. In order for an OpenSSL 3.0 endpoint to use this ciphersuite the following must have occurred: 1) OpenSSL must have been compiled with the (non-default) compile time option enable-weak-ssl-ciphers 2) OpenSSL must have had the legacy provider explicitly loaded (either through application code or via configuration) 3) The ciphersuite must have been explicitly added to the ciphersuite list 4) The libssl security level must have been set to 0 (default is 1) 5) A version of SSL/TLS below TLSv1.3 must have been negotiated 6) Both endpoints must negotiate the RC4-MD5 ciphersuite in preference to any others that both endpoints have in common Fixed in OpenSSL 3.0.3 (Affected 3.0.0,3.0.1,3.0.2).

CVE-2022-1434 Affected Openssl src Versions

1 component(s)
Fixed Versions:
300.0.6
Product / Package Ecosystem Affected Versions Fixed Version
openssl-src
crates.io
≥ 300.0.0
< 300.0.6
300.0.6

References

Frequently Asked Questions

What is CVE-2022-1434?
CVE-2022-1434 is a security vulnerability in Openssl src involving Incorrect MAC key used in the RC4-MD5 ciphersuite under CWE-327: Use of a Broken or Risky Cryptographic Algorithm.
Which Openssl src versions are affected?
Affected versions include releases prior to 300.0.6 across affected packages: openssl-src.
What version fixes CVE-2022-1434?
Upgrading to 300.0.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is openssl-src affected?
Yes, openssl-src is affected in releases prior to 300.0.6. Upgrade your dependency to 300.0.6 or later.
What is the CVSS score of CVE-2022-1434?
CVE-2022-1434 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2022-1434?
CVE-2022-1434 is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm (The product uses a broken or risky cryptographic algorithm or protocol.).
How can I check crates.io dependencies for CVE-2022-1434?
Run the dependency tree command: 'inspect dependencies for openssl-src'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-638m-m8mh-7gw2",
  "modified" : "2022-06-17T00:01:47Z",
  "published" : "2022-05-04T00:00:22Z",
  "aliases" : [ "CVE-2022-1434" ],
  "summary" : "Incorrect MAC key used in the RC4-MD5 ciphersuite",
  "details" : "The OpenSSL 3.0 implementation of the RC4-MD5 ciphersuite incorrectly uses the AAD data as the MAC key. This makes the MAC key trivially predictable. An attacker could exploit this issue by performing a man-in-the-middle attack to modify data being sent from one endpoint to an OpenSSL 3.0 recipient such that the modified data would still pass the MAC integrity check. Note that data sent from an OpenSSL 3.0 endpoint to a non-OpenSSL 3.0 endpoint will always be rejected by the recipient and the connection will fail at that point. Many application protocols require data to be sent from the client to the server first. Therefore, in such a case, only an OpenSSL 3.0 server would be impacted when talking to a non-OpenSSL 3.0 client. If both endpoints are OpenSSL 3.0 then the attacker could modify data being sent in both directions. In this case both clients and servers could be affected, regardless of the application protocol. Note that in the absence of an attacker this bug means that an OpenSSL 3.0 endpoint communicating with a non-OpenSSL 3.0 endpoint will fail to complete the handshake when using this ciphersuite. The confidentiality of data is not impacted by this issue, i.e. an attacker cannot decrypt data that has been encrypted using this ciphersuite - they can only modify it. In order for this attack to work both endpoints must legitimately negotiate the RC4-MD5 ciphersuite. This ciphersuite is not compiled by default in OpenSSL 3.0, and is not available within the default provider or the default ciphersuite list. This ciphersuite will never be used if TLSv1.3 has been negotiated. In order for an OpenSSL 3.0 endpoint to use this ciphersuite the following must have occurred: 1) OpenSSL must have been compiled with the (non-default) compile time option enable-weak-ssl-ciphers 2) OpenSSL must have had the legacy provider explicitly loaded (either through application code or via configuration) 3) The ciphersuite must have been explicitly added to the ciphersuite list 4) The libssl security level must have been set to 0 (default is 1) 5) A version of SSL/TLS below TLSv1.3 must have been negotiated 6) Both endpoints must negotiate the RC4-MD5 ciphersuite in preference to any others that both endpoints have in common Fixed in OpenSSL 3.0.3 (Affected 3.0.0,3.0.1,3.0.2).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "openssl-src"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "300.0.0"
      }, {
        "fixed" : "300.0.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-1434"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/github/advisory-database/issues/405"
  }, {
    "type" : "WEB",
    "url" : "https://cert-portal.siemens.com/productcert/pdf/ssa-953464.pdf"
  }, {
    "type" : "WEB",
    "url" : "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=7d56a74a96828985db7354a55227a511615f732b"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2022-0026.html"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20220602-0009"
  }, {
    "type" : "WEB",
    "url" : "https://www.openssl.org/news/secadv/20220503.txt"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-327" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-17T00:01:47Z",
    "nvd_published_at" : "2022-05-03T16:15:00Z"
  }
}