loopback-connector-postgresql Vulnerable to Improper Sanitization of `contains` Filter
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2022-35942
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 18:31 UTC · Revision 1
Source evidence
loopback-connector-postgresql Vulnerable to Improper Sanitization of `contains` Filter
core-osv · Original sourcePublished 12 Aug 2022, 22:25 UTC
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.
osv:CVE-2022-35942
Complete source record
{
"id": "efccf2a5fc8a6952c86f4365fcb96b8f40e89c225162cf500c0d106aa8627b4a",
"url": "https://osv.dev/vulnerability/CVE-2022-35942",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "loopback-connector-postgresql Vulnerable to Improper Sanitization of `contains` Filter",
"summary": "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.",
"evidence": "osv:CVE-2022-35942",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2022-35942",
"aliases": [
"CVE-2022-35942",
"GHSA-j259-6c58-9m58"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/loopbackio/loopback-connector-postgresql",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "c684889a3a86f230e1642657b74ec17b572b01b4"
},
{
"fixed": "d57406c6737692a3a106b58a35406290cddb23e5"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:linuxfoundation:loopback-connector-postgresql:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "5.5.1"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "d57406c6737692a3a106b58a35406290cddb23e5"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v5.5.0",
"v5.4.0",
"v5.3.0",
"v5.2.1",
"v5.2.0",
"v5.1.0",
"v5.0.2",
"v5.0.1",
"v5.0.0",
"v3.9.1",
"v3.9.0",
"v3.8.3",
"v3.8.2",
"v3.8.1",
"v3.8.0",
"v3.7.0",
"v3.6.1",
"v3.6.0",
"v3.4.0",
"v3.5.1",
"v3.5.0",
"v3.3.2",
"v3.3.1",
"v3.3.0",
"v4.0.0",
"v3.2.0",
"v3.1.0",
"v3.0.3",
"v3.0.2",
"v3.0.1",
"v3.0.0",
"v2.7.0",
"v2.6.3",
"v2.6.2",
"v2.6.1",
"v2.6.0",
"v2.5.0",
"v2.4.1",
"v2.4.0",
"v2.3.0",
"v2.2.1",
"v2.2.0",
"v2.1.0",
"v2.0.0",
"v1.7.1",
"v1.7.0",
"v1.6.1",
"v1.6.0",
"v1.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-35942.json"
}
}
],
"modified": "2026-10-28T02:30:31.676184377Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35942.json",
"https://github.com/loopbackio/loopback-connector-postgresql/security/advisories/GHSA-j259-6c58-9m58",
"https://nvd.nist.gov/vuln/detail/CVE-2022-35942",
"https://github.com/loopbackio/loopback-connector-postgresql/commit/d57406c6737692a3a106b58a35406290cddb23e5"
],
"provider_metadata": {
"cwe_ids": [
"CWE-89"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35942.json"
}
},
"related_cves": [
{
"value": "CVE-2022-35942",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 498451,
"published_at": "2022-08-12T22:25:09+00:00"
}