Critical Code Execution Vulnerability in node-sqlite3 Package
Summary
DEBIAN-CVE-2022-43441: A code execution vulnerability exists in the Statement Bindings functionality of Ghost Foundation node-sqlite3 5.1.1. Affects node-sqlite3 versions < 5.0.0+ds1-1+deb11u2. Fixed in 5.0.0+ds1-1+deb11u2. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
node-sqlite3 is a popular Node.js package that provides asynchronous, non-blocking SQLite3 bindings. It allows developers to interact with SQLite databases using JavaScript, making it a key component in many web applications. However, a vulnerability has been identified in its Statement Bindings functionality, which can lead to severe security risks if exploited.
Vulnerability Detail
A code execution vulnerability exists in the Statement Bindings functionality of the Ghost Foundation node-sqlite3 version 5.1.1. This vulnerability allows an attacker to craft a specially-designed JavaScript file that can execute arbitrary code on the host system. The implications of this vulnerability are significant, as it can lead to unauthorized access, data manipulation, or even complete system compromise.
How To Fix
Minimum fixed version
5.0.0+ds1-1+deb11u2
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
As a temporary workaround, avoid using the vulnerable version of node-sqlite3 (5.1.1) and consider using an alternative database library or an earlier version of node-sqlite3 that does not contain this vulnerability until you can apply the patch.
Conclusion
The node-sqlite3 package has a critical vulnerability that can lead to arbitrary code execution. It is crucial for users to update to the patched versions to protect their applications from potential exploitation. Utilizing tools like Vulert can help monitor and manage vulnerabilities effectively.
See every vulnerability recorded for node-sqlite3 →
FAQ
The vulnerability allows for arbitrary code execution through specially-crafted JavaScript files.
Versions prior to 5.0.0+ds1-1+deb11u2 for Debian 11 and prior to 5.1.5+ds1-1 for Debian 12, 13, and 14 are affected.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Check your application against the vulnerability using the Vulert playground at Vulert Scanner.
Exploitation of this vulnerability can lead to unauthorized access, data loss, and complete system compromise.
Yes, you can avoid using the vulnerable version of node-sqlite3 and consider using alternative libraries or earlier versions until the patch is applied.
References
Related vulnerabilities
Recent vulnerabilities recorded for node-sqlite3.