{"answers":{"affected":"3 open source packages ship an affected version, including python-sql.","exploited":"There is no known exploitation of CVE-2024-9774 in the wild and no public exploit code.","fix":"Upgrade python-sql to 1.5.2 or later.","what":"CVE-2024-9774 is a medium-severity SQL injection vulnerability in python-sql, published on 27 Dec 2024. An attacker needs administrator access to exploit it, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-9774 and fix it if it is affected.\n\nWhat it is: CVE-2024-9774 is a medium-severity SQL injection vulnerability in python-sql, published on 27 Dec 2024. An attacker needs administrator access to exploit it, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-9774 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- python-sql (PyPI): affected all versions; fixed in 1.5.2\n- python-sql (PyPI): affected all versions; fixed in 1.5.2\n- python-sql (PyPI): affected all versions; fixed in 1.5.2\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-9774/ (Markdown: https://insights.sbomify.com/CVE-2024-9774/index.md)","id":"CVE-2024-9774","markdown":"https://insights.sbomify.com/CVE-2024-9774/index.md","name":"CVE-2024-9774","record":{"aliases":["DEBIAN-CVE-2024-9774","DLA-3932-1","DSA-5795-1","GHSA-pq9p-pc3p-9hm4","PYSEC-2026-1855","UBUNTU-CVE-2024-9774","USN-8765-1","openSUSE-SU-2024:0412-1","openSUSE-SU-2024:0413-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Python SQL library","requires_auth":"high_privilege","summary":"Attackers can inject SQL commands via unary operators in python-sql, potentially leading to code execution or data theft.","user_interaction":"not_required","vuln_class":"sql_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"redhat","cpe":[],"cvss":{"score":6.5,"severity":"medium","source":"cna","vector":"CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N","version":"3.0"},"cwes":[{"id":"CWE-150","name":"Improper Neutralization of Escape, Meta, or Control Sequences"}],"description":"A vulnerability was found in python-sql where unary operators do not escape non-Expression.","ecosystems":["PyPI","SUSE:Package Hub 15 SP5","SUSE:Package Hub 15 SP6","openSUSE:Leap 15.5","openSUSE:Leap 15.6"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Python-sql: python-sql unary operators does not escape non-expression","id":"CVE-2024-9774","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"sql_injection","year":"2024"},"n_packages":7,"n_references":3,"next":{"headline":"Anih - Creative Agency WordPress Theme \u003c= 2024 - Authenticated (Administrator+) Stored Cross-Site Scripting","id":"CVE-2024-9775"},"packages":[{"ecosystem":"PyPI","fixed":["1.5.2"],"introduced":["0"],"last_affected":[],"package":"python-sql","purl":null,"source":"GHSA-pq9p-pc3p-9hm4"},{"ecosystem":"PyPI","fixed":["1.5.2"],"introduced":["0"],"last_affected":[],"package":"python-sql","purl":"pkg:pypi/python-sql","source":"GHSA-pq9p-pc3p-9hm4"},{"ecosystem":"PyPI","fixed":["1.5.2"],"introduced":["0"],"last_affected":[],"package":"python-sql","purl":"pkg:pypi/python-sql","source":"PYSEC-2026-1855"},{"ecosystem":"SUSE:Package Hub 15 SP5","fixed":["1.5.1-bp155.3.6.1"],"introduced":["0"],"last_affected":[],"package":"python-python-sql","purl":"pkg:rpm/suse/python-python-sql\u0026distro=SUSE%20Package%20Hub%2015%20SP5","source":"openSUSE-SU-2024:0412-1"},{"ecosystem":"SUSE:Package Hub 15 SP6","fixed":["1.5.1-bp156.2.6.1"],"introduced":["0"],"last_affected":[],"package":"python-python-sql","purl":"pkg:rpm/suse/python-python-sql\u0026distro=SUSE%20Package%20Hub%2015%20SP6","source":"openSUSE-SU-2024:0413-1"},{"ecosystem":"openSUSE:Leap 15.5","fixed":["1.5.1-bp155.3.6.1"],"introduced":["0"],"last_affected":[],"package":"python-python-sql","purl":"pkg:rpm/opensuse/python-python-sql\u0026distro=openSUSE%20Leap%2015.5","source":"openSUSE-SU-2024:0412-1"},{"ecosystem":"openSUSE:Leap 15.6","fixed":["1.5.1-bp156.2.6.1"],"introduced":["0"],"last_affected":[],"package":"python-python-sql","purl":"pkg:rpm/opensuse/python-python-sql\u0026distro=openSUSE%20Leap%2015.6","source":"openSUSE-SU-2024:0413-1"}],"prev":{"headline":"Improper Neutralization of Special Elements used in a Command ('Command Injection') in GitLab","id":"CVE-2024-9773"},"products":[],"published":"2024-12-27","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":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-08-30","vendors":[]},"summary":"Attackers can inject SQL commands via unary operators in python-sql, potentially leading to code execution or data theft.","url":"https://insights.sbomify.com/CVE-2024-9774/"}