Denial of Service Vulnerability in node-sqlite3 Package

node-sqlite3 Updated 02 Oct 2025

Summary

01/05/2022
N/A
Yes i
High
7.5

CVE-2022-21227: The package sqlite3 before 5.0.3 are vulnerable to Denial of Service (DoS) which will invoke the toString function of the passed parameter. Affects node-sqlite3 across 2 version ranges.

< 5.0.0+ds1-1+deb11u1 < 593c9d498be2510d286349134537e3bf89401c4a

Fixed in 5.0.0+ds1-1+deb11u1. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The node-sqlite3 package is a popular Node.js library that provides a simple interface for interacting with SQLite databases. It is widely used for its efficiency and ease of integration in various applications. However, prior to version 5.0.3, the package is susceptible to a Denial of Service (DoS) vulnerability that can disrupt the normal operation of applications relying on it.

Vulnerability Detail

The vulnerability arises from the improper handling of the toString function when an invalid Function object is passed as a parameter. This can lead to a crash of the V8 engine, which is the JavaScript engine used by Node.js, resulting in a Denial of Service condition. Attackers can exploit this vulnerability by sending crafted inputs that trigger the crash, thereby affecting the availability of the application.

How To Fix

Minimum fixed version

5.0.0+ds1-1+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-sqlite3

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

Workaround

If immediate upgrading is not feasible, consider implementing input validation to ensure that only valid Function objects are passed to the toString function. This can help mitigate the risk of triggering the vulnerability until a proper update can be applied.

Conclusion

The node-sqlite3 package has a critical Denial of Service vulnerability that can affect applications using it. It is essential to update to a secure version to mitigate risks. Additionally, utilizing tools like Vulert can help in monitoring and managing vulnerabilities effectively.

See every vulnerability recorded for node-sqlite3 →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

All versions of node-sqlite3 prior to 5.0.3 are affected by this vulnerability.

Exploitation of this vulnerability can lead to a Denial of Service, causing applications to crash and become unavailable.

Yes, Vulert can monitor and alert you in real-time for open-source vulnerabilities in your software using just a manifest file like package-lock.json.

Related vulnerabilities

Recent vulnerabilities recorded for node-sqlite3.

How To Fix

Minimum fixed version

5.0.0+ds1-1+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-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