A remote code execution vulnerability was found within the pg module when the remote database or query specifies a specially crafted column name. There are 2 likely scenarios in which one would likely be vulnerable. 1) Executing unsafe, user-supplied sql which contains a malicious column name. 2) Connecting to an untrusted database and executing a query which returns results where any of the column names are malicious.
Versions of the package semver before 7.5.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the function new Range, when untrusted user data is provided as a range.
Path to dependency file: /package.json
Path to vulnerable library: /node_modules/pg/package.json
Found in HEAD commit: 6c7cc801274c55a47ba8227e24b2d4724302bea1
Vulnerabilities
**In some cases, Remediation PR cannot be created automatically for a vulnerability despite the availability of remediation
Details
CVE-2017-16082
### Vulnerable Library - pg-5.1.0.tgzPostgreSQL client - pure javascript & libpq with the same API
Library home page: https://registry.npmjs.org/pg/-/pg-5.1.0.tgz
Path to dependency file: /package.json
Path to vulnerable library: /node_modules/pg/package.json
Dependency Hierarchy: - pg-promise-4.8.1.tgz (Root Library) - :x: **pg-5.1.0.tgz** (Vulnerable Library)
Found in HEAD commit: 6c7cc801274c55a47ba8227e24b2d4724302bea1
Found in base branch: master
### Vulnerability DetailsA remote code execution vulnerability was found within the pg module when the remote database or query specifies a specially crafted column name. There are 2 likely scenarios in which one would likely be vulnerable. 1) Executing unsafe, user-supplied sql which contains a malicious column name. 2) Connecting to an untrusted database and executing a query which returns results where any of the column names are malicious.
Publish Date: 2018-06-07
URL: CVE-2017-16082
### CVSS 3 Score Details (9.8)Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: Low - Privileges Required: None - User Interaction: None - Scope: Unchanged - Impact Metrics: - Confidentiality Impact: High - Integrity Impact: High - Availability Impact: High
For more information on CVSS3 Scores, click here. ### Suggested FixType: Upgrade version
Origin: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-16082
Release Date: 2018-04-26
Fix Resolution (pg): 6.0.5
Direct dependency fix Resolution (pg-promise): 6.0.0
:rescue_worker_helmet: Automatic Remediation will be attempted for this issue.
CVE-2022-25883
### Vulnerable Library - semver-4.3.2.tgzThe semantic version parser used by npm.
Library home page: https://registry.npmjs.org/semver/-/semver-4.3.2.tgz
Path to dependency file: /package.json
Path to vulnerable library: /node_modules/pg/node_modules/semver/package.json
Dependency Hierarchy: - pg-promise-4.8.1.tgz (Root Library) - pg-5.1.0.tgz - :x: **semver-4.3.2.tgz** (Vulnerable Library)
Found in HEAD commit: 6c7cc801274c55a47ba8227e24b2d4724302bea1
Found in base branch: master
### Vulnerability DetailsVersions of the package semver before 7.5.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the function new Range, when untrusted user data is provided as a range.
Publish Date: 2023-06-21
URL: CVE-2022-25883
### CVSS 3 Score Details (5.3)Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: Low - Privileges Required: None - User Interaction: None - Scope: Unchanged - Impact Metrics: - Confidentiality Impact: None - Integrity Impact: None - Availability Impact: Low
For more information on CVSS3 Scores, click here. ### Suggested FixType: Upgrade version
Origin: https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
Release Date: 2024-08-08
Fix Resolution (semver): 5.7.2
Direct dependency fix Resolution (pg-promise): 10.7.0
:rescue_worker_helmet: Automatic Remediation will be attempted for this issue.:rescue_worker_helmet:Automatic Remediation will be attempted for this issue.