CVE-2025-4574: Crossbeam channel Crossbeam-channel Vulnerable To Double Free Vulnerability

MODERATE
Advisory Identifier: GHSA-pg9f-39pc-qf8g
CWE-415
Published
Advisory Summary

CVE-2025-4574 is a MODERATE crossbeam-channel vulnerable to double free vulnerability (CWE-415: Double Free) affecting Crossbeam channel libraries in the crates.io ecosystem. The issue involves crossbeam-channel vulnerable to double free on drop. Remediation is available by upgrading affected packages to version 0.5.15.

CVE-2025-4574 at a Glance

CVE Identifier CVE-2025-4574
GHSA Identifier GHSA-pg9f-39pc-qf8g
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-415: Double Free
Affected Product Crossbeam channel
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix CVE-2025-4574

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

crossbeam-channel fixed: 0.5.15
Upgrade crossbeam-channel to 0.5.15
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 crossbeam-channel

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-4574, inspect your project dependencies for Crossbeam channel:

inspect dependencies for crossbeam-channel

Analyze the terminal output to locate any version of Crossbeam channel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.5.15), 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-415: Double Free, where the product calls free() twice on the same memory address. In Crossbeam channel, 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 internal `Channel` type's `Drop` method has a race which could, in some circumstances, lead to a double-free. This could result in memory corruption. Quoting from the [upstream description in merge request \#1187](https://github.com/crossbeam-rs/crossbeam/pull/1187#issue-2980761131): > The problem lies in the fact that `dicard_all_messages` contained two paths that could lead to `head.block` being read but only one of them would swap the value. This meant that `dicard_all_messages` could end up observing a non-null block pointer (and therefore attempting to free it) without setting `head.block` to null. This would then lead to `Channel::drop` making a second attempt at dropping the same pointer. The bug was introduced while fixing a memory leak, in upstream [MR \#1084](https://github.com/crossbeam-rs/crossbeam/pull/1084), first published in 0.5.12. The fix is in upstream [MR \#1187](https://github.com/crossbeam-rs/crossbeam/pull/1187) and has been published in 0.5.15

CVE-2025-4574 Affected Crossbeam channel Versions

1 component(s)
Fixed Versions:
0.5.15
Product / Package Ecosystem Affected Versions Fixed Version
crossbeam-channel
crates.io
≥ 0.5.12
< 0.5.15
0.5.15

References

Frequently Asked Questions

What is CVE-2025-4574?
CVE-2025-4574 is a security vulnerability in Crossbeam channel involving crossbeam-channel Vulnerable to Double Free on Drop under CWE-415: Double Free.
Which Crossbeam channel versions are affected?
Affected versions include releases prior to 0.5.15 across affected packages: crossbeam-channel.
What version fixes CVE-2025-4574?
Upgrading to 0.5.15 (or the latest patched release for your respective branch) resolves the vulnerability.
Is crossbeam-channel affected?
Yes, crossbeam-channel is affected in releases prior to 0.5.15. Upgrade your dependency to 0.5.15 or later.
What CWE is associated with CVE-2025-4574?
CVE-2025-4574 is classified under CWE-415: Double Free (The product calls free() twice on the same memory address.).
How can I check crates.io dependencies for CVE-2025-4574?
Run the dependency tree command: 'inspect dependencies for crossbeam-channel'. 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-pg9f-39pc-qf8g",
  "modified" : "2025-09-25T21:13:01Z",
  "published" : "2025-04-10T14:30:39Z",
  "aliases" : [ "CVE-2025-4574" ],
  "summary" : "crossbeam-channel Vulnerable to Double Free on Drop",
  "details" : "The internal `Channel` type's `Drop` method has a race\nwhich could, in some circumstances, lead to a double-free.\nThis could result in memory corruption.\n\nQuoting from the\n[upstream description in merge request \\#1187](https://github.com/crossbeam-rs/crossbeam/pull/1187#issue-2980761131):\n\n> The problem lies in the fact that `dicard_all_messages` contained two paths that could lead to `head.block` being read but only one of them would swap the value. This meant that `dicard_all_messages` could end up observing a non-null block pointer (and therefore attempting to free it) without setting `head.block` to null. This would then lead to `Channel::drop` making a second attempt at dropping the same pointer.\n\nThe bug was introduced while fixing a memory leak, in\nupstream [MR \\#1084](https://github.com/crossbeam-rs/crossbeam/pull/1084),\nfirst published in 0.5.12.\n\nThe fix is in\nupstream [MR \\#1187](https://github.com/crossbeam-rs/crossbeam/pull/1187)\nand has been published in 0.5.15",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "crossbeam-channel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.5.12"
      }, {
        "fixed" : "0.5.15"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-4574"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/crossbeam-rs/crossbeam/pull/1187"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2025-4574"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2358890"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/crossbeam-rs/crossbeam"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2025-0024.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-415" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-04-10T14:30:39Z",
    "nvd_published_at" : null
  }
}