{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-35942","id":"CVE-2022-35942","title":"loopback-connector-postgresql Vulnerable to Improper Sanitization of `contains` Filter","description":"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","descriptionLong":"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.","published":"2022-08-12T22:25:09.000Z","updated":"2026-10-28T02:30:31.676184377Z","reserved":"2022-07-15T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":9.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"GitHub_M"},"metrics":[{"version":"3.1","score":9.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"GitHub_M"},{"version":"3.1","score":9.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"github.com"},{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":9.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"OSV"},{"version":"3.1","score":9.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"GitHub"}],"rating":"critical","products":["loopbackio loopback-connector-postgresql"],"affectedProducts":[{"vendor":"loopbackio","product":"loopback-connector-postgresql","defaultStatus":null,"versions":[{"status":"affected","version":"< 5.5.1"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"loopback-connector-postgresql","purl":"pkg:npm/loopback-connector-postgresql","ranges":["<5.5.1"],"fixed":["5.5.1"],"advisory":"GHSA-j259-6c58-9m58"}],"cwes":["CWE-89","CWE-20"],"aliases":["GHSA-j259-6c58-9m58"],"references":[{"url":"https://github.com/loopbackio/loopback-connector-postgresql/security/advisories/GHSA-j259-6c58-9m58","tags":["x_refsource_CONFIRM","x_transferred","Mitigation","Third Party Advisory","advisory","web"]},{"url":"https://github.com/loopbackio/loopback-connector-postgresql/commit/d57406c6737692a3a106b58a35406290cddb23e5","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35942.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-35942","tags":["advisory"]},{"url":"https://github.com/loopbackio/loopback-connector-postgresql","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.00656,"epssPercentile":0.52225,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-35942","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-35942","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-35942","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-j259-6c58-9m58","ok":true,"note":"GHSA-j259-6c58-9m58"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-35942","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":["postgresql"],"critical":["CVSS 9.3 in a widely used technology"],"attention":null}