CVE-2022-21227: Denial of Service (DoS)

Published Apr 28, 2022
·
Updated

Affected versions of sqlite3 will experience a fatal error when supplying a specific object in the parameter array. This error causes the application to crash and could not be caught. Users of sqlite3 v5.0.0, v5.0.1 and v5.0.2 are affected by this. This issue is fixed in v5.0.3. All users are recommended to upgrade to v5.0.3 or later. Ensure there is sufficient sanitization in the parent application to protect against invalid values being supplied to binding parameters as a workaround.

Other sources

The package sqlite3 before 5.0.3 are vulnerable to Denial of Service (DoS) which will invoke the toString function of the passed parameter. If passed an invalid Function object it will throw and crash the V8 engine.

Affected Software

6 affected componentsFixes available
Ghost Sqlite3 Node.js<5.0.3
debian/node-sqlite3<5.0.6+ds1-1
5.0.6+ds1-1
debian/node-sqlite3<5.0.6+ds1-1
5.0.6+ds1-1
debian/node-sqlite3<5.0.6+ds1-1
5.0.6+ds1-1
debian/node-sqlite3
5.1.5+ds1-16.0.1+ds1-1
npm/sqlite3>=5.0.0<5.0.3
5.0.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/node-sqlite3 to a version that resolves this vulnerability.

    Fixed in 5.1.5+ds1-1Fixed in 6.0.1+ds1-1
  2. Upgrade

    Upgrade npm/sqlite3 to a version that resolves this vulnerability.

    Fixed in 5.0.3
  3. Upgrade

    Upgrade debian/node-sqlite3 to a version that resolves this vulnerability.

    Fixed in 5.0.6+ds1-1
  4. Upgrade

    Upgrade sqlite3 to a version that resolves this vulnerability.

    Fixed in 5.0.3
  5. Compensating control

    Sanitize values in the parent application before supplying them as binding parameters to prevent invalid values, including invalid Function objects, from reaching sqlite3.

Event History

Apr 28, 2022
Advisory Published
via GitHub·08:25 PM
Data Sourced
via GitHub·08:25 PM
DescriptionSeverityWeaknessAffected Software
May 1, 2022
CVE Published
via MITRE·03:25 PM
Data Sourced
via MITRE·03:25 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via OSV·04:15 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the vulnerability ID?

The vulnerability ID is CVE-2022-21227.

2

What is the severity of CVE-2022-21227?

The severity of CVE-2022-21227 is high, with a severity value of 7.5.

3

What is the affected software?

The affected software is Ghost Sqlite3 with versions before 5.0.3 on Node.js.

4

How does CVE-2022-21227 affect the system?

CVE-2022-21227 can cause a Denial of Service (DoS) by invoking the toString function of an invalid Function object, potentially crashing the V8 engine.

5

How can CVE-2022-21227 be mitigated?

To mitigate CVE-2022-21227, it is recommended to update the sqlite3 package to version 5.0.3 or newer.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203