Listen to this Post
How the CVE Works:
The vulnerability occurs in `dialect/mod.rs` of the `libsql-sqlite3-parser` crate (versions ≤ 0.13.0). When parsing SQL input, the library fails to properly handle invalid UTF-8 sequences, leading to an uncontrolled crash. The issue stems from missing input validation before processing, causing a panic in Rust when non-UTF-8 bytes are encountered. This can be exploited by feeding malformed SQL queries, disrupting application availability.
DailyCVE Form:
Platform: libsql-sqlite3-parser
Version: ≤ 0.13.0
Vulnerability: DoS crash
Severity: Low
Date: May 9, 2025
What Undercode Say:
Exploitation:
// Malformed SQL query triggering crash let malicious_sql = b"SELECT \xFF\xFE FROM table"; // Invalid UTF-8 let _ = libsql_sqlite3_parser::parse(malicious_sql); // Panics
Mitigation:
- Upgrade to version ≥ `0.13.1` or commit
14f422a
.
2. Input Sanitization:
use std::str; if let Ok(valid_str) = str::from_utf8(user_input) { let _ = libsql_sqlite3_parser::parse(valid_str); }
Detection:
Check installed version cargo tree | grep libsql-sqlite3-parser
Analytics:
- Impact: Low (DoS, no RCE/data breach).
- Attack Vector: Local/remote (depends on app exposure).
- Patch Speed: Fast (fixed in subsequent commit).
Workaround:
// Wrap parser in catch_unwind std::panic::catch_unwind(|| { libsql_sqlite3_parser::parse(input); }).ok();
References:
Sources:
Reported By: github.com
Extra Source Hub:
Undercode