Summary
eyre: Parts of Report are dropped as the wrong type during downcast
In affected versions, after a Report is constructed using wrap_err or wrap_err_with to attach a message of type D onto an error of type E, then using downcast to recover ownership of either the value of type D or the value of type E, one of two things can go wrong:
If downcasting to
E, there remains a value of typeDto be dropped. It is incorrectly "dropped" by runningE's drop behavior, rather thanD's. For example ifDis&strandEisstd::io::Error, there would be a call ofstd::io::Error::dropin which the reference received by theDropimpl does not refer to a valid value of typestd::io::Error, but instead to&str.If downcasting to
D, there remains a value of typeEto be dropped. WhenDandEdo not happen to be the same size,E's drop behavior is incorrectly executed in the wrong location. The reference received by theDropimpl may point left or right of the realEvalue that is meant to be getting dropped.
In both cases, when the Report contains an error E that has nontrivial drop behavior, the most likely outcome is memory corruption.
When the Report contains an error E that has trivial drop behavior (for example a Utf8Error) but where D has nontrivial drop behavior (such as String), the most likely outcome is that downcasting to E would leak D.
Impact
An object is accessed using a type that is incompatible with its actual type, causing the runtime to interpret memory incorrectly. Typical impact: memory safety violations, unexpected behavior, or code execution.
GHSA-4V52-7Q2X-V4XJ has a CVSS score of 7.5 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.6.12); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is GHSA-4V52-7Q2X-V4XJ? GHSA-4V52-7Q2X-V4XJ is a high-severity type confusion vulnerability in eyre (rust), affecting versions >= 0.6.9, < 0.6.12. It is fixed in 0.6.12. An object is accessed using a type that is incompatible with its actual type, causing the runtime to interpret memory incorrectly.
- How severe is GHSA-4V52-7Q2X-V4XJ? GHSA-4V52-7Q2X-V4XJ has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of eyre are affected by GHSA-4V52-7Q2X-V4XJ? eyre (rust) versions >= 0.6.9, < 0.6.12 is affected.
- Is there a fix for GHSA-4V52-7Q2X-V4XJ? Yes. GHSA-4V52-7Q2X-V4XJ is fixed in 0.6.12. Upgrade to this version or later.
- Is GHSA-4V52-7Q2X-V4XJ exploitable, and should I be worried? Whether GHSA-4V52-7Q2X-V4XJ is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-4V52-7Q2X-V4XJ is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-4V52-7Q2X-V4XJ? Upgrade
eyreto 0.6.12 or later.