# CVE-2026-108821: Tencent WeKnora SQL injection in validateSubquery

Source: https://junglewise.ai/threats/cve-2026-108821-a-security-vulnerability-has-been-detected-in-tencent-weknora-up  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-12. Updated: 2026-10-16  
License: CC BY 4.0 with a link back

CVE-2026-108821 · Severity: medium · CVSS 6.3 · Published 2026-10-12

Tencent WeKnora is an open-source knowledge platform that converts documents into queryable databases and AI agents. A vulnerability in its SQL validation allows users with basic "Viewer" roles to bypass security checks and read any file from the server or documents from other workspaces through a SQL injection weakness. An attacker can access sensitive data belonging to other users and compromise document confidentiality across the entire system.

Technologies: [Tencent WeKnora](https://junglewise.ai/threats/technologies/weknora). Vendors: [Tencent](https://junglewise.ai/threats/vendors/tencent).

## Quick answers

**Is CVE-2026-108821 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-108821 being exploited in the wild.

**How severe is CVE-2026-108821?** Medium severity, with a CVSS score of 6.3, published 12 October 2026.

**Which products and versions are affected?** Tencent WeKnora up to 0.8.1.

**Is there a fix for CVE-2026-108821?** Yes: fixed in 0.8.2. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-108821 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-108821?** Check whether you run Tencent WeKnora at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in 0.8.2

## Technical details

The validateSubquery function in internal/utils/inject.go fails to inspect compound set operations (UNION/INTERSECT/EXCEPT) in subqueries, unlike the top-level validateSelectStmt function which rejects them. An attacker can nest a RangeFunction (forbidden in FROM clauses) inside a UNION branch where it is not validated, and the DuckDB data_analysis tool permits FROM subqueries without calling WithNoSubqueries(). This allows bypassing table whitelist enforcement and reading arbitrary files via DuckDB's file system access functions.

## Affected products

- Tencent WeKnora up to 0.8.1

## Timeline

- 2026-10-11: disclosed
- 2026-10-12: advisory
- 2026-10-12: patched: commit d7ccd5ba517cc3968e6d5000a2ab0f4b51ef1dda

## References

- [https://gist.github.com/k4z01/8ab2f57b015825f8738ed536dd870877](https://gist.github.com/k4z01/8ab2f57b015825f8738ed536dd870877)
- [https://github.com/Tencent/WeKnora/](https://github.com/Tencent/WeKnora/)

## Related threats

- [WeKnora server-side request forgery in isRestrictedIP()](https://junglewise.ai/threats/cve-2026-118376-weknora-before-0-8-2-contains-a-server-side-request-forgery)
- [Tencent WeKnora SSRF via unvalidated HTTP redirects](https://junglewise.ai/threats/cve-2026-91750-tencent-weknora-ssrf-via-unvalidated-http-redirects)
- [Tencent WeKnora authorization bypass in Config API Endpoint](https://junglewise.ai/threats/cve-2026-8786-tencent-weknora-authorization-bypass-in-config-api-endpoint)
