{"id":"CVE-2017-16082","published":"2018-06-07T02:00:00Z","modified":"2024-09-17T03:49:23Z","title":"A remote code execution vulnerability was found within the pg module when the remote database or query specifies a…","vendor":"HackerOne","product":"pg node module","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.10259,"percentile":0.958,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://node-postgres.com/announcements#2017-08-12-code-execution-vulnerability","tags":["x_refsource_MISC"]},{"url":"https://nodesecurity.io/advisories/521","tags":["x_refsource_MISC"]}],"priority":{"score":24.2,"factors":[{"name":"EPSS percentile","points":19.16},{"name":"Public exploit code","points":5.0}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2018-11-27","earliestUrl":"https://github.com/nulldreams/CVE-2017-16082","repos":[{"name":"nulldreams/CVE-2017-16082","url":"https://github.com/nulldreams/CVE-2017-16082","stars":5,"created":"2018-11-27"}]},"first":{"date":"2018-11-27","source":"PoC-in-GitHub","url":"https://github.com/nulldreams/CVE-2017-16082"},"provenance":"source"},"vendorSlug":"hackerone","affectedVersions":[{"vendor":"HackerOne","product":"pg node module","versions":["< 2.11.2 || >= 3.0.0 < 3.6.4 || >= 4.0.0 < 4.5.7 || >= 5.0.0 < 5.2.1 || >= 6.0.0 < 6.0.5 || >= 6.1.0 < 6.1.6 || >= 6.2.0 < 6.2.5 || >= 6.3.0 < 6.3.3 || >= 6.4.0 < 6.4.2 || >= 7.0.0 < 7.0.2 || >= 7.1.0 < 7.1.2"]}],"affected":[{"ecosystem":"npm","package":"pg","vulnerableRanges":["<2.11.2",">=3.0.0, <3.6.4",">=4.0.0, <4.5.7",">=5.0.0, <5.2.1",">=6.0.0, <6.0.5",">=6.1.0, <6.1.6",">=6.2.0, <6.2.5",">=6.3.0, <6.3.3",">=6.4.0, <6.4.2",">=7.0.0, <7.0.2"],"patched":["2.11.2","3.6.4","4.5.7","5.2.1","6.0.5","6.1.6","6.2.5","6.3.3","6.4.2","7.0.2"],"from":["GHSA-wc9v-mj63-m9g5"],"provenance":"source"}],"summary":{"text":"A remote code execution flaw exists in the pg Node module, where a specially crafted column name in a remote database or query can trigger code execution. An attacker can exploit it either by getting unsafe, user-supplied SQL containing a malicious column name executed, or by convincing the application to connect to an untrusted database whose query results include such column names.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T15:03:07Z"},"euvd":{"id":"EUVD-2018-0331","exploited":false,"provenance":"source"}}