CVE-2026-22687

5.6 MEDIUM

📋 TL;DR

WeKnora versions before 0.2.5 contain a SQL injection vulnerability in the Agent service's database query tool. Attackers can use prompt-based techniques to bypass query restrictions and access sensitive data from the server and database. This affects all WeKnora deployments with Agent service enabled.

💻 Affected Systems

Products:
  • WeKnora
Versions: All versions before 0.2.5
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability requires Agent service to be enabled, which is a configurable feature.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to exfiltration of all sensitive data, including credentials, personal information, and proprietary documents.

🟠

Likely Case

Unauthorized access to sensitive database information, potentially including user data, document metadata, and system configuration.

🟢

If Mitigated

Limited or no data exposure if proper input validation and query restrictions are enforced.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires access to the Agent service interface and knowledge of prompt injection techniques to bypass SQL query restrictions.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.2.5

Vendor Advisory: https://github.com/Tencent/WeKnora/security/advisories/GHSA-pcwc-3fw3-8cqv

Restart Required: Yes

Instructions:

1. Backup your WeKnora configuration and data. 2. Update to version 0.2.5 using your package manager or from GitHub releases. 3. Restart the WeKnora service. 4. Verify the update was successful.

🔧 Temporary Workarounds

Disable Agent Service

all

Temporarily disable the vulnerable Agent service component until patching is possible.

# Edit WeKnora configuration to set agent.enabled = false
# Restart WeKnora service

Network Access Restriction

linux

Restrict network access to WeKnora Agent service endpoints using firewall rules.

# Example: iptables -A INPUT -p tcp --dport [WeKnora_port] -s [trusted_ips] -j ACCEPT
# iptables -A INPUT -p tcp --dport [WeKnora_port] -j DROP

🧯 If You Can't Patch

  • Disable the Agent service entirely in configuration
  • Implement strict network segmentation and access controls to limit exposure

🔍 How to Verify

Check if Vulnerable:

Check WeKnora version and verify Agent service is enabled in configuration.

Check Version:

weknora --version or check package manager

Verify Fix Applied:

Confirm version is 0.2.5 or later and test that prompt-based SQL injection attempts are properly blocked.

📡 Detection & Monitoring

Log Indicators:

  • Unusual database query patterns from Agent service
  • SQL error messages in logs
  • Multiple failed query attempts with unusual parameters

Network Indicators:

  • Unusual traffic to Agent service endpoints
  • Large data transfers from database ports

SIEM Query:

source="weknora.logs" AND ("SQL error" OR "query failed" OR "unauthorized query")

🔗 References

📤 Share & Export