{"id":"CVE-2016-20018","aliases":["CLSA-2026-1774830252","EUVD-2022-7505","GHSA-4jv9-3563-23j3","ROOT-APP-NPM-CVE-2016-20018"],"status":"published","title":"Knex.js has a limited SQL injection vulnerability","description":"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.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-07","score":0.01117,"percentile":0.66286,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-89"],"published":"2022-12-19T00:00:00Z","modified":"2026-10-20T10:47:25Z","fixes":[{"ecosystem":"npm","package":"knex","fixed_in":["2.4.0"],"sources":["ghsa","osv"]},{"ecosystem":"TuxCare:npm","package":"knex","fixed_in":["0.95.15-tuxcare.1"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"knex","fixed_in":["0.20.15-aikido.2","0.95.15-aikido.1","0.95.15+aikido.2"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/knex","fixed_in":["0.20.15-root.io.1","0.20.15-root.io.2","0.95.15-root.io.1","0.95.15+aikido.2"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"knex","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.0"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"knex","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.95.15-tuxcare.0"},{"fixed":"0.95.15-tuxcare.1"}]}],"versions":["0.95.15"]},{"source":"osv","ecosystem":"npm","package":"knex","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.4.0"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"knex","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.20.15-aikido.2"},{"fixed":"0.95.15-aikido.1"},{"fixed":"0.95.15+aikido.2"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/knex","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.20.15-root.io.1"},{"fixed":"0.20.15-root.io.2"},{"fixed":"0.95.15-root.io.1"},{"fixed":"0.95.15+aikido.2"}]}]}],"products":[{"vendor":"knexjs","product":"knex"}],"references":[{"url":"https://www.ghostccamm.com/blog/knex_sqli/","tags":["x_transferred","Exploit","Third Party Advisory","evidence"]},{"url":"https://github.com/knex/knex/issues/1227","tags":["x_transferred","Exploit","Issue Tracking","Third Party Advisory","report","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2016-20018","tags":["x_transferred","advisory"]},{"url":"https://github.com/knex/knex/releases/tag/2.4.0","tags":["web"]},{"url":"https://github.com/knex/knex/pull/5417","tags":["web"]},{"url":"https://github.com/knex/knex/commit/e145322da92749be7749f9ade5b5f5a66d6586a4","tags":["web"]},{"url":"https://github.com/advisories/GHSA-4jv9-3563-23j3"},{"url":"https://github.com/knex/knex","tags":["package"]},{"url":"https://www.ghostccamm.com/blog/knex_sqli","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2016-20018","description":"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.","status":"published","published":"2022-12-19T00:00:00Z","modified":"2024-08-06T03:47:34.947Z","updated_at":"2026-11-02T14:33:30.359814Z"}],"euvd":[{"id":"EUVD-2022-7505","description":"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.","status":"published","published":"2022-12-19T00:00:00Z","modified":"2024-08-06T03:47:34Z","updated_at":"2026-11-03T02:22:21.756675Z"}],"ghsa":[{"id":"GHSA-4jv9-3563-23j3","title":"Knex.js has a limited SQL injection vulnerability","description":"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. This vulnerability has been fixed in version 2.4.0.","status":"published","published":"2022-12-19T09:30:23Z","modified":"2023-10-02T20:28:03Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:37:07.641671Z"}],"nvd":[{"id":"CVE-2016-20018","description":"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.","status":"published","published":"2022-12-19T09:15:09.29Z","modified":"2026-06-17T00:43:06.037Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"primary"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:03:40.811555Z"}],"osv":[{"id":"CVE-2016-20018","description":"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.","status":"published","published":"2022-12-19T09:15:09.29Z","modified":"2026-10-20T10:47:25.966403113Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-02T15:44:02.114472Z"},{"id":"GHSA-4jv9-3563-23j3","title":"Knex.js has a limited SQL injection vulnerability","description":"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. This vulnerability has been fixed in version 2.4.0.","status":"published","published":"2022-12-19T09:30:23Z","modified":"2023-11-08T03:58:23.366089Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:46:37.148947Z"},{"id":"CLSA-2026-1774830252","title":"TuxCare security update for knex (1 CVE)","description":"TuxCare rebuilt knex to address 1 CVE. Fixed in 0.95.15-tuxcare.1.","status":"published","published":"2026-08-04T14:52:16Z","modified":"2026-10-15T09:47:48.79934109Z","updated_at":"2026-11-02T15:43:43.621843Z"},{"id":"ROOT-APP-NPM-CVE-2016-20018","title":"CVE-2016-20018 in knex - Patched by Root","description":"Root has patched CVE-2016-20018 in the knex package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-08-05T10:41:42Z","modified":"2026-08-05T12:30:19.441163265Z","updated_at":"2026-11-02T15:53:27.362922Z"}]}}
