{"id":"CVE-2022-35942","published":"2022-08-12T22:25:09Z","modified":"2025-04-23T17:50:50Z","title":"loopback-connector-postgresql Vulnerable to Improper Sanitization of `contains` Filter","vendor":"loopbackio","product":"loopback-connector-postgresql","tier":"tail","description":{"text":"Improper input validation on the `contains` LoopBack filter may allow for arbitrary SQL injection. When the extended filter property `contains` is permitted to be interpreted by the Postgres connector, it is possible to inject arbitrary SQL which may affect the confidentiality and integrity of data stored on the connected database. A patch was released in version 5.5.1. This affects users who does any of the following: - Connect to the database via the DataSource with `allowExtendedProperties: true` setting OR - Uses the connector's CRUD methods directly OR - Uses the connector's other methods to interpret the LoopBack filter. Users who are unable to upgrade should do the following if applicable: - Remove `allowExtendedProperties: true` DataSource setting - Add `allowExtendedProperties: false` DataSource setting - When passing directly to the connector functions, manually sanitize the user input for the `contains` LoopBack filter beforehand.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.3,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00656,"percentile":0.52366,"provenance":"source"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"references":[{"url":"https://github.com/loopbackio/loopback-connector-postgresql/security/advisories/GHSA-j259-6c58-9m58","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/loopbackio/loopback-connector-postgresql/commit/d57406c6737692a3a106b58a35406290cddb23e5","tags":["x_refsource_MISC"]}],"priority":{"score":17.0,"factors":[{"name":"EPSS percentile","points":10.47},{"name":"CVSS severity","points":6.51}]},"vendorSlug":"loopbackio","affectedVersions":[{"vendor":"loopbackio","product":"loopback-connector-postgresql","versions":["< 5.5.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-04-23T15:50:56.578133Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"loopback-connector-postgresql","vulnerableRanges":["<5.5.1"],"patched":["5.5.1"],"from":["GHSA-j259-6c58-9m58"],"provenance":"source"}],"summary":{"text":"The loopback-connector-postgresql component of the loopbackio loopback-connector-postgresql product mishandles the LoopBack contains filter, allowing user-supplied input to be interpreted as SQL when extended properties are permitted. An attacker with local access and no privileges or user interaction can inject arbitrary SQL into the connected Postgres database, affecting the confidentiality and integrity of its data, provided the DataSource has allowExtendedProperties: true or the connector's methods are used directly with unsanitised filter input.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:45:31Z"},"euvd":{"id":"EUVD-2022-6573","exploited":false,"provenance":"source"}}