Description
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.
Remediation
References
https://nodesecurity.io/advisories/521
https://node-postgres.com/announcements#2017-08-12-code-execution-vulnerability
Related Vulnerabilities
CVE-2020-7768 Vulnerability in npm package @grpc/grpc-js
CVE-2021-46708 Vulnerability in maven package org.webjars.bower:swagger-ui
CVE-2020-19698 Vulnerability in npm package editor.md
CVE-2023-3691 Vulnerability in npm package layui
CVE-2020-7760 Vulnerability in maven package org.webjars.npm:codemirror