{"id":"CVE-2024-39909","aliases":["EUVD-2024-2252","GHSA-5248-h45p-9pgw","GO-2024-2981"],"status":"published","title":"SQL Injection in the KubeClarity REST API","description":"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.","severity":{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00443,"percentile":0.38842,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-89"],"published":"2024-07-12T13:56:42Z","modified":"2026-10-28T02:31:14Z","fixes":[{"ecosystem":"Go","package":"github.com/openclarity/kubeclarity/backend","fixed_in":["0.0.0-20240711173334-1d1178840703"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/openclarity/kubeclarity/backend","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.0-20240711173334-1d1178840703"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/openclarity/kubeclarity/backend","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.0.0-20240711173334-1d1178840703"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/openclarity/kubeclarity/backend","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.0.0-20240711173334-1d1178840703"}]}]}],"products":[{"vendor":"openclarity","product":"kubeclarity"}],"references":[{"url":"https://github.com/openclarity/kubeclarity/security/advisories/GHSA-5248-h45p-9pgw","tags":["x_refsource_CONFIRM","x_transferred","advisory","web"]},{"url":"https://github.com/openclarity/kubeclarity/commit/1d1178840703a72d9082b7fc4aea0a3326c5d294","tags":["x_refsource_MISC","x_transferred","fix","web"]},{"url":"https://github.com/openclarity/kubeclarity/blob/main/backend/pkg/database/id_view.go#L79","tags":["x_refsource_MISC","x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39909","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-5248-h45p-9pgw"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/39xxx/CVE-2024-39909.json","tags":["advisory"]},{"url":"https://github.com/openclarity/kubeclarity","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-39909","title":"SQL Injection in the KubeClarity REST API","description":"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.","status":"published","published":"2024-07-12T14:34:25.23Z","modified":"2024-08-02T04:33:11.579Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:34:19.28149Z"}],"euvd":[{"id":"EUVD-2024-2252","description":"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.","status":"published","published":"2024-07-12T14:34:25Z","modified":"2024-08-02T04:33:11Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-03T03:50:17.469599Z"}],"ghsa":[{"id":"GHSA-5248-h45p-9pgw","title":"SQL Injection in the KubeClarity REST API","description":"### 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\u0026pageSize=50\u0026sortKey=vulnerabilities\u0026sortDir=DESC\u0026packageID=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.","status":"published","published":"2024-07-12T13:56:42Z","modified":"2024-11-18T16:26:52Z","cvss":[{"version":"4.0","score":7.1,"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","level":"high"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:38:20.012356Z"}],"nvd":[{"id":"CVE-2024-39909","description":"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.","status":"published","published":"2024-07-12T15:15:11.393Z","modified":"2026-06-17T07:43:00.523Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:10:12.994089Z"}],"osv":[{"id":"CVE-2024-39909","title":"SQL Injection in the KubeClarity REST API","description":"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.","status":"published","published":"2024-07-12T14:34:25.23Z","modified":"2026-10-28T02:31:14.499272622Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:44:41.618074Z"},{"id":"GHSA-5248-h45p-9pgw","title":"SQL Injection in the KubeClarity REST API","description":"### 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\u0026pageSize=50\u0026sortKey=vulnerabilities\u0026sortDir=DESC\u0026packageID=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.","status":"published","published":"2024-07-12T13:56:42Z","modified":"2026-09-10T03:50:16.243021223Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"},{"version":"4.0","score":7.1,"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","level":"high"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:46:37.528068Z"},{"id":"GO-2024-2981","title":"SQL Injection in the KubeClarity REST API in github.com/openclarity/kubeclarity/backend","description":"SQL Injection in the KubeClarity REST API in github.com/openclarity/kubeclarity/backend","status":"published","published":"2024-07-12T16:45:14Z","modified":"2026-03-03T04:55:33.588197Z","updated_at":"2026-11-02T15:47:01.453823Z"}]}}
