GHSA-vgmh-mqm4-8j88: Pared Pared Vulnerable To Use After Vulnerability

MODERATE
CWE-416
Published
Advisory Summary

GHSA-vgmh-mqm4-8j88 is a MODERATE pared vulnerable to use after vulnerability (CWE-416: Use After Free) affecting Pared libraries in the crates.io ecosystem. The issue involves pared vulnerable to use after free in `parc` and `prc` due to missing lifetime constraints. Remediation is available by upgrading affected packages to version 0.4.0.

GHSA-vgmh-mqm4-8j88 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-vgmh-mqm4-8j88
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-416: Use After Free
Affected Product Pared
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-vgmh-mqm4-8j88

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

pared fixed: 0.4.0
Upgrade pared to 0.4.0
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 pared

How to Check if You Are Affected

To determine whether your application is affected by GHSA-vgmh-mqm4-8j88, inspect your project dependencies for Pared:

inspect dependencies for pared

Analyze the terminal output to locate any version of Pared in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.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-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 Pared, 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

Affected versions of this crate didn't provide sufficient lifetime constraints to conversion functions from `alloc::sync::Arc` and `alloc::rc::Rc`, which made it possible to create projections of these reference counted pointers. Unlike the original reference counted pointers, these projections could outlive original data's lifetimes. This projected pointer could cause the original `Arc`'s or `Rc`'s `Drop::drop` to get called at a point where the original data was no longer valid, leading to a potential use after free. The affected functions were - `pared::prc::Prc::from_rc` - `pared::prc::Prc::project` - `pared::prc::Prc::try_from_rc` - `pared::sync::Parc::from_arc` - `pared::sync::Parc::project` - `pared::sync::Parc::try_from_arc` This flaw was fixed in [108f540ea8acb6073751a1aa386085c1cdc4fd1e](https://github.com/radekvit/pared/commit/108f540ea8acb6073751a1aa386085c1cdc4fd1e) by requiring that the type stored in the `Arc`s and `Rc`s passed to these functions contain `T: 'static`.

GHSA-vgmh-mqm4-8j88 Affected Pared Versions

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

References

Frequently Asked Questions

What is GHSA-vgmh-mqm4-8j88?
GHSA-vgmh-mqm4-8j88 is a security vulnerability in Pared involving pared Vulnerable to Use After Free in `Parc` and `Prc` Due to Missing Lifetime Constraints under CWE-416: Use After Free.
Which Pared versions are affected?
Affected versions include releases prior to 0.4.0 across affected packages: pared.
What version fixes GHSA-vgmh-mqm4-8j88?
Upgrading to 0.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pared affected?
Yes, pared is affected in releases prior to 0.4.0. Upgrade your dependency to 0.4.0 or later.
What CWE is associated with GHSA-vgmh-mqm4-8j88?
GHSA-vgmh-mqm4-8j88 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-vgmh-mqm4-8j88?
Run the dependency tree command: 'inspect dependencies for pared'. 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-vgmh-mqm4-8j88",
  "modified" : "2025-03-24T16:06:28Z",
  "published" : "2025-03-24T16:06:28Z",
  "aliases" : [ ],
  "summary" : "pared Vulnerable to Use After Free in `Parc` and `Prc` Due to Missing Lifetime Constraints",
  "details" : "Affected versions of this crate didn't provide sufficient lifetime constraints to conversion functions from `alloc::sync::Arc` and `alloc::rc::Rc`, which made it possible to create projections of these reference counted pointers. Unlike the original reference counted pointers, these projections could outlive original data's lifetimes.\n\nThis projected pointer could cause the original `Arc`'s or `Rc`'s `Drop::drop` to get called at a point where the original data was no longer valid, leading to a potential use after free.\n\nThe affected functions were\n- `pared::prc::Prc::from_rc`\n- `pared::prc::Prc::project`\n- `pared::prc::Prc::try_from_rc`\n- `pared::sync::Parc::from_arc`\n- `pared::sync::Parc::project`\n- `pared::sync::Parc::try_from_arc`\n\nThis flaw was fixed in [108f540ea8acb6073751a1aa386085c1cdc4fd1e](https://github.com/radekvit/pared/commit/108f540ea8acb6073751a1aa386085c1cdc4fd1e) by requiring that the type stored in the `Arc`s and `Rc`s passed to these functions contain `T: 'static`.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "pared"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.4.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/radekvit/pared/issues/2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/radekvit/pared/commit/108f540ea8acb6073751a1aa386085c1cdc4fd1e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/radekvit/pared"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2025-0016.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-416" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-24T16:06:28Z",
    "nvd_published_at" : null
  }
}