pg-native: Incorrect Type Conversion or Cast
CVE-2022-25852 is a high-severity incorrect type conversion or cast vulnerability in pg-native, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected pg-native versions: 0. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 1.4% chance of exploitation within 30 days, higher than 73% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Check which version of pg-native you run against the affected versions below, and install the vendor's latest release.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- NoneNo data is disclosed.
- Integrity
- NoneNothing can be modified.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.5 | High | CNA (snyk.io) |
| CVSS 3.1 | 7.5 | High | NVD |
| CVSS 2.0 | 5.0 | Medium | NVD |
Official description
All versions of package pg-native; all versions of package libpq are vulnerable to Denial of Service (DoS) when the addons attempt to cast the second argument to an array and fail. This happens for every non-array argument passed. **Note:** pg-native is a mere binding to npm's libpq library, which in turn has the addons and bindings to the actual C libpq library. This means that problems found in pg-native may transitively impact npm's libpq.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Incorrect Type Conversion or Cast
The product does not correctly convert an object, resource, or structure from one type to a different type.
More Incorrect Type Conversion or Cast vulnerabilities (CWE-704)
Timeline
- CVE record published.
- Record last changed materially (score, affected products, status or references).
References
Technical write-ups (may include proof of concept)
- snyk.io/vuln/SNYK-JS-LIBPQ-2392366Exploit, Third Party Advisory
- snyk.io/vuln/SNYK-JS-PGNATIVE-2392365Exploit, Third Party Advisory
Recent Incorrect Type Conversion or Cast vulnerabilities
- 7.8 High severity
- 7.5 High severity
Spotted an error? Tell us.