CVE-2017-16082
Remote Code Execution in pg
Reported by hackerone · Published June 7, 2018
pg is fixed in 7.1.2, 7.0.2, 6.4.2 and 8 more (npm)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| pg | npm | 7.1.2, 7.0.2, 6.4.2, 6.3.3, 6.2.5, 6.1.6, 6.0.5, 5.2.1, 4.5.7, 3.6.4, 2.11.2 |
| pg | node-postgres | 7.1.2, 6.4.2, 5.2.1, 4.5.7, 3.6.4, 2.11.2 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| HackerOne | pg node module | < 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 |
| HackerOne | pg node module | < 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 |
| npm | pg | 2.0.0, 3.0.0, 4.0.0 |
Timeline
- Jun 7, 2018 CVE Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Mar 9, 2026 Security Advisory
- Jun 17, 2026 CVE Updated
- Oct 2, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2017-16082
vulnetix vdb fixes CVE-2017-16082
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2017-16082/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_MISC
- x_refsource_MISC
- https://nvd.nist.gov/vuln/detail/CVE-2017-16082 advisory