{
  "schema_version": "1.4.0",
  "id": "GHSA-j32j-2hxv-rqf7",
  "modified": "2023-10-19T18:45:44Z",
  "published": "2022-06-18T00:00:20Z",
  "aliases": [
    "CVE-2022-25852"
  ],
  "summary": "pg-native and libpq vulnerable to uncontrolled resource consumption",
  "details": "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.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "libpq"
      },
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.8.10"
            }
          ]
        }
      ],
      "database_specific": {
        "last_known_affected_version_range": "<= 1.8.9"
      }
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "pg-native"
      },
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.0.1"
            }
          ]
        }
      ],
      "database_specific": {
        "last_known_affected_version_range": "<= 3.0.0"
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-25852"
    },
    {
      "type": "WEB",
      "url": "https://github.com/brianc/node-libpq/issues/84"
    },
    {
      "type": "WEB",
      "url": "https://github.com/brianc/node-libpq/pull/86"
    },
    {
      "type": "WEB",
      "url": "https://snyk.io/vuln/SNYK-JS-LIBPQ-2392366"
    },
    {
      "type": "WEB",
      "url": "https://snyk.io/vuln/SNYK-JS-PGNATIVE-2392365"
    }
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400",
      "CWE-704"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2022-06-20T22:28:59Z",
    "nvd_published_at": "2022-06-17T20:15:00Z"
  }
}