Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
sqlite-cli-recover — SQLite 3.53.4 CLI - High - Local - Command injection - recover dump emits hostile schema as dot-command | Kitploit
Tools/GitHubGitHub/abraxas/sqlite-cli-recover
Vulnerability AnalysisExploitationPenetration TestingCommand and ControlPapers & ResearchDatabase SecurityLabs & Practice
GitHubabraxas/sqlite-cli-recover

sqlite-cli-recover

SQLite 3.53.4 CLI - High - Local - Command injection - recover dump emits hostile schema as dot-command

View Repository
86 days agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Abraxas Labs - sqlite-cli-recover

abraxaslabs.tech  ·  github.com/abraxas  ·  @abraxas_null  ·  [email protected]  ·  sqlite-cli-recover

sqlite-cli-recover

Class: Command injection Reach: Local

SQLite 3.53.4 (b09c88c) CLI .recover prints hostile sqlite_schema.sql as a later dot-command. recoverOneStmt prepares only the first statement. A planted CREATE TABLE plus newline .shell is still written. The documented restore pipe runs it as the operator UID.

.dump printSchemaLine is the same emit class. Not libsqlite3. Not --safe. Oracle is echo of a witness string.

IDno CVE yet
ClassCommand injection (CLI .recover / .dump schema emit)
ReachLocal (victim runs the documented recover pipe; UI:R)
CWECWE-78
CVSSHigh: 7.8 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
ProductSQLite (sqlite3 CLI)
Affected3.53.4 (b09c88c14082339b66c7b7158d609a771e64ca69) SOURCE_ID 2026-07-24 19:02:57 bf7c7f30031888f4e796e429ab3978879485813aaca6f641c7b33e4e09459bcc
Authvictim runs sqlite3 hostile.db .recover | sqlite3 restored.db
LicenseGNU Affero GPL v3.0
Lab127.0.0.1:18930 only. Witness SQLITE-CLI-RECOVER-WITNESS.

What an attacker can do

Plant a valid first CREATE plus a later .shell in sqlite_schema.sql. A victim who recovers that db into a second sqlite3 runs the dot-command as their UID.

The plant is a .db file. The victim action is the documented recover pipe, not a pasted go line and not --safe off by accident. .shell is system(). The lab oracle is echo of a witness. Not a reverse shell.

How I found it

Twenty source hunts of 3.53.4. Recover's own hunt called recoverOneStmt a first-statement-only prepare and walked away. The leftover is the print path: recoverSqlCb still emits the extra text. Piping that script is how sqlite.org tells you to restore.

Wrong turns already recorded: treating first-statement prepare as a strip; pinning 3.54.0 (draft); re-filing CVE-2022-46908 --safe; calling this libsqlite3 RCE; using a reverse shell as the oracle.

Lab

cd lab
./run.sh

Builds sqlite-src-3530400 into sqlite3 with default Unix CLI recover (OPT_SHELL / SQLITE_ENABLE_DBPAGE_VTAB). writable_schema after .dbconfig defensive off. Planted CREATE TABLE t(x); plus newline .shell echo SQLITE-CLI-RECOVER-WITNESS. .recover printed .shell. Piped into a second sqlite3, it ran. Bind loopback.

SUCCESS sqlite-cli-recover how=recover-pipe-dot-shell recover-has-shell=yes restore-echo=yes SQLITE-CLI-RECOVER-WITNESS

The fix

Do not print schema SQL that is not a single statement. Split on the first prepare, emit only that statement, or refuse the row. Quote ordinary CREATE the way virtual-table dump already uses %q. Treat a later . line as hostile and drop it. --safe on the restore sqlite3 blocks .shell; it is not on in the documented pipe.

References

  • sqlite.org/src tag version-3.53.4 (b09c88c14082339b66c7b7158d609a771e64ca69)
  • Recovering Data From A Corrupt SQLite Database - documented .recover then restore
  • ext/recover/sqlite3recover.c recoverOneStmt / recoverWriteSchema1
  • src/shell.c.in recoverSqlCb, .dump printSchemaLine
Download Tool