{"answers":{"affected":"3 open source packages ship an affected version, including github.com/openclarity/kubeclarity/backend.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-39909 exists.","fix":"Upgrade github.com/openclarity/kubeclarity/backend to 0.0.0-20240711173334-1d1178840703 or later.","what":"CVE-2024-39909 is a medium-severity SQL injection vulnerability in openclarity kubeclarity, published on 12 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-39909 and fix it if it is affected.\n\nWhat it is: CVE-2024-39909 is a medium-severity SQL injection vulnerability in openclarity kubeclarity, published on 12 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-39909 exists.\n\nAffected packages and fixed versions:\n- github.com/openclarity/kubeclarity/backend (Go): affected all versions; fixed in 0.0.0-20240711173334-1d1178840703\n- github.com/openclarity/kubeclarity/backend (Go): affected all versions; fixed in 0.0.0-20240711173334-1d1178840703\n- github.com/openclarity/kubeclarity/backend (Go): affected all versions; fixed in 0.0.0-20240711173334-1d1178840703\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-2024-39909/ (Markdown: https://insights.sbomify.com/CVE-2024-39909/index.md)","id":"CVE-2024-39909","markdown":"https://insights.sbomify.com/CVE-2024-39909/index.md","name":"CVE-2024-39909","record":{"aliases":["GHSA-5248-h45p-9pgw","GO-2024-2981"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"KubeClarity SBOM tool","requires_auth":"low_privilege","summary":"Attackers can exploit SQL injection in the KubeClarity REST API to read or modify database contents via the packageID parameter.","user_interaction":"not_required","vuln_class":"sql_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":6.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"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.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"SQL Injection in the KubeClarity REST API","id":"CVE-2024-39909","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"sql_injection","year":"2024"},"n_packages":3,"n_references":3,"next":{"headline":"Cross-site scripting (XSS) in the decidim admin panel with QuillJS WYSWYG editor","id":"CVE-2024-39910"},"packages":[{"ecosystem":"Go","fixed":["0.0.0-20240711173334-1d1178840703"],"introduced":["0"],"last_affected":[],"package":"github.com/openclarity/kubeclarity/backend","purl":null,"source":"GHSA-5248-h45p-9pgw"},{"ecosystem":"Go","fixed":["0.0.0-20240711173334-1d1178840703"],"introduced":["0"],"last_affected":[],"package":"github.com/openclarity/kubeclarity/backend","purl":"pkg:golang/github.com/openclarity/kubeclarity/backend","source":"GHSA-5248-h45p-9pgw"},{"ecosystem":"Go","fixed":["0.0.0-20240711173334-1d1178840703"],"introduced":["0"],"last_affected":[],"package":"github.com/openclarity/kubeclarity/backend","purl":"pkg:golang/github.com/openclarity/kubeclarity/backend","source":"GO-2024-2981"}],"prev":{"headline":"Denial of service in REXML","id":"CVE-2024-39908"},"products":["kubeclarity"],"published":"2024-07-12","related":[],"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":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["openclarity"]},"summary":"Attackers can exploit SQL injection in the KubeClarity REST API to read or modify database contents via the packageID parameter.","url":"https://insights.sbomify.com/CVE-2024-39909/"}