CVE-2020-35870:Use-after-free vulnerability in rusqlite Rust crate before 0.23.0 affecting the Auxdata API

splash
Back

Description Preview

A memory safety vulnerability was discovered in the rusqlite crate for Rust in versions prior to 0.23.0. The issue involves a use-after-free vulnerability in the Auxdata API, which could potentially allow attackers to execute arbitrary code, cause application crashes, or leak sensitive information. This vulnerability is classified as CWE-416 (Use After Free), which occurs when a program continues to use memory after it has been freed, potentially leading to memory corruption.

Overview

The rusqlite crate is a popular Rust SQLite database interface. The vulnerability stems from improper memory management in the Auxdata API implementation, where the code continues to reference memory that has already been freed. This creates a use-after-free condition that could be exploited by attackers to manipulate memory, potentially leading to code execution or information disclosure. The severity of this vulnerability depends on how the rusqlite library is used within applications, but any application using the affected Auxdata API functionality before version 0.23.0 should be considered vulnerable.

Remediation

To address this vulnerability, users should upgrade the rusqlite crate to version 0.23.0 or later, which contains the fix for this issue. The update can be performed by modifying the Cargo.toml file to specify the updated version requirement:

[dependencies]
rusqlite = "0.23.0" # or later

After updating the dependency specification, run cargo update to apply the changes. If upgrading is not immediately possible, consider implementing workarounds such as avoiding the use of the Auxdata API functionality until the upgrade can be completed.

References

  1. Release notes containing the fix: https://github.com/rusqlite/rusqlite/releases/tag/0.23.0
  2. RustSec Advisory: https://rustsec.org/advisories/RUSTSEC-2020-0014.html
  3. CWE-416 (Use After Free): https://cwe.mitre.org/data/definitions/416.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