CVE-2025-3277
CriticalCVSS 9.8Exploitation Probability (EPSS)
Elevated risk57th percentile - higher than 57% of all known CVEs
Summary
An integer overflow can be triggered in SQLite's concat_ws() function. The resulting truncated integer is used to allocate a buffer, but the original untruncated size is used when writing the resulting string, leading to a heap buffer overflow of about 4GB that can result in arbitrary code execution.
Risk Assessment
Arbitrary code execution in the context of the process using SQLite is possible, potentially leading to full application compromise. The risk is high in systems processing untrusted SQL queries.
Recommendation
Update SQLite to a version containing the fix for this bug. Restrict the ability to execute untrusted SQL queries through the concat_ws() function.
Other vulnerabilities in SQLite
See all- CVE-2017-7127High
An issue was discovered in certain Apple products related to the 'SQLite' component. Affects iOS before 11, macOS before 10.13, iCloud before 7.0 on Windows, tvOS before 11, and watchOS before 4.
- CVE-2017-15286High
SQLite version 3.20.1 has a NULL pointer dereference in the tableColumnList function in shell.c. This issue occurs because certain cases where `sqlite3_step(pStmt)==SQLITE_ROW` is false are not considered, leading to an uninitialized data structure.
- CVE-2017-6991High
An issue was discovered in certain Apple products, including iOS before 10.3.2 and macOS before 10.12.5, involving the 'SQLite' component. It allows remote attackers to execute arbitrary code or cause a denial of service via a crafted web site.
- CVE-2017-6983High
An issue was discovered in certain Apple products, including iOS before 10.3.2 and macOS before 10.12.5, related to the 'SQLite' component. It allows remote attackers to execute arbitrary code or cause a denial of service via a crafted website.
- CVE-2015-5895High
Multiple unspecified vulnerabilities in SQLite before version 3.8.10.2, as used in Apple iOS before version 9, may lead to unknown impact and attack vectors.
- CVE-2015-3717High
Multiple buffer overflows in the printf functionality in SQLite, as used in Apple iOS before 8.4 and OS X before 10.10.4, allow remote attackers to execute arbitrary code or cause a denial of service (application crash).
- CVE-2015-3416High
The sqlite3VXPrintf function in SQLite before version 3.8.9 does not properly handle precision and width values during floating-point conversions, which can lead to integer overflow and stack-based buffer overflow. Attackers can exploit this in context to cause denial of service or potentially other unspecified impacts.
- CVE-2015-3415High
The sqlite3VdbeExec function in SQLite before version 3.8.9 does not properly implement comparison operators, allowing attackers to cause a denial of service or potentially other unspecified impacts via a crafted CHECK clause.
- CVE-2015-3414High
SQLite before 3.8.9 does not properly implement the dequoting of collation-sequence names, allowing context-dependent attackers to cause a denial of service (uninitialized memory access and application crash) or possibly have unspecified other impact via a crafted COLLATE clause.
- CVE-2025-71316Critical
SQLite 'sqldiff.exe' does not securely handle Unicode to ANSI codepage conversion on Windows, allowing an attacker to load an arbitrary DLL via the '-L' option and misinterpret command line arguments.
Original NVD description (English source)
An integer overflow can be triggered in SQLite’s `concat_ws()` function. The resulting, truncated integer is then used to allocate a buffer. When SQLite then writes the resulting string to the buffer, it uses the original, untruncated size and thus a wild Heap Buffer overflow of size ~4GB can be triggered. This can result in arbitrary code execution.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

