{"id":"CVE-2020-5257","published":"2020-03-13T21:05:15Z","modified":"2024-08-04T08:22:09Z","title":"Sort order SQL injection in Administrate","vendor":"thoughtbot","product":"administrate","tier":"tail","description":{"text":"In Administrate (rubygem) before version 0.13.0, when sorting by attributes on a dashboard, the direction parameter was not validated before being interpolated into the SQL query. This could present a SQL injection if the attacker were able to modify the `direction` parameter and bypass ActiveRecord SQL protections. Whilst this does have a high-impact, to exploit this you need access to the Administrate dashboards, which we would expect to be behind authentication. This is patched in wersion 0.13.0.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.7,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.009,"percentile":0.60522,"provenance":"source"},"cwes":[{"id":"CWE-943","name":"Improper Neutralization of Special Elements in Data Query Logic"}],"references":[{"url":"https://github.com/thoughtbot/administrate/security/advisories/GHSA-2p5p-m353-833w","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/thoughtbot/administrate/commit/3ab838b83c5f565fba50e0c6f66fe4517f98eed3","tags":["x_refsource_MISC"]}],"priority":{"score":17.5,"factors":[{"name":"EPSS percentile","points":12.1},{"name":"CVSS severity","points":5.39}]},"vendorSlug":"thoughtbot","affectedVersions":[{"vendor":"thoughtbot","product":"administrate","versions":["< 0.13.0"]}],"affected":[{"ecosystem":"RubyGems","package":"administrate","vulnerableRanges":["<0.13.0"],"patched":["0.13.0"],"from":["GHSA-2p5p-m353-833w"],"provenance":"source"}],"summary":{"text":"The Administrate Ruby gem (thoughtbot's administrate, before 0.13.0) fails to validate the direction parameter used when sorting dashboard attributes, so it is interpolated unsanitised into a SQL query. An attacker who can access the Administrate dashboards, which are expected to sit behind authentication, and who can modify the direction parameter (typically requiring a user to interact with a crafted request) can inject SQL and bypass ActiveRecord's protections.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:40:15Z"},"euvd":{"id":"EUVD-2020-0324","exploited":false,"provenance":"source"}}