{"id":"CVE-2020-5257","details":"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.","aliases":["GHSA-2p5p-m353-833w"],"modified":"2026-07-09T14:06:16.405668Z","published":"2020-03-13T21:15:12.190Z","references":[{"type":"ADVISORY","url":"https://github.com/thoughtbot/administrate/security/advisories/GHSA-2p5p-m353-833w"},{"type":"FIX","url":"https://github.com/thoughtbot/administrate/commit/3ab838b83c5f565fba50e0c6f66fe4517f98eed3"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/thoughtbot/administrate","events":[{"introduced":"0"},{"fixed":"70a2778169a8b922788bca1994beeda51a90abb7"},{"fixed":"3ab838b83c5f565fba50e0c6f66fe4517f98eed3"}],"database_specific":{"cpe":"cpe:2.3:a:thoughtbot:administrate:*:*:*:*:*:ruby:*:*","extracted_events":[{"introduced":"0"},{"fixed":"0.13.0"}],"source":["CPE_RANGE","REFERENCES"]}}],"versions":["v0.12.0","v0.11.0","v0.10.0","v0.9.0","v0.8.1","v0.8.0","v0.7.0","v0.6.0","v0.5.0","v0.4.0","v0.3.0","v0.2.1","v0.2.0","v0.1.5","v0.1.4","v0.1.3","v0.1.2","v0.1.1","v0.1.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2020-5257.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"}]}