Skip to main content

SQLite sqldiff CVE-2025-71316

| EUVDEUVD-2025-210067 CRITICAL
Improper Handling of Unicode Encoding (CWE-176)
2026-06-04 cisa-cg GHSA-gxv8-whj6-g59f
9.2
CVSS 4.0 · Vendor: cisa-cg
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify host exposing sqldiff.exe to user input
  2. Delivery
    Stage malicious DLL on reachable UNC or local path
  3. Exploit
    Submit filename with Unicode Best-Fit characters
  4. Execution
    Windows CRT converts Unicode to '-L <dll>' argv
  5. Persist
    sqldiff loads attacker DLL via LoadLibrary
  6. Impact
    DllMain 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – 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)
v2 Jun 04, 2026 - 20:28 cvss changed CVSS 9.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.

v1 Jun 04, 2026 - 19:22 CVSS 7.8

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

sqldiff 0 <2025-12-26

Affected Packages

euvd sqldiff fix: 2025-12-26

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

Vendor (cisa-cg) PRIMARY 9.2 CRITICAL
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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

6
Analysis Updated
Jun 04, 2026 - 20:28 vuln.today
v3 - CVSS changed
Analysis Updated
Jun 04, 2026 - 20:28 vuln.today
v2 - CVSS changed
Severity Changed
Jun 04, 2026 - 20:22 NVD
HIGH CRITICAL
CVSS changed
Jun 04, 2026 - 20:22 NVD
7.3 (HIGH) 9.2 (CRITICAL)
CVSS changed
Jun 04, 2026 - 19:22 NVD
7.8 (HIGH) 7.3 (HIGH)
CVE Published
Jun 04, 2026 - 17:39 nvd
HIGH 7.3

DescriptionCVE.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

Why It Matters

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.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 85% exploitable
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.0%
Patch available Yes
Active threat Yes
Deciding rule
CRITICAL severity + public POC available
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

76
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: +20
Weaponized: 0
Threat intel: +10
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in Sqlite

View all
CVE-2015-5895 CRITICAL POC
10.0 Sep 18

Multiple unspecified vulnerabilities in SQLite before 3.8.10.2, as used in Apple iOS before 9, have unknown impact and a

CVE-2019-8457 CRITICAL
9.8 May 30

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

CVE-2022-35737 HIGH POC
7.5 Aug 03

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

CVE-2017-10989 CRITICAL
9.8 Jul 07

The getNodeSize function in ext/rtree/rtree.c in SQLite through 3.19.3, as used in GDAL and other products, mishandles u

CVE-2025-6965 HIGH POC
7.2 Jul 15

Memory corruption in SQLite versions before 3.50.2 allows network-based attackers with low privileges to manipulate aggr

CVE-2019-5018 HIGH POC
8.1 May 10

An exploitable use after free vulnerability exists in the window function functionality of Sqlite3 3.26.0. Rated high se

CVE-2026-11822 MEDIUM POC
6.8 Jun 09

Memory corruption in SQLite versions before 3.53.2 enables attackers to crash processes, exhaust memory, or potentially

CVE-2020-13871 HIGH POC
7.5 Jun 06

SQLite 3.32.2 has a use-after-free in resetAccumulator in select.c because the parse tree rewrite for window functions i

CVE-2020-11655 HIGH POC
7.5 Apr 09

SQLite through 3.31.1 allows attackers to cause a denial of service (segmentation fault) via a malformed window-function

CVE-2021-36690 HIGH POC
7.5 Aug 24

A segmentation fault can occur in the sqlite3.exe command-line component of SQLite 3.36.0 via the idxGetTableInfo functi

CVE-2026-87016 HIGH POC
8.1 Sep 09

OAuth and SCIM identity confusion in Open WebUI 0.6.41-0.10.x (SQLite-backed deployments only) allows unauthenticated re

CVE-2018-20346 HIGH POC
8.1 Dec 21

SQLite before 3.25.3, when the FTS3 extension is enabled, encounters an integer overflow (and resultant buffer overflow)

Threat IntelligenceMISP

CISA Advisories
Sources: CISA (public domain)

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy