Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify host exposing sqldiff.exe to user input
-
DeliveryStage malicious DLL on reachable UNC or local path
-
ExploitSubmit filename with Unicode Best-Fit characters
-
ExecutionWindows CRT converts Unicode to '-L <dll>' argv
-
Persistsqldiff loads attacker DLL via LoadLibrary
-
ImpactDllMain executes code in process context
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Unicode normalization
|
| Exploitation Conditions | Exploitation requires the Windows build of sqldiff.exe (the bug is in the Microsoft C runtime ANSI conversion path, so non-Windows builds are unaffected) and a code path in which attacker-influenced strings are passed as command-line arguments to sqldiff - for example, a service, web backend, or script that calls sqldiff.exe with a user-supplied filename or database path. The attacker must also be able to place a DLL where sqldiff's '-L' loader can reach it, typically a UNC/WebDAV path the target host can resolve or a writable local directory. Limiting factors are the AT:P attack requirement (the calling environment must propagate Unicode characters into argv rather than rejecting or normalising them), the absence of CISA KEV listing, and the fact that interactive command-line use by a trusted administrator does not realistically expose this surface. |
| Impact | CVSS 4.0 base score 9.2 (Critical) reflects network attack vector, low complexity, no privileges, no user interaction, and high CIA impact, but the AT:P (Attack Requirements: Present) flag and the 'WorstFit' technique itself signal real-world conditions are narrower than the headline score implies. The CVSS AV:N rating is questionable for a local CLI utility - exploitation realistically requires that some upstream component (a web app, build pipeline, or wrapper script) passes attacker-influenced strings to sqldiff.exe, so a defender should treat AV as effectively 'network-adjacent' rather than directly remote. A public exploit technique is documented in the Blackhat EU 2024 'WorstFit' research, and a patch is available, but the CVE is not in CISA KEV and EPSS data was not provided, suggesting opportunistic rather than mass exploitation at this time. Priority is high for any environment that exposes sqldiff.exe to externally controlled arguments and low to moderate for users who only invoke it interactively. |
| Exploit ScenarioDerived | An attacker submits a filename containing Unicode lookalike characters (for example, a full-width hyphen) to a web application, build pipeline, or batch script that forwards user input as a command-line argument to sqldiff.exe. When sqldiff starts, the Windows ANSI conversion Best-Fits those characters into ASCII '-L <path>', causing sqldiff to load an attacker-controlled DLL (hosted on a UNC share or dropped to a writable directory) and execute its DllMain in the context of the invoking process. The Blackhat EU 2024 'WorstFit' presentation publicly documents the underlying technique. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv3 – Jun 04, 2026
Arbitrary DLL loading in SQLite's sqldiff.exe utility on Windows allows attackers to achieve code execution by abusing the Microsoft C runtime's Unicode-to-ANSI Best-Fit character conversion. Specially crafted Unicode characters in command-line arguments can be transformed into ASCII characters that sqldiff then parses as the '-L' option, loading an attacker-supplied DLL. Publicly available exploit research (Blackhat EU 2024 'WorstFit' presentation) demonstrates the technique, though no public exploit identified targeting sqldiff specifically and it is not listed in CISA KEV.
Earlier versions of this analysis (2)
Arbitrary DLL loading in SQLite's sqldiff.exe utility on Windows allows remote attackers to achieve code execution by abusing the Windows C runtime's best-fit Unicode-to-ANSI conversion to smuggle a -L (load extension) flag through what appears to be a benign file argument. The flaw is part of the broader 'WorstFit' Windows ANSI conversion attack class disclosed at Black Hat EU 2024, affects sqldiff versions prior to the 2025-12-26 fix, and has publicly available exploit material though it is not listed in CISA KEV.
Argument injection in SQLite's sqldiff.exe utility on Windows allows a local attacker to load arbitrary DLLs by exploiting how the Windows C runtime converts Unicode characters to ANSI codepages. The flaw lets a crafted command-line argument string be misinterpreted so file arguments are treated as the '-L' option, enabling code execution via DLL loading. Publicly available exploit code exists (demonstrated at Black Hat EU 2024's WorstFit research), but the issue is not listed in CISA KEV.
RemediationAI
Upgrade sqldiff.exe to a SQLite tool build dated on or after 2025-12-26 that incorporates the winmain.c fix (see https://sqlite.org/src/file/tool/winmain.c and the CISA CSAF advisory at https://raw.githubusercontent.com/cisagov/CSAF/develop/csaf_files/IT/white/2026/va-26-155-01.json). Where patching is delayed, avoid invoking sqldiff.exe with externally supplied or untrusted command-line arguments, and where possible run it from wrapper scripts that explicitly use the Unicode CommandLineToArgvW API or pass arguments through a sanitised allowlist; note that this requires changes in every caller of sqldiff and does not protect interactive use. As a stronger compensating control, remove sqldiff.exe from Windows hosts that do not need it, or run it under an unprivileged service account with AppLocker/WDAC rules blocking DLL loads from user-writable paths - the trade-off being that legitimate use of the '-L' shared-extension feature will break.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
sqldiff.exe is a command-line diagnostic tool shipped with SQLite that compares two database files. The root cause maps to CWE-176 (Improper Handling of Unicode Encoding), specifically the Windows GetCommandLineA / CommandLineToArgvA conversion path, which performs Best-Fit (WorstFit) mapping from Unicode codepoints into the active ANSI codepage. Characters such as full-width hyphens or other Unicode 'lookalikes' get silently transliterated into ASCII '-' and letters, so a string that was passed as a benign filename argument can be re-interpreted by the argv parser as the '-L <path>' switch that sqldiff uses to load a shared extension DLL. The affected CPE is cpe:2.3:a:sqlite:sqldiff (all versions prior to the 2025-12-26 fix in tool/winmain.c).
Know when Sqlite gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Primary rating from Vendor (cisa-cg) · only source for this CVE.
CVSS VectorVendor: cisa-cg
Lifecycle Timeline
6DescriptionCVE.org
SQLite 'sqldiff.exe' does not securely handle the way the Microsoft Windows C runtime converts Unicode characters to ANSI codepages. An attacker could use the '-L' option to load an arbitrary DLL with a crafted command line argument string that results in command line file arguments being misinterpreted as command line options. Fixed on or around 2025-12-26.
Executive ViewAI
SQLite's sqldiff.exe utility on Windows contains a critical arbitrary code execution vulnerability (CVE-2025-71316, CVSS 9.2) exploitable through Unicode-to-ANSI character conversion in command-line arguments; publicly available exploit code exists. Organizations using SQLite tools on Windows systems face immediate risk of unauthorized code execution if attackers can influence utility invocation, affecting development workstations, database administration systems, and production infrastructure dependent on SQLite utilities.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Multiple unspecified vulnerabilities in SQLite before 3.8.10.2, as used in Apple iOS before 9, have unknown impact and a
SQLite3 from 3.6.0 to and including 3.27.2 is vulnerable to heap out-of-bound read in the rtreenode() function when hand
SQLite 1.0.12 through 3.39.x before 3.39.2 sometimes allows an array-bounds overflow if billions of bytes are used in a
The getNodeSize function in ext/rtree/rtree.c in SQLite through 3.19.3, as used in GDAL and other products, mishandles u
Memory corruption in SQLite versions before 3.50.2 allows network-based attackers with low privileges to manipulate aggr
An exploitable use after free vulnerability exists in the window function functionality of Sqlite3 3.26.0. Rated high se
Memory corruption in SQLite versions before 3.53.2 enables attackers to crash processes, exhaust memory, or potentially
SQLite 3.32.2 has a use-after-free in resetAccumulator in select.c because the parse tree rewrite for window functions i
SQLite through 3.31.1 allows attackers to cause a denial of service (segmentation fault) via a malformed window-function
A segmentation fault can occur in the sqlite3.exe command-line component of SQLite 3.36.0 via the idxGetTableInfo functi
OAuth and SCIM identity confusion in Open WebUI 0.6.41-0.10.x (SQLite-backed deployments only) allows unauthenticated re
SQLite before 3.25.3, when the FTS3 extension is enabled, encounters an integer overflow (and resultant buffer overflow)
EUVD-2025-210067
GHSA-gxv8-whj6-g59f
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB