Integer Overflow Vulnerability in SQLite3 - Potential for Arbitrary Code Execution

sqlite3 Updated 02 Oct 2025

Summary

14/04/2025
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2025-3277: An integer overflow can be triggered in SQLite’s concat_ws() function. Affects sqlite3 versions < 3.46.1-3. Fixed in 3.46.1-3. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

SQLite3 is a widely used database engine known for its lightweight and self-contained nature. It is often embedded in applications and provides a full-featured SQL database engine. The specific vulnerability arises from the concat_ws() function, which is responsible for concatenating strings with a specified separator. This function is integral to many applications that rely on SQLite3 for data management. The vulnerability can lead to severe security risks, including arbitrary code execution, if not addressed promptly.

Vulnerability Detail

An integer overflow can be triggered in SQLite’s concat_ws() function. This occurs when the function processes a large number of inputs, resulting in a truncated integer that is used to allocate a buffer. When SQLite writes the resulting string to this buffer, it uses the original, untruncated size, leading to a wild Heap Buffer overflow of approximately 4GB. This overflow can allow attackers to execute arbitrary code, posing a significant security threat to applications utilizing SQLite3.

How To Fix

Minimum fixed version

3.46.1-3

This is the first release that contains the fix.

sudo apt-get install --only-upgrade sqlite3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can limit the number of inputs passed to the concat_ws() function to avoid triggering the integer overflow. However, this is not a permanent solution and updating to the patched version is strongly recommended.

Conclusion

The integer overflow vulnerability in SQLite3's concat_ws() function poses a significant risk of arbitrary code execution. Users are strongly advised to update to the patched version (3.46.1-3) to protect their applications. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for sqlite3 →

Share this vulnerability

FAQ

The vulnerability is an integer overflow in the concat_ws() function, which can lead to a Heap Buffer overflow and potential arbitrary code execution.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The primary risk is arbitrary code execution, which can allow attackers to take control of the affected system, leading to data breaches or system compromise.

Yes, a patched version of SQLite3 (3.46.1-3) is available. Users should update to this version to mitigate the vulnerability.

If an immediate update is not possible, limit the inputs to the concat_ws() function to prevent triggering the overflow as a temporary measure.

Related vulnerabilities

Recent vulnerabilities recorded for sqlite3.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

3.46.1-3

This is the first release that contains the fix.

sudo apt-get install --only-upgrade sqlite3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback