{"id":"CVE-2024-39909","aliases":["CVE-2024-39909","GHSA-5248-h45p-9pgw","GO-2024-2981"],"related":[],"kind":"vulnerability","state":"published","title":"SQL Injection in the KubeClarity REST API","summary":"KubeClarity is a tool for detection and management of Software Bill Of Materials (SBOM) and vulnerabilities of container images and filesystems. A time/boolean SQL Injection is present in the following resource `/api/applicationResources` via the following parameter `packageID`. As it can be seen in backend/pkg/database/id_view.go, while building the SQL Query the `fmt.Sprintf` function is used to build the query string without the input having first been subjected to any validation. This vulnerability is fixed in 2.23.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"KubeClarity is a tool for detection and management of Software Bill Of Materials (SBOM) and vulnerabilities of container images and filesystems. A time/boolean SQL Injection is present in the following resource `/api/applicationResources` via the following parameter `packageID`. As it can be seen in backend/pkg/database/id_view.go, while building the SQL Query the `fmt.Sprintf` function is used to build the query string without the input having first been subjected to any validation. This vulnerability is fixed in 2.23.1.","source":"cvelist"},{"lang":"en","text":"### Summary\nA time/boolean SQL Injection is present in the following resource `/api/applicationResources` via the following parameter `packageID`\n\n### Details\nAs it can be seen [here](https://github.com/openclarity/kubeclarity/blob/main/backend/pkg/database/id_view.go#L79), while building the SQL Query the `fmt.Sprintf` function is used to build the query string without the input having first been subjected to any validation.\n\n### PoC\nThe following command should be able to trigger a basic version of the behavior:\n`curl -i -s -k -X $'GET' \\\n    -H $'Host: kubeclarity.test' \\\n    $'https://kubeclarity.test/api/applicationResources?page=1&pageSize=50&sortKey=vulnerabilities&sortDir=DESC&packageID=c89973a6-4e7f-50b5-afe2-6bf6f4d3da0a\\'HTTP/2'`\n\n### Impact\nWhile using the Helm chart, the impact of this vulnerability is limited since it allows read access only to the kuberclarity database, to which access is already given as far as I understand to regular users anyway.\nOn the other hand, if Kuberclarity is deployed in a less secure way, this might allow access to more data then allowed or expected (beyond the limits of the KuberClarity database). The vulnerable line was introduced as part of the initial commit of Kubeclarity, so all versions up until the latest (2.23.1) are assumed vulnerable.","format":"markdown","source":"ghsa"},{"lang":"en","text":"SQL Injection in the KubeClarity REST API in github.com/openclarity/kubeclarity/backend","format":"markdown","source":"go"},{"lang":"es","text":"KubeClarity es una herramienta para la detección y gestión de listas de materiales de software (SBOM) y vulnerabilidades de imágenes de contenedores y sistemas de archivos. Una inyección SQL booleana/hora está presente en el siguiente recurso `/api/applicationResources` a través del siguiente parámetro `packageID`. Como se puede ver en backend/pkg/database/id_view.go, mientras se construye la consulta SQL, la función `fmt.Sprintf` se utiliza para construir la cadena de consulta sin que la entrada haya sido sometida primero a ninguna validación. Esta vulnerabilidad se solucionó en 2.23.1.","source":"nvd"}],"published":"2024-07-12T13:56:42.000Z","modified":"2026-09-10T03:50:16.243Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"HIGH"}],"cwes":["CWE-89"],"affected":[{"ranges":[{"version":"< 2.23.1","status":"affected"}],"vendor":"openclarity","product":"kubeclarity","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"2.23.1","status":"affected"}],"vendor":"openclarity","product":"kubeclarity","cpe":"cpe:2.3:a:openclarity:kubeclarity:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.0-20240711173334-1d1178840703"}],"ecosystem":"Go","package":"github.com/openclarity/kubeclarity/backend","purl":"pkg:golang/github.com/openclarity/kubeclarity/backend","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.0-20240711173334-1d1178840703"}],"ecosystem":"Go","package":"github.com/openclarity/kubeclarity/backend","purl":"pkg:golang/github.com/openclarity/kubeclarity/backend","source":"go"}],"references":[{"url":"https://github.com/openclarity/kubeclarity/security/advisories/GHSA-5248-h45p-9pgw","tags":["web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/openclarity/kubeclarity/commit/1d1178840703a72d9082b7fc4aea0a3326c5d294","tags":["web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/openclarity/kubeclarity/blob/main/backend/pkg/database/id_view.go#L79","tags":["web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39909","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/openclarity/kubeclarity","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2024-07-12T15:50:47.905Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-39909","url":"https://www.cve.org/CVERecord?id=CVE-2024-39909","licence":"CVE Terms of Use","modified":"2024-08-02T04:33:11.579Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5248-h45p-9pgw","url":"https://github.com/advisories/GHSA-5248-h45p-9pgw","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:16.243Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2024-2981","url":"https://pkg.go.dev/vuln/GO-2024-2981","licence":"CC-BY-4.0","modified":"2026-03-03T04:55:33.588Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-39909","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39909","licence":"Public domain","modified":"2026-06-17T07:43:00.523Z"}],"updatedAt":"2026-11-25T22:58:42.894Z","epss":{"score":0.00443,"percentile":0.40289,"date":"2026-12-01T12:00:22.000Z"}}