{"answers":{"affected":"5 open source packages ship an affected version, including ckan. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42031 exists.","fix":"Upgrade ckan to a fixed version for your release line: 2.10.10 or 2.11.5.","what":"CVE-2026-42031 is a high-severity SQL injection vulnerability in ckan, published on 13 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-42031 and fix it if it is affected.\n\nWhat it is: CVE-2026-42031 is a high-severity SQL injection vulnerability in ckan, published on 13 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42031 exists.\n\nAffected packages and fixed versions:\n- ckan (PyPI): affected all versions; fixed in 2.10.10, 2.11.5\n- ckan (PyPI): affected all versions; fixed in 2.10.10\n- ckan (PyPI): affected all versions; fixed in 2.10.10\n- ckan (PyPI): affected from 2.11.0; fixed in 2.11.5\n- ckan (PyPI): affected from 2.11.0; fixed in 2.11.5\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-42031/ (Markdown: https://insights.sbomify.com/CVE-2026-42031/index.md)","id":"CVE-2026-42031","markdown":"https://insights.sbomify.com/CVE-2026-42031/index.md","name":"CVE-2026-42031","record":{"aliases":["GHSA-h7j7-3rx6-xvcg","PYSEC-2026-2417"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["data_read","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"CKAN data portal","requires_auth":"none","summary":"Unauthenticated attackers can inject SQL to access private resources and PostgreSQL system information in CKAN data portals.","user_interaction":"not_required","vuln_class":"sql_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"ckan","vendor":"okfn"}],"cvss":{"score":8.3,"severity":"high","source":"cna","vector":"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","version":"4.0"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"description":"CKAN is an open-source DMS (data management system) for powering data hubs and data portals. Prior to 2.10.10 and 2.11.5, a vulnerability in datastore_search_sql allowed attackers to inject SQL in order to gain access to private resources and PostgreSQL system information This vulnerability is fixed in 2.10.10 and 2.11.5.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":"2026-09-07","github_poc":1,"max_poc_stars":1,"metasploit":0,"nuclei":1,"refs":[{"date":"2026-09-07T05:08:05Z","kind":"github_poc","ref":"https://github.com/ddrvahandzo90-hue/CVE-2026-42031-SQL-Injection-Scanner","stars":1,"title":"CVE-2026-42031 SQL Injection Scanner for CKAN DataStore"},{"date":null,"kind":"nuclei","ref":"http/cves/2026/CVE-2026-42031.yaml","stars":null,"title":"CKAN DataStore SQL Search - SQL Injection"}],"tier":"weaponised"},"has_fix":true,"headline":"CKAN: Unauthenticated SQL Injection and Authorization Bypass in `datastore_search_sql`","id":"CVE-2026-42031","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"sql_injection","year":"2026"},"n_packages":5,"n_references":1,"next":{"headline":"CKAN: Unauthenticated Authorization Bypass in `datastore_search_sql`","id":"CVE-2026-42032"},"packages":[{"ecosystem":"PyPI","fixed":["2.10.10","2.11.5"],"introduced":["0","2.11.0"],"last_affected":[],"package":"ckan","purl":"pkg:pypi/ckan","source":"PYSEC-2026-2417"},{"ecosystem":"PyPI","fixed":["2.10.10"],"introduced":["0"],"last_affected":[],"package":"ckan","purl":null,"source":"GHSA-h7j7-3rx6-xvcg"},{"ecosystem":"PyPI","fixed":["2.10.10"],"introduced":["0"],"last_affected":[],"package":"ckan","purl":"pkg:pypi/ckan","source":"GHSA-h7j7-3rx6-xvcg"},{"ecosystem":"PyPI","fixed":["2.11.5"],"introduced":["2.11.0"],"last_affected":[],"package":"ckan","purl":null,"source":"GHSA-h7j7-3rx6-xvcg"},{"ecosystem":"PyPI","fixed":["2.11.5"],"introduced":["2.11.0"],"last_affected":[],"package":"ckan","purl":"pkg:pypi/ckan","source":"GHSA-h7j7-3rx6-xvcg"}],"prev":{"headline":"MapServer: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) in OpenLayers viewer","id":"CVE-2026-42030"},"products":["ckan"],"published":"2026-05-13","related":[{"cvss_score":9.8,"headline":"CKAN remote code execution and private information access via crafted resource ids","id":"CVE-2023-32321","kev_date_added":null,"published":"2023-05-26"},{"cvss_score":8.8,"headline":"Excessive permissions for ckan user","id":"CVE-2023-32696","kev_date_added":null,"published":"2023-05-30"},{"cvss_score":8.8,"headline":"CKAN contains Improper Authentication leading to account takeover","id":"CVE-2022-43685","kev_date_added":null,"published":"2022-11-22"},{"cvss_score":8.6,"headline":"CKAN is vulnerable to session secret shared across instances using Docker images","id":"CVE-2023-22746","kev_date_added":null,"published":"2023-02-03"},{"cvss_score":6.8,"headline":"CKAN has a Cross-site Scripting vector in the Datatables view plugin","id":"CVE-2024-41675","kev_date_added":null,"published":"2024-08-21"},{"cvss_score":6.7,"headline":"CKAN: Unauthenticated Authorization Bypass in `datastore_search_sql`","id":"CVE-2026-42032","kev_date_added":null,"published":"2026-05-13"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-05-15","vendors":["ckan"]},"summary":"Unauthenticated attackers can inject SQL to access private resources and PostgreSQL system information in CKAN data portals.","url":"https://insights.sbomify.com/CVE-2026-42031/"}