CVE-2021-45693:Uninitialized memory read vulnerability in messagepack-rs Rust crate

splash
Back

Description Preview

CVE-2021-45693 affects the messagepack-rs crate for Rust through 2021-01-26. The vulnerability exists in the deserialize_string_primitive function which may read from uninitialized memory locations. This is classified as a CWE-908 (Use of Uninitialized Resource) vulnerability, which could potentially lead to information disclosure or application crashes.

Overview

The messagepack-rs crate is a Rust implementation of the MessagePack serialization format. The vulnerability occurs during deserialization of string primitives where the code may access uninitialized memory. When processing certain malformed MessagePack data, the deserialize_string_primitive function fails to properly validate memory boundaries before reading, potentially exposing sensitive information from memory or causing application crashes. This vulnerability could be exploited by providing specially crafted input to applications using the affected messagepack-rs versions.

Remediation

As the messagepack-rs crate appears to be unmaintained, users should consider migrating to alternative MessagePack implementations for Rust, such as:

  1. rmp-serde: A well-maintained MessagePack implementation that works with Serde
  2. msgpack-rust: Another actively maintained MessagePack library

If migration is not immediately possible, implement input validation before passing data to the messagepack-rs deserializer and consider wrapping deserialization operations in error handling code to prevent application crashes.

References

  1. RustSec Advisory: https://rustsec.org/advisories/RUSTSEC-2021-0092.html
  2. Advisory details: https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/messagepack-rs/RUSTSEC-2021-0092.md
  3. CWE-908: Use of Uninitialized Resource - https://cwe.mitre.org/data/definitions/908.html

Industry ExposureMost to least
This section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.

  1. Accommodation & Food Services
    Accommodation & Food Services
  2. Administrative, Support, Waste Management & Remediation Services
    Administrative, Support, Waste Management & Remediation Services
  3. Agriculture, Forestry Fishing & Hunting
    Agriculture, Forestry Fishing & Hunting
  4. Arts, Entertainment & Recreation
    Arts, Entertainment & Recreation
  5. Construction
    Construction
  6. Educational Services
    Educational Services
  7. Finance and Insurance
    Finance and Insurance
  8. Health Care & Social Assistance
    Health Care & Social Assistance
  9. Information
    Information
  10. Management of Companies & Enterprises
    Management of Companies & Enterprises
  11. Manufacturing
    Manufacturing
  12. Mining
    Mining
  13. Other Services (except Public Administration)
    Other Services (except Public Administration)
  14. Professional, Scientific, & Technical Services
    Professional, Scientific, & Technical Services
  15. Public Administration
    Public Administration
  16. Real Estate Rental & Leasing
    Real Estate Rental & Leasing
  17. Retail Trade
    Retail Trade
  18. Transportation & Warehousing
    Transportation & Warehousing
  19. Utilities
    Utilities
  20. Wholesale Trade
    Wholesale Trade

Focus on What Matters

  1. See Everything.
  2. Identify True Risk.
  3. Proactively Mitigate Threats.

Let's talk!

background