Summary
SQLite command-line shell through 3.54.1 contains a command injection vulnerability in the .recover command that emits attacker-planted dot-commands stored in sqlite_schema.sql values verbatim. Attackers can craft a database whose schema holds a valid CREATE statement followed by a .shell or .system line, executing OS commands when victims pipe .recover output into sqlite3.
Remediation
References
- Advisoryhttps://abraxaslabs.tech/research/sqlite-cli-recover
- Advisoryhttps://www.vulncheck.com/advisories/sqlite-cli-through-3.54.1-command-injection-via-recover-output
- Referencehttps://github.com/sqlite/sqlite
- Referencehttps://github.com/sqlite/sqlite/blob/version-3.54.1/ext/recover/sqlite3recover.c#L1221-L1223
- Referencehttps://github.com/sqlite/sqlite/blob/version-3.54.1/src/shell.c.in#L7877-L7891