CVE-2020-5257 json
Sort order SQL injection in Administrate
published 6y ago modified 4mo ago also GHSA-2p5p-m353-833w , EUVD-2020-0324
- cvss
- 7.7
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.9%
- EPSS 0.9% chance of exploitation in 30 days, percentile 59%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- rubygems administrate 0.13.0
- thoughtbot administrate 0.13.0
Is CVE-2020-5257 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerExploit prediction
0.90% chance of exploitation in the next 30 days, higher than 59% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.7 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N |
| NVD | 3.1 | 8.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
| NVD | 2.0 | 5.5 | AV:N/AC:L/Au:S/C:P/I:P/A:N |
| GitHub | 3.1 | 7.7 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | administrate | <0.13.0 |
0.13.0 |
Affected products
- thoughtbot administrate
Classification
References
-
github.com
/thoughtbot/administrate/commit/3ab838b83c5f565fba50e0c6f66fe4517f98eed3
web, patch, third-party-advisory
-
github.com
/thoughtbot/administrate/security/advisories/GHSA-2p5p-m353-833w
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2020-5257
advisory
-
github.com
/advisories/GHSA-2p5p-m353-833w
advisory
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/administrate/CVE-2020-5257.yml
web
Sources
- CVE List CVE-2020-5257
- GitHub Advisory GHSA-2p5p-m353-833w
- NVD CVE-2020-5257
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.