Skip to content

SQL Injection in connect-pg-simple

High severity GitHub Reviewed Published Aug 21, 2019 in voxpelli/node-connect-pg-simple • Updated Jan 11, 2023

Package

npm connect-pg-simple (npm)

Affected versions

< 6.0.1

Patched versions

6.0.1

Description

Impact

An unlikely SQL injection if the case of an unsanitized table name input.

Patches

The user should upgrade to 6.0.1. Due to its low impact a backport has not been made to the 5.x branch.

Workarounds

If there is no likelihood that the tableName or schemaName options sent to the constructor could be of an unsanitized nature, then no workaround is needed. Else the input could be sanitized and escaped before sending it in. Take note though that such an escaping would need to be removed when upgrading to 6.0.1 or later, to avoid double escaping.

References

For more information

If you have any questions or comments about this advisory:

References

Published to the GitHub Advisory Database Aug 26, 2019
Reviewed Jun 16, 2020
Last updated Jan 11, 2023

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

EPSS score

0.081%
(35th percentile)

Weaknesses

CVE ID

CVE-2019-15658

GHSA ID

GHSA-xqh8-5j36-4556
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.