SQLite: Command injection in .recover command (CVE-2026-119586)
The SQLite command-line shell through version 3.54.1 is vulnerable to command injection because the .recover command emits malicious dot-commands stored in the database schema, which execute when the output is piped back into the shell.
CVE search metadata
CVE search record: CVE-2026-119586. Severity: high. CVSS: 7.8. KEV: no. Product: SQLite command-line shell (<= 3.54.1). Brief: SQLite: Command injection in .recover command (CVE-2026-119586). Brief link: https://feed.craftedsignal.io/briefs/2026-10-sqlite-recover-injection/
Triage facts
Revision 1- Applicability
- SQLite command-line shell (<= 3.54.1)
- Evidence
- Unknown
- Severity
- High
- Action
- Elevated
- Sources
- 1 public source
- Freshness
- Revision 1Oct 30, 13:30 UTC
- Vulnerabilities
- 1 CVE
- Source quality
- A2Roughly even chance
SQLite command-line shell versions up to and including 3.54.1 contain a command injection vulnerability in the .recover functionality. When a database contains a specially crafted 'sqlite_schema' table entry, the .recover command includes attacker-controlled dot-commands (e.g., .shell or .system) in its output. If a victim executes the .recover command and redirects or pipes the resulting output into an active SQLite shell session, the injected system commands will execute with the privileges of the user running the shell.
Attack Chain
- Attacker creates a malicious database file containing a crafted sqlite_schema entry.
- Attacker injects a malicious dot-command (e.g., .shell id) into the schema metadata.
- Attacker lures or forces a victim to run the SQLite shell and execute the .recover command on the malicious database.
- The .recover command outputs the attacker's malicious dot-commands to standard output.
- The victim pipes this output into a new or existing sqlite3 process.
- The sqlite3 shell interprets the piped input, parses the dot-commands, and executes the malicious OS command.
Recommendation
- Identify and inventory all systems utilizing the SQLite command-line shell (sqlite3) through version 3.54.1.
- Update all instances of the SQLite command-line shell to a version beyond 3.54.1 as soon as a patch becomes available.
- Implement strict controls over the execution of the .recover command on untrusted or externally sourced database files.
- Use the hunt lead below to identify potential usage of the .recover command in automated pipelines where redirection may occur.
Threat Hunt
Search for instances of the sqlite3 binary being invoked with the .recover command, particularly when paired with shell redirection or piping.
Data: Process creation logs (command line arguments), Shell history logs (e.g., .bash_history, PowerShell history)
Mitigations
Upgrade SQLite command-line shell to a version after 3.54.1 once available
CVE-2026-119586