CKAN CVE-2026-42031
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach CKAN datastore_search_sql endpoint
-
DeliverySubmit crafted SQL injection payload
-
ExploitBypass authorization protections
-
ExecutionQuery private resources and PostgreSQL catalogs
-
ImpactExfiltrate sensitive private data
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the CKAN instance has the DataStore SQL search feature explicitly enabled via |
| Impact | Signals are moderately elevated but qualified. The CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:H) indicates network-reachable, unauthenticated access with high confidentiality impact, but the AT:P (attack requirement present) metric and the vendor note that SQL search is disabled by default are critical mitigating factors - exploitation only works where an operator has explicitly enabled |
| Exploit ScenarioDerived | On a CKAN portal that has enabled |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 24, 2026
SQL injection in CKAN's datastore_search_sql action allows unauthenticated remote attackers to read private DataStore resources and enumerate PostgreSQL system information by injecting crafted SQL. The flaw affects CKAN versions below 2.10.10 and the 2.11.0-2.11.4 range, and also functions as an authorization bypass since private data protected by CKAN's access controls can be exfiltrated. Publicly available exploit code exists; EPSS rates it in the 87th percentile (3.15%), but it is not listed in CISA KEV and there is no public exploit identified as being actively used in the wild.
RemediationAI
Vendor-released patch: upgrade to CKAN 2.10.10 (for 2.10.x deployments) or 2.11.5 (for 2.11.x deployments), both released 2026-04-29 (changelogs: https://docs.ckan.org/en/2.10/changelog.html#v-2-10-10-2026-04-29 and https://docs.ckan.org/en/2.11/changelog.html#v-2-11-5-2026-04-29). If immediate patching is not possible, the primary workaround is to disable the DataStore SQL search by setting ckan.datastore.sqlsearch.enabled = false (this is the default, so most sites are unaffected) - the trade-off is loss of arbitrary SQL query capability for any integrations that rely on it. Where the feature must remain enabled, restrict its use with an IAuthFunctions plugin (https://docs.ckan.org/en/2.11/extensions/plugin-interfaces.html#ckan.plugins.interfaces.IAuthFunctions) to limit which users can invoke datastore_search_sql, accepting the added maintenance overhead of a custom auth extension. See advisory GHSA-h7j7-3rx6-xvcg for full guidance.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CKAN is an open-source data management/portal platform (Python, pip package ckan) widely used by governments and organizations to publish open data catalogs. Its DataStore extension stores tabular resource data in PostgreSQL and exposes a datastore_search_sql action that accepts raw SQL queries against that database. The root cause is CWE-89 (SQL Injection): input-sanitization protections on this action were insufficient, letting an attacker break out of the intended query context to reach private resources and PostgreSQL internal/system catalogs. Per CKAN documentation, datastore_search_sql was always understood to offer only partial safety and is disabled by default via ckan.datastore.sqlsearch.enabled = false.
Know when PostgreSQL gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N
Network, unauthenticated (PR:N), but requires the non-default sqlsearch feature enabled so AC:H; high confidentiality read, limited integrity, no availability impact.
Primary rating from Vendor (https://github.com/ckan/ckan).
CVSS VectorVendor: https://github.com/ckan/ckan
Lifecycle Timeline
3DescriptionCVE.org
Impact
A vulnerability in datastore_search_sql allowed attackers to inject SQL in order to gain access to private resources and PostgreSQL system information.
Patches
The issue has been patched in CKAN 2.10.10 and CKAN 2.11.5
Workarounds
Disable the DataStore SQL search (ckan.datastore.sqlsearch.enabled = false). Note that the SQL search is disabled by default.
More information
As stated in the documentation, 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 plugin.
Credits
- Reported by Arvin Shivram of Brutecat Security
Executive ViewAI
CKAN data management systems are vulnerable to an unauthenticated SQL injection attack allowing unauthorized access to private data repositories and system information, directly threatening data confidentiality and compliance posture. Attackers can bypass access controls and exfiltrate sensitive information without valid credentials; publicly available exploit code exists. An urgent patch deployment is required given the 8.3 CVSS severity.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Affected Products (CPE)CVE.org
More in PostgreSQL
View allPostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re
Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.
Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar
PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow
The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t
A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve
Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the
Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
GHSA-h7j7-3rx6-xvcg
NVD
CVE.org
EPSS
VulDB
Exploit-DB