# CVE-2025-6965: Integer Truncation on SQLite

> An integer truncation flaw in SQLite allows memory corruption via excessive aggregate terms, potentially leading to code execution or denial of service.

- **Severity:** High 7.2 (`CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:L/VI:H/VA:L/SC:L/SI:H/SA:L/S:N/AU:N/R:U/V:D/RE:L/U:Green`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Jul 2025
- **Updated:** 15 Oct 2026
- **Also known as:** ALPINE-CVE-2025-6965, ALSA-2025:11803, ALSA-2025:11933, ALSA-2025:11992, ALSA-2025:12010, ALSA-2025:14101, ALSA-2025:20936, AZL-65327, AZL-65507, BELL-CVE-2025-6965, BIT-sqlite-2025-6965, CLSA-2025-1754336638, CLSA-2025-1754337993, CLSA-2025-1754338597, CLSA-2025-1754338599, CLSA-2025-1754338696, CLSA-2025-1754339166, CLSA-2025-1754340339, CLSA-2025-1754342507, CLSA-2025-1754410836, CLSA-2025-1754410992, CLSA-2025-1754411171, CLSA-2025-1754411369, CLSA-2025-1760649409, DEBIAN-CVE-2025-6965, ECHO-ada7-fb58-6c9c, GHSA-2m69-gcr7-jv3q, MGASA-2025-0267, MINI-7263-vjhr-273w, MINI-vqpm-8q3q-9h4j, OESA-2025-2160, OESA-2025-2161, OESA-2025-2256, RHSA-2025:11802, RHSA-2025:11803, RHSA-2025:11933, RHSA-2025:11992, RHSA-2025:12010, RHSA-2025:12036, RHSA-2025:12349, RHSA-2025:12521, RHSA-2025:12522, RHSA-2025:12749, RHSA-2025:12901, RHSA-2025:12904, RHSA-2025:12905, RHSA-2025:14101, RHSA-2025:20936, RLSA-2025:11802, RLSA-2025:11803, RLSA-2025:11933, RLSA-2025:11992, RLSA-2025:12010, RLSA-2025:14101, RLSA-2025:20936, ROOT-OS-DEBIAN-11-CVE-2025-6965, SUSE-SU-2025:02672-1, SUSE-SU-2025:02744-1, SUSE-SU-2025:20561-1, SUSE-SU-2025:20674-1, UBUNTU-CVE-2025-6965, USN-7676-1, openSUSE-SU-2025:15368-1

## What is CVE-2025-6965?

CVE-2025-6965 is a high-severity vulnerability in Apple Ipados, published on 15 Jul 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

There exists a vulnerability in SQLite versions before 3.50.2 where the number of aggregate terms could exceed the number of columns available. This could lead to a memory corruption issue. We recommend upgrading to version 3.50.2 or above.

Weakness: CWE-197 (Numeric Truncation Error)

## Which versions are affected by CVE-2025-6965?

7 open source packages ship an affected version, including SQLitePCLRaw.lib.e_sqlite3, sqlite and SQLitePCLRaw.lib.e_sqlite3.android. It affects 9 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `SQLitePCLRaw.lib.e_sqlite3` | NuGet | All versions to 2.1.11 | None |
| `SQLitePCLRaw.lib.e_sqlite3` | NuGet | All versions to 2.1.11 | None |
| `sqlite` | Bitnami | All versions | None |
| `SQLitePCLRaw.lib.e_sqlite3.android` | NuGet | All versions to 2.1.11 | None |
| `SQLitePCLRaw.lib.e_sqlite3.android` | NuGet | All versions to 2.1.11 | None |
| `SQLitePCLRaw.lib.e_sqlite3.ios` | NuGet | All versions to 2.1.11 | None |
| `SQLitePCLRaw.lib.e_sqlite3.ios` | NuGet | All versions to 2.1.11 | None |
| `sqlite` | AlmaLinux:10 | All versions | 3.46.1-5.el10_0 |
| `sqlite-devel` | AlmaLinux:10 | All versions | 3.46.1-5.el10_0 |
| `sqlite-libs` | AlmaLinux:10 | All versions | 3.46.1-5.el10_0 |
| `lemon` | AlmaLinux:8 | All versions | 3.26.0-20.el8_10 |
| `mingw32-sqlite` | AlmaLinux:8 | All versions | 3.26.0.0-2.el8_10 |
| `mingw32-sqlite-static` | AlmaLinux:8 | All versions | 3.26.0.0-2.el8_10 |
| `mingw64-sqlite` | AlmaLinux:8 | All versions | 3.26.0.0-2.el8_10 |
| `mingw64-sqlite-static` | AlmaLinux:8 | All versions | 3.26.0.0-2.el8_10 |
| `nodejs` | AlmaLinux:8 | All versions | 1:22.16.0-2.module_el8.10.0+4028+97ddca84 |
| `nodejs-devel` | AlmaLinux:8 | All versions | 1:22.16.0-2.module_el8.10.0+4028+97ddca84 |
| `nodejs-docs` | AlmaLinux:8 | All versions | 1:22.16.0-2.module_el8.10.0+4028+97ddca84 |
| `nodejs-full-i18n` | AlmaLinux:8 | All versions | 1:22.16.0-2.module_el8.10.0+4028+97ddca84 |
| `nodejs-libs` | AlmaLinux:8 | All versions | 1:22.16.0-2.module_el8.10.0+4028+97ddca84 |
| `nodejs-nodemon` | AlmaLinux:8 | All versions | 3.0.1-1.module_el8.10.0+3983+391a1a04 |
| `nodejs-packaging` | AlmaLinux:8 | All versions | 2021.06-4.module_el8.10.0+4006+3c416519 |
| `nodejs-packaging-bundler` | AlmaLinux:8 | All versions | 2021.06-4.module_el8.10.0+3961+6a788e57 |
| `npm` | AlmaLinux:8 | All versions | 1:10.9.2-1.22.16.0.2.module_el8.10.0+4028+97ddca84 |
| `sqlite` | AlmaLinux:8 | All versions | 3.26.0-20.el8_10 |
| `sqlite-devel` | AlmaLinux:8 | All versions | 3.26.0-20.el8_10 |
| `sqlite-doc` | AlmaLinux:8 | All versions | 3.26.0-20.el8_10 |
| `sqlite-libs` | AlmaLinux:8 | All versions | 3.26.0-20.el8_10 |
| `v8-12.4-devel` | AlmaLinux:8 | All versions | 3:12.4.254.21-1.22.16.0.2.module_el8.10.0+4028+97ddca84 |
| `sqlite` | AlmaLinux:9 | All versions | 3.34.1-8.el9_6 |
| `sqlite` | AlmaLinux:9 | All versions | 3.34.1-9.el9_7 |
| `sqlite-devel` | AlmaLinux:9 | All versions | 3.34.1-8.el9_6 |
| `sqlite-devel` | AlmaLinux:9 | All versions | 3.34.1-9.el9_7 |
| `sqlite-libs` | AlmaLinux:9 | All versions | 3.34.1-8.el9_6 |
| `sqlite-libs` | AlmaLinux:9 | All versions | 3.34.1-9.el9_7 |
| `lemon-debuginfo` | Red Hat:enterprise_linux:10.0 | All versions | 0:3.46.1-5.el10_0 |
| `sqlite` | Red Hat:enterprise_linux:10.0 | All versions | 0:3.46.1-5.el10_0 |
| `sqlite-analyzer-debuginfo` | Red Hat:enterprise_linux:10.0 | All versions | 0:3.46.1-5.el10_0 |
| `sqlite-debuginfo` | Red Hat:enterprise_linux:10.0 | All versions | 0:3.46.1-5.el10_0 |
| `sqlite-debugsource` | Red Hat:enterprise_linux:10.0 | All versions | 0:3.46.1-5.el10_0 |

Products: Apple Ipados, Apple Iphone Os, Apple Macos, Apple Tvos, Apple Visionos, Apple Watchos, Siemens Ruggedcom Crossbow, Siemens Sidis Prime, Sqlite Sqlite.

## How do I fix CVE-2025-6965?

Upgrade to a fixed version.

## Is CVE-2025-6965 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-6965 exists.

Public exploit code:

- SQLite 3.50.1 - Heap Overflow (exploitdb)

## Other vulnerabilities in Apple Ipados

- [CVE-2025-43300](https://insights.sbomify.com/CVE-2025-43300/): Apple iOS, iPadOS, and macOS Out-of-Bounds Write (critical 10.0, exploited in the wild)
- [CVE-2025-24201](https://insights.sbomify.com/CVE-2025-24201/): Apple Multiple Products WebKit Out-of-Bounds Write (critical 10.0, exploited in the wild)
- [CVE-2025-24085](https://insights.sbomify.com/CVE-2025-24085/): Apple Multiple Products Use-After-Free (critical 10.0, exploited in the wild)
- [CVE-2025-31200](https://insights.sbomify.com/CVE-2025-31200/): Apple Multiple Products Memory Corruption (critical 9.8, exploited in the wild)
- [CVE-2025-31201](https://insights.sbomify.com/CVE-2025-31201/): Apple Multiple Products Arbitrary Read and Write (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-6965 and fix it if it is affected.

What it is: CVE-2025-6965 is a high-severity vulnerability in Apple Ipados, published on 15 Jul 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-6965 exists.

Affected packages and fixed versions:
- SQLitePCLRaw.lib.e_sqlite3 (NuGet): affected all versions up to 2.1.11; no fix listed
- SQLitePCLRaw.lib.e_sqlite3 (NuGet): affected all versions up to 2.1.11; no fix listed
- sqlite (Bitnami): affected all versions; no fix listed
- SQLitePCLRaw.lib.e_sqlite3.android (NuGet): affected all versions up to 2.1.11; no fix listed
- SQLitePCLRaw.lib.e_sqlite3.android (NuGet): affected all versions up to 2.1.11; no fix listed
- SQLitePCLRaw.lib.e_sqlite3.ios (NuGet): affected all versions up to 2.1.11; no fix listed
- SQLitePCLRaw.lib.e_sqlite3.ios (NuGet): affected all versions up to 2.1.11; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-6965/ (Markdown: https://insights.sbomify.com/CVE-2025-6965/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-6965
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-6965
- OSV: https://osv.dev/vulnerability/CVE-2025-6965

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-6965/
Summaries are generated and may contain mistakes; the official description above is the record.
