GHSA-r45x-ghr2-qjxc: Duplicate Advisory `#[zeroize(drop)]` Doesn't Implement `Drop` For Vulnerability

HIGH
CVSS 7.5
CWE-226
Published
Advisory Summary

GHSA-r45x-ghr2-qjxc is a HIGH (CVSS 7.5) `#[zeroize(drop)]` doesn't implement `drop` for vulnerability (CWE-226: Sensitive Information in Resource Not Removed Before Reuse) affecting Duplicate Advisory libraries in the crates.io ecosystem. The issue involves `#[zeroize(drop)]` doesn't implement `drop` for `enum`s. Remediation is available by upgrading affected packages to version 1.1.1.

GHSA-r45x-ghr2-qjxc at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-r45x-ghr2-qjxc
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-226: Sensitive Information in Resource Not Removed Before Reuse
Affected Product Duplicate Advisory
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 GHSA-r45x-ghr2-qjxc

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

zeroize_derive fixed: 1.1.1
Upgrade zeroize_derive to 1.1.1
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 zeroize_derive

How to Check if You Are Affected

To determine whether your application is affected by GHSA-r45x-ghr2-qjxc, inspect your project dependencies for Duplicate Advisory:

inspect dependencies for zeroize_derive

Analyze the terminal output to locate any version of Duplicate Advisory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.1), 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-226: Sensitive Information in Resource Not Removed Before Reuse, where the product releases a resource such as memory or a file so that it can be made available for reuse, but it does not clear or "zeroize" the information contained in the resource before the product performs a critical state transition or makes the resource available for reuse by other entities. In Duplicate Advisory, 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

## Duplicate Advisory This advisory is a duplicate of [GHSA-c5hx-w945-j4pq](https://github.com/advisories/GHSA-c5hx-w945-j4pq). This link is preserved to maintain external references. ## Original Description Affected versions of this crate did not implement `Drop` when `#[zeroize(drop)]` was used on an `enum`. This can result in memory not being zeroed out after dropping it, which is exactly what is intended when adding this attribute. The flaw was corrected in version 1.2 and `#[zeroize(drop)]` on `enum`s now properly implements `Drop`.

GHSA-r45x-ghr2-qjxc Affected Duplicate Advisory Versions

1 component(s)
Fixed Versions:
1.1.1
Product / Package Ecosystem Affected Versions Fixed Version
zeroize_derive
crates.io
< 1.1.1
1.1.1

References

Frequently Asked Questions

What is GHSA-r45x-ghr2-qjxc?
GHSA-r45x-ghr2-qjxc is a security vulnerability in Duplicate Advisory involving `#[zeroize(drop)]` doesn't implement `Drop` for `enum`s under CWE-226: Sensitive Information in Resource Not Removed Before Reuse.
Which Duplicate Advisory versions are affected?
Affected versions include releases prior to 1.1.1 across affected packages: zeroize_derive.
What version fixes GHSA-r45x-ghr2-qjxc?
Upgrading to 1.1.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is zeroize_derive affected?
Yes, zeroize_derive is affected in releases prior to 1.1.1. Upgrade your dependency to 1.1.1 or later.
What is the CVSS score of GHSA-r45x-ghr2-qjxc?
GHSA-r45x-ghr2-qjxc 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 GHSA-r45x-ghr2-qjxc?
GHSA-r45x-ghr2-qjxc is classified under CWE-226: Sensitive Information in Resource Not Removed Before Reuse (The product releases a resource such as memory or a file so that it can be made available for reuse, but it does not clear or "zeroize" the information contained in the resource before the product performs a critical state transition or makes the resource available for reuse by other entities.).
How can I check crates.io dependencies for GHSA-r45x-ghr2-qjxc?
Run the dependency tree command: 'inspect dependencies for zeroize_derive'. 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-r45x-ghr2-qjxc",
  "modified" : "2022-06-23T17:29:03Z",
  "published" : "2022-06-17T00:30:52Z",
  "withdrawn" : "2022-06-23T17:29:03Z",
  "aliases" : [ ],
  "summary" : "Duplicate Advisory: `#[zeroize(drop)]` doesn't implement `Drop` for `enum`s",
  "details" : "## Duplicate Advisory\nThis advisory is a duplicate of [GHSA-c5hx-w945-j4pq](https://github.com/advisories/GHSA-c5hx-w945-j4pq). This link is preserved to maintain external references.\n\n## Original Description\nAffected versions of this crate did not implement `Drop` when `#[zeroize(drop)]` was used on an `enum`.\n\nThis can result in memory not being zeroed out after dropping it, which is exactly what is intended when adding this attribute.\n\nThe flaw was corrected in version 1.2 and `#[zeroize(drop)]` on `enum`s now properly implements `Drop`.\n",
  "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" : "zeroize_derive"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.1.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/iqlusioninc/crates/issues/876"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/iqlusioninc/crates"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2021-0115.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-226" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-17T00:30:52Z",
    "nvd_published_at" : null
  }
}