CVE-2026-30247: Github.com/Tencent/WeKnora WeKnora Is Vulnerable To SSRF Vulnerability

MODERATE
Advisory Identifier: GHSA-595m-wc8g-6qgc
CVSS 5.9
CWE-918
Published
Advisory Summary

CVE-2026-30247 is a MODERATE (CVSS 5.9) weknora is vulnerable to ssrf vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Github.com/Tencent/WeKnora libraries in the Go ecosystem. The issue involves weknora is vulnerable to ssrf via redirection. Remediation is available by upgrading affected packages to version 0.2.12.

CVE-2026-30247 at a Glance

CVE Identifier CVE-2026-30247
GHSA Identifier GHSA-595m-wc8g-6qgc
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Github.com/Tencent/WeKnora
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-30247

To remediate this vulnerability, upgrade all affected Github.com/Tencent/WeKnora dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/Tencent/WeKnora fixed: 0.2.12
Upgrade github.com/Tencent/WeKnora to 0.2.12
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/Tencent/WeKnora

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-30247, inspect your project dependencies for Github.com/Tencent/WeKnora:

inspect dependencies for github.com/Tencent/WeKnora

Analyze the terminal output to locate any version of Github.com/Tencent/WeKnora in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.12), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Github.com/Tencent/WeKnora, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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: 1. Submit a URL to an attacker-controlled domain (passes validation) 2. Have that domain respond with a 307 redirect to an internal service 3. The backend automatically follows the redirect without checking if the destination is restricted 4. The internal service response is exposed to the attacker ### Validation Gaps - The `IsSSRFSafeURL()` function (in `internal/utils/security.go`) validates the initial URL thoroughly, but there's no validation of HTTP redirect targets - `host.docker.internal` is not in the `restrictedHostnames` list - 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 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: ```http 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

CVE-2026-30247 Affected Github.com/Tencent/WeKnora Versions

1 component(s)
Fixed Versions:
0.2.12
Product / Package Ecosystem Affected Versions Fixed Version
github.com/Tencent/WeKnora
Go
< 0.2.12
0.2.12

References

Frequently Asked Questions

What is CVE-2026-30247?
CVE-2026-30247 is a security vulnerability in Github.com/Tencent/WeKnora involving WeKnora is Vulnerable to SSRF via Redirection under CWE-918: Server-Side Request Forgery (SSRF).
Which Github.com/Tencent/WeKnora versions are affected?
Affected versions include releases prior to 0.2.12 across affected packages: github.com/Tencent/WeKnora.
What version fixes CVE-2026-30247?
Upgrading to 0.2.12 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/Tencent/WeKnora affected?
Yes, github.com/Tencent/WeKnora is affected in releases prior to 0.2.12. Upgrade your dependency to 0.2.12 or later.
What is the CVSS score of CVE-2026-30247?
CVE-2026-30247 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-30247?
CVE-2026-30247 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check Go dependencies for CVE-2026-30247?
Run the dependency tree command: 'inspect dependencies for github.com/Tencent/WeKnora'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-595m-wc8g-6qgc",
  "modified" : "2026-03-09T13:13:28Z",
  "published" : "2026-03-05T21:49:03Z",
  "aliases" : [ "CVE-2026-30247" ],
  "summary" : "WeKnora is Vulnerable to SSRF via Redirection",
  "details" : "### 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",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/Tencent/WeKnora"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.2.12"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.2.11"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Tencent/WeKnora/security/advisories/GHSA-595m-wc8g-6qgc"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-30247"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Tencent/WeKnora"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-05T21:49:03Z",
    "nvd_published_at" : "2026-03-07T04:15:54Z"
  }
}