Packages / pg-native / Security

HighVulnerabilityGHSA-j32j-2hxv-rqf7CVE-2022-25852Published 18 Jun 2022

pg-native and libpq vulnerable to uncontrolled resource consumption

Affected releases · pg-native

  • 3.x3.0.0Fixed in 3.0.1
  • 2.x and older0.0.1 – 2.2.0No fix, no longer updated

On 3.x, the newest line:

npm install pg-native@3.0.1
3.x
  1. Affected

    3.0.0

    1 release

  2. Fixed

    3.0.1 – 3.9.1

    18 releases, latest

2.x
  1. Affected

    2.0.0 – 2.2.0

    3 releases

1.x
  1. Affected

    1.0.0 – 1.10.1

    22 releases

0.x
  1. Affected

    0.0.1 – 0.5.2

    10 releases

54 stable releases of pg-native, oldest to newest, one row per major.

Is your project affected?

Paste your package.json, or type the range you declare for pg-native. It is read in your browser and sent nowhere.

What happens

pg-native before 3.0.1 and libpq before 1.8.10 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.