CVE-2022-24124 SQL Injection in Casdoor

High 7.5 Published Updated

Attackers can execute arbitrary SQL commands via the query API, potentially reading or modifying sensitive data in Casdoor.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-24124?

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.

Official 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.

Weakness: CWE-89

Which versions are affected by CVE-2022-24124?

4 open source packages ship an affected version, including github.com/casdoor/casdoor and casdoor. It affects 1 product.

PackageAffectedFixed in
github.com/casdoor/casdoor GoAll versions1.13.1
github.com/casdoor/casdoor GoAll versions1.13.1
github.com/casdoor/casdoor GoAll versions1.13.1
casdoor PyPIAll versions1.13.1

Products include Casbin Casdoor.

How do I fix CVE-2022-24124?

Upgrade github.com/casdoor/casdoor to 1.13.1 or later.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is CVE-2022-24124 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-24124 exists.

Public exploit code: 1 Exploit-DB entry, 1 Nuclei template and 3 proofs of concept on GitHub.

Sources

Also known as GHSA-m358-g4rp-533r, GO-2022-0303, PYSEC-2022-43189.

Is CVE-2022-24124 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free