CVE-2022-2097: Openssl src AES OCB Fails To Encrypt Vulnerability

HIGH
Advisory Identifier: GHSA-3wx7-46ch-7rq2
CVSS 7.5
CWE-311 CWE-327 CWE-326
Published
Advisory Summary

CVE-2022-2097 is a HIGH (CVSS 7.5) aes ocb fails to encrypt vulnerability (CWE-311: Missing Encryption of Sensitive Data) affecting Openssl src libraries in the crates.io ecosystem. The issue involves aes ocb fails to encrypt some bytes. Remediation is available by upgrading affected packages to version 111.22.0, 300.0.9.

CVE-2022-2097 at a Glance

CVE Identifier CVE-2022-2097
GHSA Identifier GHSA-3wx7-46ch-7rq2
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-311: Missing Encryption of Sensitive Data
Affected Product Openssl src
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

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

How to Fix CVE-2022-2097

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: 111.22.0
Upgrade openssl-src to 111.22.0
openssl-src fixed: 300.0.9
Upgrade openssl-src to 300.0.9
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-2097, 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 111.22.0), 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-311: Missing Encryption of Sensitive Data, where the product does not encrypt sensitive or critical information before storage or transmission. 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

AES OCB mode for 32-bit x86 platforms using the AES-NI assembly optimized implementation will not encrypt the entirety of the data under some circumstances. This could reveal sixteen bytes of data that was pre-existing in the memory that wasn't written. In the special case of "in place" encryption, sixteen bytes of the plaintext would be revealed. Since OpenSSL does not support OCB based cipher suites for TLS and DTLS, they are both unaffected.

CVE-2022-2097 Affected Openssl src Versions

2 component(s)
Fixed Versions:
111.22.0300.0.9
Product / Package Ecosystem Affected Versions Fixed Version
openssl-src
crates.io
< 111.22.0
111.22.0
openssl-src
crates.io
≥ 300.0.0
< 300.0.9
300.0.9

References

NVD — CVE-2022-2097 NVD
https://nvd.nist.gov/vuln/detail/CVE-2022-2097
www.openssl.org/news/secadv/2022070... WEB
https://www.openssl.org/news/secadv/20220705.txt
Openssl src Security Information SECURITY
https://www.debian.org/security/2023/dsa-5343
Openssl src Security Information SECURITY
https://security.netapp.com/advisory/ntap-20240621-0006
Openssl src Security Information SECURITY
https://security.netapp.com/advisory/ntap-20230420-0008
Openssl src Security Information SECURITY
https://security.netapp.com/advisory/ntap-20220715-0011
Openssl src Security Information SECURITY
https://security.gentoo.org/glsa/202210-02
rustsec.org/advisories/rustsec-... WEB
https://rustsec.org/advisories/RUSTSEC-2022-0032.html
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VCMNWKERPBKOEBNL7CLTTX3ZZCZLH7XA
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/V6567JERRHHJW2GNGJGKDRNHR7SNPZK7
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/R6CK57NBQFTPUMXAPJURCGXUYT76NQAK
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VCMNWKERPBKOEBNL7CLTTX3ZZCZLH7XA
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/V6567JERRHHJW2GNGJGKDRNHR7SNPZK7
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/R6CK57NBQFTPUMXAPJURCGXUYT76NQAK
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2023/02/msg00019.html
Openssl src Source Repository REPOSITORY
https://github.com/alexcrichton/openssl-src-rs
git.openssl.org/gitweb/ WEB
https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=a98f339ddd7e8f487d6e0088d4a9a42324885a93
git.openssl.org/gitweb/ WEB
https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=919925673d6c9cfed3c1085497f5dfbbed5fc431
git.openssl.org/gitweb/ WEB
https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=a98f339ddd7e8f487d6e0088d4a9a42324885a93
git.openssl.org/gitweb/ WEB
https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=919925673d6c9cfed3c1085497f5dfbbed5fc431
cert-portal.siemens.com/productcert/pdf/ssa... WEB
https://cert-portal.siemens.com/productcert/pdf/ssa-332410.pdf

Frequently Asked Questions

What is CVE-2022-2097?
CVE-2022-2097 is a security vulnerability in Openssl src involving AES OCB fails to encrypt some bytes under CWE-311: Missing Encryption of Sensitive Data.
Which Openssl src versions are affected?
Affected versions include releases prior to 111.22.0, 300.0.9 across affected packages: openssl-src.
What version fixes CVE-2022-2097?
Upgrading to 111.22.0, 300.0.9 (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 111.22.0, 300.0.9. Upgrade your dependency to 111.22.0, 300.0.9 or later.
What is the CVSS score of CVE-2022-2097?
CVE-2022-2097 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2022-2097?
CVE-2022-2097 is classified under CWE-311: Missing Encryption of Sensitive Data (The product does not encrypt sensitive or critical information before storage or transmission.).
How can I check crates.io dependencies for CVE-2022-2097?
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-3wx7-46ch-7rq2",
  "modified" : "2024-06-24T21:24:18Z",
  "published" : "2022-07-06T19:57:19Z",
  "aliases" : [ "CVE-2022-2097" ],
  "summary" : "AES OCB fails to encrypt some bytes",
  "details" : "AES OCB mode for 32-bit x86 platforms using the AES-NI assembly optimized implementation will not encrypt the entirety of the data under some circumstances.  This could reveal sixteen bytes of data that was pre-existing in the memory that wasn't written.  In the special case of \"in place\" encryption, sixteen bytes of the plaintext would be revealed.\n\nSince OpenSSL does not support OCB based cipher suites for TLS and DTLS, they are both unaffected.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "openssl-src"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "111.22.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "openssl-src"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "300.0.0"
      }, {
        "fixed" : "300.0.9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-2097"
  }, {
    "type" : "WEB",
    "url" : "https://www.openssl.org/news/secadv/20220705.txt"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2023/dsa-5343"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20240621-0006"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20230420-0008"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20220715-0011"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/202210-02"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2022-0032.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VCMNWKERPBKOEBNL7CLTTX3ZZCZLH7XA"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/V6567JERRHHJW2GNGJGKDRNHR7SNPZK7"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/R6CK57NBQFTPUMXAPJURCGXUYT76NQAK"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VCMNWKERPBKOEBNL7CLTTX3ZZCZLH7XA"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/V6567JERRHHJW2GNGJGKDRNHR7SNPZK7"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/R6CK57NBQFTPUMXAPJURCGXUYT76NQAK"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2023/02/msg00019.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/alexcrichton/openssl-src-rs"
  }, {
    "type" : "WEB",
    "url" : "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=a98f339ddd7e8f487d6e0088d4a9a42324885a93"
  }, {
    "type" : "WEB",
    "url" : "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=919925673d6c9cfed3c1085497f5dfbbed5fc431"
  }, {
    "type" : "WEB",
    "url" : "https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=a98f339ddd7e8f487d6e0088d4a9a42324885a93"
  }, {
    "type" : "WEB",
    "url" : "https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=919925673d6c9cfed3c1085497f5dfbbed5fc431"
  }, {
    "type" : "WEB",
    "url" : "https://cert-portal.siemens.com/productcert/pdf/ssa-332410.pdf"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-311", "CWE-326", "CWE-327" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-06T19:57:19Z",
    "nvd_published_at" : "2022-07-05T11:15:00Z"
  }
}