GHSA-6hcf-g6gr-hhcr: `openssl` `X509Extension :new` And `X509Extension::new_nid` Null Pointer Vulnerability

HIGH
CWE-476
Published
Advisory Summary

GHSA-6hcf-g6gr-hhcr is a HIGH :new` and `x509extension::new_nid` null pointer vulnerability (CWE-476: NULL Pointer Dereference) affecting `openssl` `X509Extension libraries in the crates.io ecosystem. The issue involves :new` and `x509extension::new_nid` null pointer dereference. Remediation is available by upgrading affected packages to version 0.10.48.

GHSA-6hcf-g6gr-hhcr at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-6hcf-g6gr-hhcr
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-476: NULL Pointer Dereference
Affected Product `openssl` `X509Extension
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-6hcf-g6gr-hhcr

To remediate this vulnerability, upgrade all affected `openssl` `X509Extension 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 fixed: 0.10.48
Upgrade openssl to 0.10.48
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

How to Check if You Are Affected

To determine whether your application is affected by GHSA-6hcf-g6gr-hhcr, inspect your project dependencies for `openssl` `X509Extension:

inspect dependencies for openssl

Analyze the terminal output to locate any version of `openssl` `X509Extension in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.10.48), 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-476: NULL Pointer Dereference, where the product dereferences a pointer that it expects to be valid but is null. In `openssl` `X509Extension, 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

These functions would crash when the context argument was None with certain extension types. Thanks to David Benjamin (Google) for reporting this issue.

GHSA-6hcf-g6gr-hhcr Affected `openssl` `X509Extension Versions

1 component(s)
Fixed Versions:
0.10.48
Product / Package Ecosystem Affected Versions Fixed Version
openssl
crates.io
≥ 0.9.7
< 0.10.48
0.10.48

References

Frequently Asked Questions

What is GHSA-6hcf-g6gr-hhcr?
GHSA-6hcf-g6gr-hhcr is a security vulnerability in `openssl` `X509Extension involving :new` and `X509Extension::new_nid` null pointer dereference under CWE-476: NULL Pointer Dereference.
Which `openssl` `X509Extension versions are affected?
Affected versions include releases prior to 0.10.48 across affected packages: openssl.
What version fixes GHSA-6hcf-g6gr-hhcr?
Upgrading to 0.10.48 (or the latest patched release for your respective branch) resolves the vulnerability.
Is openssl affected?
Yes, openssl is affected in releases prior to 0.10.48. Upgrade your dependency to 0.10.48 or later.
What CWE is associated with GHSA-6hcf-g6gr-hhcr?
GHSA-6hcf-g6gr-hhcr is classified under CWE-476: NULL Pointer Dereference (The product dereferences a pointer that it expects to be valid but is NULL.).
How can I check crates.io dependencies for GHSA-6hcf-g6gr-hhcr?
Run the dependency tree command: 'inspect dependencies for openssl'. 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-6hcf-g6gr-hhcr",
  "modified" : "2023-03-24T22:01:23Z",
  "published" : "2023-03-24T22:01:23Z",
  "aliases" : [ ],
  "summary" : "`openssl` `X509Extension::new` and `X509Extension::new_nid` null pointer dereference",
  "details" : "These functions would crash when the context argument was None with certain extension types.\n\nThanks to David Benjamin (Google) for reporting this issue.\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "openssl"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.9.7"
      }, {
        "fixed" : "0.10.48"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sfackler/rust-openssl/pull/1854"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sfackler/rust-openssl"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2023-0024.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-476" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-24T22:01:23Z",
    "nvd_published_at" : null
  }
}