GHSA-4fcv-w3qc-ppgg: rust-openssl Use-After-Free in `Md :fetch` And `Cipher::fetch` Vulnerability

MODERATE
CWE-416
Published
Advisory Summary

GHSA-4fcv-w3qc-ppgg is a MODERATE :fetch` and `cipher::fetch` vulnerability (CWE-416: Use After Free) affecting rust-openssl Use-After-Free in `Md libraries in the crates.io ecosystem. The issue involves :fetch` and `cipher::fetch`. Remediation is available by upgrading affected packages to version 0.10.72.

GHSA-4fcv-w3qc-ppgg at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-4fcv-w3qc-ppgg
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-416: Use After Free
Affected Product rust-openssl Use-After-Free in `Md
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-4fcv-w3qc-ppgg

To remediate this vulnerability, upgrade all affected rust-openssl Use-After-Free in `Md 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.72
Upgrade openssl to 0.10.72
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-4fcv-w3qc-ppgg, inspect your project dependencies for rust-openssl Use-After-Free in `Md:

inspect dependencies for openssl

Analyze the terminal output to locate any version of rust-openssl Use-After-Free in `Md in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.10.72), 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-416: Use After Free, where the product reuses or references memory after it has been freed. at some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer. In rust-openssl Use-After-Free in `Md, 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

When a `Some(...)` value was passed to the `properties` argument of either of these functions, a use-after-free would result. In practice this would nearly always result in OpenSSL treating the properties as an empty string (due to `CString::drop`'s behavior). The maintainers thank [quitbug](https://github.com/quitbug/) for reporting this vulnerability to us.

GHSA-4fcv-w3qc-ppgg Affected rust-openssl Use-After-Free in `Md Versions

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

References

Frequently Asked Questions

What is GHSA-4fcv-w3qc-ppgg?
GHSA-4fcv-w3qc-ppgg is a security vulnerability in rust-openssl Use-After-Free in `Md involving :fetch` and `Cipher::fetch` under CWE-416: Use After Free.
Which rust-openssl Use-After-Free in `Md versions are affected?
Affected versions include releases prior to 0.10.72 across affected packages: openssl.
What version fixes GHSA-4fcv-w3qc-ppgg?
Upgrading to 0.10.72 (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.72. Upgrade your dependency to 0.10.72 or later.
What CWE is associated with GHSA-4fcv-w3qc-ppgg?
GHSA-4fcv-w3qc-ppgg is classified under CWE-416: Use After Free (The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.).
How can I check crates.io dependencies for GHSA-4fcv-w3qc-ppgg?
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-4fcv-w3qc-ppgg",
  "modified" : "2025-04-04T20:31:08Z",
  "published" : "2025-04-04T20:31:08Z",
  "aliases" : [ ],
  "summary" : "rust-openssl Use-After-Free in `Md::fetch` and `Cipher::fetch`",
  "details" : "When a `Some(...)` value was passed to the `properties` argument of either of these functions, a use-after-free would result.\n\nIn practice this would nearly always result in OpenSSL treating the properties as an empty string (due to `CString::drop`'s behavior).\n\nThe maintainers thank [quitbug](https://github.com/quitbug/) for reporting this vulnerability to us.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "openssl"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.10.39"
      }, {
        "fixed" : "0.10.72"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sfackler/rust-openssl/pull/2390"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sfackler/rust-openssl/commit/87085bd67896b7f92e6de35d081f607a334beae4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sfackler/rust-openssl"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2025-0022.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-416" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-04-04T20:31:08Z",
    "nvd_published_at" : null
  }
}