SQL Injection Affecting loopback-connector-postgresql package, versions <5.5.1


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.18% (57th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about SQL Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-LOOPBACKCONNECTORPOSTGRESQL-2980123
  • published12 Aug 2022
  • disclosed11 Aug 2022
  • creditMatthew Gabeler-Lee

Introduced: 11 Aug 2022

CVE-2022-35942  (opens in a new tab)
CWE-89  (opens in a new tab)

How to fix?

Upgrade loopback-connector-postgresql to version 5.5.1 or higher.

Overview

loopback-connector-postgresql is a loopback PostgreSQL connector.

Affected versions of this package are vulnerable to SQL Injection via the contains loopback filter handled in lib/postgresql.js. This vulnerability is exploitable if the package is used in any of the following ways:

  • Connecting to the database via the DataSource with allowExtendedProperties: true enabled
  • Using the connector's CRUD methods directly
  • Using the connector's other methods to interpret the LoopBack filter

Workaround:

This vulnerability can be avoided by setting allowExtendedProperties: false or removing allowExtendedProperties: true, for the DataSource.

References

CVSS Scores

version 3.1