CVE-2025-3277
CriticalCVSS 9.8Exploitation Probability (EPSS)
Elevated risk70th percentile - higher than 70% 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-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.
- CVE-2025-7458Critical
An integer overflow in the sqlite3KeyInfoFromExprList function in SQLite versions 3.39.2 through 3.41.1 allows an attacker able to execute arbitrary SQL statements to cause a denial of service or disclose sensitive information from process memory via a crafted SELECT statement with a large number of expressions in the ORDER BY clause.
- CVE-2020-35527Critical
In SQLite 3.31.1, there is an out-of-bounds access problem through ALTER TABLE for views that have a nested FROM clause.
- CVE-2021-36690High
A segmentation fault can occur in the sqlite3.exe command-line component of SQLite 3.36.0 via the idxGetTableInfo function when there is a crafted SQL query. The vendor disputes the relevance because a sqlite3.exe user already has full privileges, and this does not imply any problem in the SQLite library.
- CVE-2020-13871High
SQLite 3.32.2 has a use-after-free in resetAccumulator in select.c because the parse tree rewrite for window functions is too late.
- CVE-2020-11656Critical
In SQLite through 3.31.1, the ALTER TABLE implementation has a use-after-free, as demonstrated by an ORDER BY clause that belongs to a compound SELECT statement.
- CVE-2020-11655High
SQLite through 3.31.1 allows attackers to cause a denial of service (segmentation fault) via a malformed window-function query because the AggInfo object's initialization is mishandled.
- CVE-2020-9327High
In SQLite 3.31.1, isAuxiliaryVtabOperator allows attackers to trigger a NULL pointer dereference and segmentation fault because of generated column optimizations.
- CVE-2019-20218High
selectExpander in select.c in SQLite 3.30.1 proceeds with WITH stack unwinding even after a parsing error.
- CVE-2019-19925High
In SQLite 3.30.1, zipfileUpdate in ext/misc/zipfile.c mishandles a NULL pathname during an update of a ZIP archive, potentially leading to unexpected behavior.
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

