GHSA-8mv5-7x95-7wcf: Mopa `mopa` Is Technically Unsound Vulnerability
HIGHGHSA-8mv5-7x95-7wcf is a HIGH `mopa` is technically unsound vulnerability (General Security Weakness) affecting Mopa libraries in the crates.io ecosystem. The issue involves `mopa` is technically unsound. Remediation is available in the latest vendor maintenance releases.
GHSA-8mv5-7x95-7wcf at a Glance
How to Fix GHSA-8mv5-7x95-7wcf
To remediate this vulnerability, upgrade all affected Mopa dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade mopa to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for mopa
How to Check if You Are Affected
To determine whether your application is affected by GHSA-8mv5-7x95-7wcf, inspect your project dependencies for Mopa:
inspect dependencies for mopa
Analyze the terminal output to locate any version of Mopa in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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 General Security Weakness. In Mopa, 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
GHSA-8mv5-7x95-7wcf Affected Mopa Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mopa
|
crates.io |
≤ 0.2.2
|
|
References
Frequently Asked Questions
What is GHSA-8mv5-7x95-7wcf?
Which Mopa versions are affected?
What version fixes GHSA-8mv5-7x95-7wcf?
Is mopa affected?
What CWE is associated with GHSA-8mv5-7x95-7wcf?
How can I check crates.io dependencies for GHSA-8mv5-7x95-7wcf?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8mv5-7x95-7wcf",
"modified" : "2023-06-13T18:35:51Z",
"published" : "2022-06-17T00:12:33Z",
"aliases" : [ ],
"summary" : "`mopa` is technically unsound",
"details" : "The `mopa` crate redefines the deprecated `TraitObject` struct from `core::raw` like so:\n```rust\n#[repr(C)]\n#[derive(Copy, Clone)]\n#[doc(hidden)]\npub struct TraitObject {\n pub data: *mut (),\n pub vtable: *mut (),\n}\n```\nThis is done to then transmute a reference to a trait object (`&dyn Trait` for any trait `Trait`) into this struct and retrieve the `data` field for the purpose of downcasting. This is used to implement `downcast_ref_unchecked()`, in terms of which `downcast_ref()` is also implemented. Same goes for mutable reference downcasting and `Box` downcasting.\n\nThe Rust compiler explicitly reserves the right to change the memory layout of `&dyn Trait` for any trait `Trait`. The worst case scenario is that it swaps `data` and `vtable`, making an executable location breach and compromisation of ASLR possible, since reads from `data` would read `vtable` instead. Likewise, arbitrary code execution is also theoretically possible if reads of `vtable` generated by the compiler read `data` instead.\n\nWhile, as of Rust 1.52, this unsound assumption still holds true, updating the compiler may silently create UB in a crate which previously compiled and run without issues, compromising the security of builds which are believed to be reproducible.\n\nA potential strategy to resolve this has already been suggested in an issue on the GitHub repository of the crate.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "mopa"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.2.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/chris-morgan/mopa/issues/13"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/chris-morgan/mopa"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2021-0095.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-17T00:12:33Z",
"nvd_published_at" : null
}
}