CVE-2016-20018 json
Knex.js has a limited SQL injection vulnerability
published 2022-12-19 3 y ago modified 2026-06-17 4 mo ago also GHSA-4jv9-3563-23j3 , EUVD-2022-7505
- cvss
- 7.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.1%
- EPSS 1.1% chance of exploitation in 30 days, percentile 66%
- public exploits
- 0
- none known
Summary
Knex Knex.js through 2.3.0 has a limited SQL injection vulnerability that can be exploited to ignore the WHERE clause of a SQL query.
Patch / fix
- npm knex 2.4.0
- github.com/knex/knex@e145322 commit
- github.com/knex/knex#5417 pull request
- github.com/knex/knex/releases/tag/2.4.0 release
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2016-20018 updated cvss 7.5
Knex: SQL injection
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.12% chance of exploitation in the next 30 days, higher than 66% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- ghostccamm.com https://www.ghostccamm.com/blog/knex_sqli/ referenced PoC, tagged "exploit" by a source, unverified
- github.com https://github.com/knex/knex/issues/1227 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | knex | <2.4.0 |
2.4.0 |
Classification
- Weakness
-
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
References
-
github.com
/knex/knex/pull/5417
web
-
github.com
/knex/knex/commit/e145322da92749be7749f9ade5b5f5a66d6586a4
web
-
ghostccamm.com
/blog/knex_sqli/
exploit, third-party-advisory
-
github.com
/knex/knex/issues/1227
web, exploit, issue-tracking, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2016-20018
advisory
-
github.com
/knex/knex
package
-
github.com
/knex/knex/releases/tag/2.4.0
web
-
ghostccamm.com
/blog/knex_sqli
web
Sources
- CVE List CVE-2016-20018
- GitHub Advisory GHSA-4jv9-3563-23j3
- NVD CVE-2016-20018
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.