{"id":"CVE-2018-18530","aliases":["EUVD-2022-3081","GHSA-7xfj-4jpg-58vf"],"status":"published","title":"ThinkPHP SQLi Vulnerability","description":"ThinkPHP 5.1.25 has SQL Injection via the count parameter because the library/think/db/Query.php aggregate function mishandles the aggregate variable. NOTE: a backquote character is required in the attack URI.","severity":{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.01202,"percentile":0.68446,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-89"],"published":"2018-10-19T20:00:00Z","modified":"2026-10-24T10:31:06Z","affected":[{"source":"ghsa","ecosystem":"Packagist","package":"topthink/framework","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"5.1.25"}]}]},{"source":"osv","ecosystem":"Packagist","package":"topthink/framework","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"5.1.25"}]}],"versions":["5.0","5.0-rc1","5.0-rc2","5.0-rc3","5.0-rc4","v5.0.1","v5.0.10","v5.0.11","v5.0.12","v5.0.13","v5.0.14","v5.0.15","v5.0.16","v5.0.17","v5.0.18","v5.0.19","v5.0.2","v5.0.20","v5.0.21","v5.0.22","v5.0.23","v5.0.24","v5.0.25","v5.0.3","v5.0.4","v5.0.5","v5.0.6","v5.0.7","v5.0.8","v5.0.9","v5.1-beta.1","v5.1-rc.1","v5.1-rc.2","v5.1-rc.3","v5.1.0","v5.1.1","v5.1.10","v5.1.11","v5.1.12","v5.1.13","v5.1.14","v5.1.15","v5.1.16","v5.1.17","v5.1.18","v5.1.19","v5.1.2","v5.1.20","v5.1.21","v5.1.22","v5.1.23","v5.1.24","v5.1.25","v5.1.3","v5.1.4","v5.1.5","v5.1.6","v5.1.7","v5.1.8","v5.1.9"]}],"products":[{"vendor":"thinkphp","product":"thinkphp"}],"references":[{"url":"https://www.kingkk.com/2018/10/Thinkphp-%E8%81%9A%E5%90%88%E6%9F%A5%E8%AF%A2%E6%BC%8F%E6%B4%9E/#ThinkPHP5-lt-5-1-25","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","evidence","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-18530","tags":["advisory"]},{"url":"https://github.com/top-think/framework/issues/2613","tags":["web"]},{"url":"https://github.com/advisories/GHSA-7xfj-4jpg-58vf"}],"sources":{"cve":[{"id":"CVE-2018-18530","description":"ThinkPHP 5.1.25 has SQL Injection via the count parameter because the library/think/db/Query.php aggregate function mishandles the aggregate variable. NOTE: a backquote character is required in the attack URI.","status":"published","published":"2018-10-19T20:00:00Z","modified":"2024-09-17T00:35:42.077Z","updated_at":"2026-11-02T14:35:11.426178Z"}],"euvd":[{"id":"EUVD-2022-3081","description":"ThinkPHP 5.1.25 has SQL Injection via the count parameter because the library/think/db/Query.php aggregate function mishandles the aggregate variable. NOTE: a backquote character is required in the attack URI.","status":"published","published":"2018-10-19T20:00:00Z","modified":"2024-09-17T00:35:42Z","updated_at":"2026-11-03T00:28:57.917597Z"}],"ghsa":[{"id":"GHSA-7xfj-4jpg-58vf","title":"ThinkPHP SQLi Vulnerability","description":"ThinkPHP 5.1.25 has SQL Injection via the count parameter because the library/think/db/Query.php aggregate function mishandles the aggregate variable. NOTE: a backquote character is required in the attack URI.","status":"published","published":"2022-05-14T01:53:42Z","modified":"2023-07-25T17:52:15Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:36:58.177785Z"}],"nvd":[{"id":"CVE-2018-18530","description":"ThinkPHP 5.1.25 has SQL Injection via the count parameter because the library/think/db/Query.php aggregate function mishandles the aggregate variable. NOTE: a backquote character is required in the attack URI.","status":"published","published":"2018-10-19T20:29:00.49Z","modified":"2026-06-17T01:47:27.703Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:04:46.409324Z"}],"osv":[{"id":"CVE-2018-18530","description":"ThinkPHP 5.1.25 has SQL Injection via the count parameter because the library/think/db/Query.php aggregate function mishandles the aggregate variable. NOTE: a backquote character is required in the attack URI.","status":"published","published":"2018-10-19T20:29:00.49Z","modified":"2026-10-24T10:31:06.17697268Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:08.834469Z"},{"id":"GHSA-7xfj-4jpg-58vf","title":"ThinkPHP SQLi Vulnerability","description":"ThinkPHP 5.1.25 has SQL Injection via the count parameter because the library/think/db/Query.php aggregate function mishandles the aggregate variable. NOTE: a backquote character is required in the attack URI.","status":"published","published":"2022-05-14T01:53:42Z","modified":"2024-02-16T08:16:56.61013Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:46:41.732368Z"}]}}
