{"id":"CVE-2026-30247","aliases":["CVE-2026-30247","GHSA-595m-wc8g-6qgc","GO-2026-4628"],"related":[],"kind":"vulnerability","state":"published","title":"WeKnora: SSRF via Redirection","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe 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.\n\n### Details\n\nThe `/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:\n1. Submit a URL to an attacker-controlled domain (passes validation)\n2. Have that domain respond with a 307 redirect to an internal service\n3. The backend automatically follows the redirect without checking if the destination is restricted\n4. The internal service response is exposed to the attacker\n\n### Validation Gaps\n- The `IsSSRFSafeURL()` function (in `internal/utils/security.go`) validates the initial URL thoroughly, but there's no validation of HTTP redirect targets\n- `host.docker.internal` is not in the `restrictedHostnames` list\n- Docker-specific IP ranges (172.17.0.0/16 for bridge networks) are not explicitly blocked\n- The code validates `parsed.Hostname()` from the initial URL, but redirect Location headers bypass this check\n\n### Root Cause Analysis\nThe 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.\n\n### PoC\n\n**Step 1**: Set up an attacker-controlled server that responds with a redirect:\n\n```http\nHTTP/1.1 307 Temporary Redirect\nLocation: http://host.docker.internal:7777\nContent-Type: text/html\nAccess-Control-Allow-Origin: *\n```\n**Step 2**: Send the request with a clean URL:\n\n```http\nPOST /api/v1/knowledge-bases/dbadd153-9e60-4213-9553-9f78dbcba0dc/knowledge/url HTTP/1.1\nHost: localhost\nContent-Type: application/json\nAuthorization: Bearer <valid_token>\n\n{\"url\":\"https://attacker-domain.com\",\"tag_id\":\"\"}\n```\n\nThe URL `https://attacker-domain.com` passes all validation checks because:\n✓ Valid `https://` scheme\n✓ Not an IP address (it's a domain)\n✓ Not in restricted hostnames\n✓ Doesn't resolve to a private IP (assuming attacker controls a public domain)\n\n**Step 3**: The backend's HTTP client follows the redirect to `http://host.docker.internal:7777`, which:\n✗ Is not validated\n✗ `host.docker.internal` is not in the blocklist\n✗ Successfully accesses the internal service\n\n### Impact\n\nVulnerability Type: Server-Side Request Forgery (SSRF) via HTTP Redirect\n\n**Who is Impacted**:\n- The organization running the application\n- Internal services and databases accessible from the application container\n- Services in the Docker network (other containers, internal infrastructure)\n- Sensitive data stored in internal services\n\n**Potential Consequences**:\n- Access to internal databases (PostgreSQL, MongoDB, MySQL) running in Docker\n- Information disclosure from internal services (Redis cache, configuration servers)\n- Access to Docker container metadata and environment variables\n- Lateral movement to other containers in the same Docker network\n- Exfiltration of sensitive configuration, API keys, or database credentials\n- Potential RCE if internal services have exploitable vulnerabilities","format":"markdown","source":"ghsa"},{"lang":"en","text":"WeKnora is Vulnerable to SSRF via Redirection in github.com/Tencent/WeKnora","format":"markdown","source":"go"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-03-05T21:49:03.000Z","modified":"2026-06-17T10:32:33.480Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":"< 0.2.12","status":"affected"}],"vendor":"Tencent","product":"WeKnora","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.2.12"}],"ecosystem":"Go","package":"github.com/Tencent/WeKnora","purl":"pkg:golang/github.com/Tencent/WeKnora","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.2.12"}],"ecosystem":"Go","package":"github.com/Tencent/WeKnora","purl":"pkg:golang/github.com/Tencent/WeKnora","source":"go"},{"ranges":[{"status":"affected","fixed":"0.2.12"}],"vendor":"tencent","product":"weknora","cpe":"cpe:2.3:a:tencent:weknora:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/Tencent/WeKnora/security/advisories/GHSA-595m-wc8g-6qgc","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-30247","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/Tencent/WeKnora","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-03-09T20:43:21.952Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-30247","url":"https://www.cve.org/CVERecord?id=CVE-2026-30247","licence":"CVE Terms of Use","modified":"2026-03-09T20:54:27.857Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-595m-wc8g-6qgc","url":"https://github.com/advisories/GHSA-595m-wc8g-6qgc","licence":"CC-BY-4.0","modified":"2026-03-23T04:56:28.101Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-4628","url":"https://pkg.go.dev/vuln/GO-2026-4628","licence":"CC-BY-4.0","modified":"2026-03-23T04:53:18.323Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-30247","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-30247","licence":"Public domain","modified":"2026-06-17T10:32:33.480Z"}],"updatedAt":"2026-11-25T22:59:15.451Z","epss":{"score":0.00421,"percentile":0.38432,"date":"2026-12-01T12:00:22.000Z"}}