Integer truncation memory corruption in SQLite aggregate query handling
CVE-2025-6965 is a vulnerability in SQLite before 3.50.2 in aggregate query processing. According to the provided sources, the flaw is in SQLite’s handling of aggregate terms where the number of aggregate terms can exceed the number of available columns. More specifically, SQLite assigned the issue to an integer truncation problem in findOrCreateAggInfoColumn(): when aggregate processing involves a very large number of distinct column references, a 32-bit index can be truncated to a signed 16-bit value once the count exceeds 32,767. This truncation can produce negative or otherwise invalid indexes. In non-debug builds, the corrupted index may then be used for out-of-bounds array access, including heap-buffer-overflow conditions and invalid VDBE instruction construction; the provided context also notes out-of-bounds read/write behavior in agginfoPersistExprCb. The resulting condition is memory corruption. SQLite lists the issue as fixed in version 3.50.2.
Are you exposed to this one?
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
Impact, mitigation & remediation
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Mitigation
If you can’t patch tonight, do this now.
Remediation
Patch, then assume compromise.
Exploits
No valid public exploits. Mallory filtered out 1 candidate as fakes, detection scripts, or README-only repos.
All candidate exploits were filtered out by Mallory's validation.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
Recent activity
65 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
A SQLite vulnerability reportedly found with help from Google Big Sleep before imminent exploitation.
SQLite memory corruption vulnerability (pre-3.50.2) discovered pre-exploitation by Google's Big Sleep framework.
A third-party/open-source vulnerability affecting Apple software where processing a file may lead to memory corruption.
A memory corruption vulnerability in SQLite that some security tools incorrectly attributed to the Windows core component WinSqlite3.dll, resulting in false-positive vulnerability detections on Windows systems.
The version that knows your environment.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.