{"answers":{"affected":"4 open source packages ship an affected version, including github.com/casdoor/casdoor and casdoor. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-24124 exists.","fix":"Upgrade github.com/casdoor/casdoor to 1.13.1 or later.","what":"CVE-2022-24124 is a high-severity SQL injection vulnerability in n/a, published on 29 Jan 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-24124 and fix it if it is affected.\n\nWhat it is: CVE-2022-24124 is a high-severity SQL injection vulnerability in n/a, published on 29 Jan 2022. 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-2022-24124 exists.\n\nAffected packages and fixed versions:\n- github.com/casdoor/casdoor (Go): affected all versions; fixed in 1.13.1\n- github.com/casdoor/casdoor (Go): affected all versions; fixed in 1.13.1\n- github.com/casdoor/casdoor (Go): affected all versions; fixed in 1.13.1\n- casdoor (PyPI): affected all versions; fixed in 1.13.1\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-2022-24124/ (Markdown: https://insights.sbomify.com/CVE-2022-24124/index.md)","id":"CVE-2022-24124","markdown":"https://insights.sbomify.com/CVE-2022-24124/index.md","name":"CVE-2022-24124","record":{"aliases":["GHSA-m358-g4rp-533r","GO-2022-0303","PYSEC-2022-43189"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Casdoor identity provider","requires_auth":"none","summary":"Attackers can execute arbitrary SQL commands via the query API, potentially reading or modifying sensitive data in Casdoor.","user_interaction":"not_required","vuln_class":"sql_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"casdoor","vendor":"casbin"}],"cvss":{"score":7.5,"severity":"high","source":"nvd","vector":"CVSS:3.1/AV:N/AC:L/PR:N/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":"The query API in Casdoor before 1.13.1 has a SQL injection vulnerability related to the field and value parameters, as demonstrated by api/get-organizations.","ecosystems":["Go","PyPI"],"exploits":{"exploitdb":1,"first_seen":"2022-02-25","github_poc":3,"max_poc_stars":8,"metasploit":0,"nuclei":1,"refs":[{"date":"2022-02-25T07:55:55Z","kind":"github_poc","ref":"https://github.com/ColdFusionX/CVE-2022-24124","stars":8,"title":"POC for CVE-2022-24124"},{"date":"2022-08-31T16:23:16Z","kind":"github_poc","ref":"https://github.com/b1gdog/CVE-2022-24124","stars":2,"title":"CVE-2022-24124 exploit"},{"date":"2022-06-04T21:01:22Z","kind":"github_poc","ref":"https://github.com/abbarhissarh/CVE-2022-24124","stars":1,"title":"Dump SQL database version on host running Casdoor \u003c 1.13.1"},{"date":"2022-02-28","kind":"exploitdb","ref":"50792","stars":null,"title":"Casdoor 1.13.0 - SQL Injection (Unauthenticated)"},{"date":null,"kind":"nuclei","ref":"http/cves/2022/CVE-2022-24124.yaml","stars":null,"title":"Casdoor 1.13.0 - Unauthenticated SQL Injection"}],"tier":"weaponised"},"has_fix":true,"headline":"SQL Injection in Casdoor","id":"CVE-2022-24124","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"sql_injection","year":"2022"},"n_packages":4,"n_references":4,"next":{"headline":"Missing authorization in n/a","id":"CVE-2022-24125"},"packages":[{"ecosystem":"Go","fixed":["1.13.1"],"introduced":["0"],"last_affected":[],"package":"github.com/casdoor/casdoor","purl":null,"source":"GHSA-m358-g4rp-533r"},{"ecosystem":"Go","fixed":["1.13.1"],"introduced":["0"],"last_affected":[],"package":"github.com/casdoor/casdoor","purl":"pkg:golang/github.com/casdoor/casdoor","source":"GHSA-m358-g4rp-533r"},{"ecosystem":"Go","fixed":["1.13.1"],"introduced":["0"],"last_affected":[],"package":"github.com/casdoor/casdoor","purl":"pkg:golang/github.com/casdoor/casdoor","source":"GO-2022-0303"},{"ecosystem":"PyPI","fixed":["1.13.1"],"introduced":["0"],"last_affected":[],"package":"casdoor","purl":"pkg:pypi/casdoor","source":"PYSEC-2022-43189"}],"prev":{"headline":"Cross-site scripting in n/a","id":"CVE-2022-24123"},"products":["n/a"],"published":"2022-01-29","related":[{"cvss_score":9.1,"headline":"Casdoor arbitrary file write vulnerability","id":"CVE-2022-38638","kev_date_added":null,"published":"2022-09-09"},{"cvss_score":8.1,"headline":"GHSL-2024-035: Casdoor CORS misconfiguration","id":"CVE-2024-41657","kev_date_added":null,"published":"2024-08-20"},{"cvss_score":8.1,"headline":"Casdoor arbitrary file deletion vulnerability via uploadFile function","id":"CVE-2022-44942","kev_date_added":null,"published":"2022-12-07"},{"cvss_score":7.5,"headline":"casdoor's use of`ssh.InsecureIgnoreHostKey()` disables host key verification","id":"CVE-2024-41264","kev_date_added":null,"published":"2024-08-01"},{"cvss_score":6.5,"headline":"Casdoor Cross-Site Request Forgery vulnerability","id":"CVE-2023-34927","kev_date_added":null,"published":"2023-06-22"},{"cvss_score":6.1,"headline":"GHSL-2024-036: Reflected XSS in QrCodePage.js","id":"CVE-2024-41658","kev_date_added":null,"published":"2024-08-20"}],"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":"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":"GPL-2.0-or-later","name":"Exploit-DB"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["n/a"]},"summary":"Attackers can execute arbitrary SQL commands via the query API, potentially reading or modifying sensitive data in Casdoor.","url":"https://insights.sbomify.com/CVE-2022-24124/"}