# CVE-2022-35942: loopback-connector-postgresql Vulnerable to Improper Sanitization of `contains` Filter

- Severity: Critical 9.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.66%, higher than 52% of CVEs (2026-12-01)
- Published: 2022-08-11T21:13:43.000Z
- Modified: 2026-06-17T04:52:34.313Z
- Also known as: GHSA-j259-6c58-9m58
- Weaknesses: CWE-20, CWE-89
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## 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 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.

(As written by CVE List.)

## Affected

- loopbackio loopback-connector-postgresql: < 5.5.1
- loopback-connector-postgresql (npm): before 5.5.1
- linuxfoundation loopback-connector-postgresql: before 5.5.1

## Every score

- GitHub_M: CVSS:3.1 9.3 Critical `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.3 Critical `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- NVD: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`

## References

- <https://github.com/loopbackio/loopback-connector-postgresql/security/advisories/GHSA-j259-6c58-9m58> (mitigation, third-party-advisory, web)
- <https://github.com/loopbackio/loopback-connector-postgresql/commit/d57406c6737692a3a106b58a35406290cddb23e5> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-35942> (advisory)
- <https://github.com/loopbackio/loopback-connector-postgresql> (web)

## Sources

- CVE List: [CVE-2022-35942](https://www.cve.org/CVERecord?id=CVE-2022-35942), CVE Terms of Use, modified 2025-04-23
- GitHub Advisory Database: [GHSA-j259-6c58-9m58](https://github.com/advisories/GHSA-j259-6c58-9m58), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2022-35942](https://nvd.nist.gov/vuln/detail/CVE-2022-35942), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-35942 · Whole record: https://cve.day/CVE-2022-35942.json · Rebuilt by cve.day 2026-11-25T22:58:14.184Z
