CVE-2020-5257
HIGH 8.1CVSS 3.1Sort order SQL injection in Administrate
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.
- Published
- 13 Mar 2020
- Last modified
- 8 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-89CWE-943
- Also known as
- GHSA-2p5p-m353-833w
- Sources
- NVDJSONOSV GHSA-2p5p-m353-833wJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 8.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.7 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.7 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.5 | AV:N/AC:L/Au:S/C:P/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | thoughtbot | administratecpe:2.3:a:thoughtbot:administrate:*:*:*:*:*:ruby:*:* |
< 0.13.0 | 0.13.0 |
| OSV | RubyGems | administrate | < 0.13.0 | 0.13.0 |
References
- https://github.com/thoughtbot/administrate/commit/3ab838b83c5f565fba50e0c6f66fe4517f98eed3 · Patch, Third Party Advisory, WEB
- https://github.com/thoughtbot/administrate/security/advisories/GHSA-2p5p-m353-833w · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2020-5257 · ADVISORY
- https://github.com/advisories/GHSA-2p5p-m353-833w · ADVISORY
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/administrate/CVE-2020-5257.yml · WEB
History
- 25 Nov 2026 20:31 UTC · NVD: first stored (published 13 Mar 2020)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 13 Mar 2020)