cbcvebase.
CVE-2022-24124
published 2022-01-29

CVE-2022-24124: 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.

PriorityP271high7.5CVSS 3.1
AVNACLPRNUINSUCHINAN
EXPLOIT
EPSS
58.93%
99.0th percentile
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.

Affected

2 ranges
VendorProductVersion rangeFixed in
casbincasdoor< 1.13.11.13.1
github.comcasdoor_casdoor>= 0 < 1.13.11.13.1

Detection & IOCsextracted from sources · hover to see the quote

url/api/get-organizations?p=123&pageSize=123&value=QualysWAS&sortField=&sortOrder=&field=updatexml(null,version(),null)
url/api/get-organizations?p=123&pageSize=123&value=cfx&sortField=&sortOrder=&field=updatexml(1,version(),1)
url/api/get-organizations?p=123&pageSize=123&value=cfx&sortField=&sortOrder=&field=updatexml(null,version(),null)
path/api/get-organizations
yara
regex: XPATH syntax error.*'
  • Exploit triggers an XPATH syntax error in the HTTP response body containing the string 'XPATH syntax error:' followed by SQL query output — match this pattern in response bodies to detect exploitation attempts.
  • Monitor GET requests to /api/get-organizations where the 'field' parameter contains SQL/XPATH function calls such as updatexml() or extractvalue() — this endpoint is publicly accessible without authentication.
  • Shodan/FOFA fingerprinting: identify exposed Casdoor instances via HTTP title 'Casdoor' or 'casdoor' to scope detection.
  • The exploit regex pattern used to confirm successful SQL injection is '(?i)(XPATH syntax error.*\')' — use this pattern in WAF/IDS rules against HTTP response bodies.
  • The vulnerability is unauthenticated; no session or credentials are required. Any request to the affected endpoint with a crafted 'field' parameter should be treated as a high-confidence attack attempt.
  • ·The XPATH error output is truncated in the response, limiting direct data exfiltration per request; attackers can bypass this using substring() to extract data in chunks — detection rules should account for repeated requests with varying substring() offsets.
  • ·The fix in version 1.13.1 implements a whitelist character check via filterField() in object/check.go — deployments still running Casdoor < 1.13.1 remain fully exposed with no authentication barrier.

CVSS provenance

nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
nvdv2.05.0MEDIUMAV:N/AC:L/Au:N/C:P/I:N/A:N
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.