CVE-2021-28305 Fix a use-after-free bug in diesels Sqlite backend
A use-after-free vulnerability in the diesel Rust library's SQLite backend allows attackers to potentially execute arbitrary code or cause a denial of service.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-28305?
CVE-2021-28305 is a critical use after free vulnerability in n/a, published on 12 Mar 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
An issue was discovered in the diesel crate before 1.4.6 for Rust. There is a use-after-free in the SQLite backend because the semantics of sqlite3_column_name are not followed.
Weakness: CWE-416
Which versions are affected by CVE-2021-28305?
3 open source packages ship an affected version, including diesel. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
diesel crates.io | All versions | 1.4.6 |
diesel crates.io | All versions | 1.4.6 |
diesel crates.io | From 0.0.0-0 | 1.4.6 |
Products include Diesel Diesel.
How do I fix CVE-2021-28305?
Upgrade diesel to 1.4.6 or later.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2021-28305 being exploited?
There is no known exploitation of CVE-2021-28305 in the wild and no public exploit code.
Sources
Also known as DEBIAN-CVE-2021-28305, GHSA-j8q9-5rp9-4mv9, RUSTSEC-2021-0037.