{"id":"CVE-2026-42031","aliases":["GHSA-h7j7-3rx6-xvcg","PYSEC-2026-2417"],"url":"https://o3.security/vulnerability/CVE-2026-42031","summary":"CKAN: Unauthenticated SQL Injection and Authorization Bypass in `datastore_search_sql`","details":"### Impact\n\nA vulnerability in `datastore_search_sql` allowed attackers to inject SQL in order to gain access to private resources and PostgreSQL system information.\n\n### Patches\nThe issue has been patched in CKAN 2.10.10 and CKAN 2.11.5\n\n### Workarounds\nDisable the DataStore SQL search (`ckan.datastore.sqlsearch.enabled = false`). Note that the SQL search is disabled by default.\n\n### More information\n\nAs stated in the [documentation](https://docs.ckan.org/en/2.11/maintaining/configuration.html#ckan-datastore-sqlsearch-enabled), this action function has protections that offer some safety but are not designed to prevent all types of abuse. Depending on the sensitivity of private data in a project's DataStore and the likelihood of abuse of a consuming site, a developer may choose to disable this action function or restrict its use with a [`IAuthFunctions`](https://docs.ckan.org/en/2.11/extensions/plugin-interfaces.html#ckan.plugins.interfaces.IAuthFunctions) plugin.\n\n### Credits\n\n* Reported by Arvin Shivram of Brutecat Security","published":"2026-05-13T18:52:35.383Z","modified":"2026-08-12T03:51:42.740967082Z","cvss":null,"epss":{"score":0.01817,"percentile":0.76784,"asOf":"2026-08-14"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"ckan","fixedVersion":"2.10.10"},{"ecosystem":"PyPI","name":"ckan","fixedVersion":"2.11.5"}],"fix":null,"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42031.json"},{"type":"ADVISORY","url":"https://github.com/ckan/ckan/security/advisories/GHSA-h7j7-3rx6-xvcg"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42031"},{"type":"WEB","url":"https://docs.ckan.org/en/2.10/changelog.html#v-2-10-10-2026-04-29"},{"type":"WEB","url":"https://docs.ckan.org/en/2.11/changelog.html#v-2-11-5-2026-04-29"},{"type":"WEB","url":"https://docs.ckan.org/en/2.11/extensions/plugin-interfaces.html#ckan.plugins.interfaces.IAuthFunctions"},{"type":"WEB","url":"https://docs.ckan.org/en/2.11/maintaining/configuration.html#ckan-datastore-sqlsearch-enabled"},{"type":"PACKAGE","url":"https://github.com/ckan/ckan"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:42.740967082Z"}}