CVE-2026-30858: Github.com/Tencent/WeKnora Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-h6gw-8f77-mmmp
CVSS 7.5
CWE-918
Published
Advisory Summary

CVE-2026-30858 is a HIGH (CVSS 7.5) remote code execution vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Github.com/Tencent/WeKnora libraries in the Go ecosystem. The issue involves weknora has dns rebinding vulnerability in web_fetch tool that allows ssrf to internal resources. Remediation is available by upgrading affected packages to version 0.3.0.

CVE-2026-30858 at a Glance

CVE Identifier CVE-2026-30858
GHSA Identifier GHSA-h6gw-8f77-mmmp
Severity HIGH
CVSS v3.1 Base Score 7.5
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: 7.5

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
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-30858

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.3.0
Upgrade github.com/Tencent/WeKnora to 0.3.0
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-30858, 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.3.0), 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 A DNS rebinding vulnerability in the `web_fetch` tool allows an unauthenticated attacker to bypass URL validation and access internal resources on the server, including private IP addresses (e.g., 127.0.0.1, 192.168.x.x). By crafting a malicious domain that resolves to a public IP during validation and subsequently resolves to a private IP during execution, an attacker can access sensitive local services and potentially exfiltrate data. ### Details The vulnerability exists because the `web_fetch` tool lacks complete DNS pinning. The application performs URL validation only once via `validateParams()`, but the URL is then passed unchanged to the `fetchHTMLContent()` function, which eventually reaches `fetchWithChromedp()`. The headless browser (Chromedp) resolves the hostname independently without DNS pinning, allowing a time-of-check-time-of-use (TOCTOU) attack. **Validation phase (first DNS resolution):** ```go if err := t.validateParams(p); err != nil { // Returns error for private IPs results[index] = &webFetchItemResult{ err: err, // ... } return } ``` **Execution phase (second DNS resolution):** The original URL (not the resolved IP) is passed through the execution chain: ```go output, data, err := t.executeFetch(ctx, p) // Calls fetchHTMLContent(ctx, targetURL) where targetURL is the original hostname ``` **Chromedp execution (vulnerable DNS resolution):** ```go func (t *WebFetchTool) fetchWithChromedp(ctx context.Context, targetURL string) (string, error) { // targetURL is not DNS-pinned; browser resolves it independently err := chromedp.Run(ctx, chromedp.Navigate(targetURL), // Third DNS lookup occurs here chromedp.WaitReady("body", chromedp.ByQuery), chromedp.OuterHTML("html", &html), ) } ``` The attacker controls a domain that can be configured to return different DNS responses to different queries, enabling them to bypass the initial private IP check and access restricted resources during the actual fetch. ### PoC **Setup:** 1. Deploy the DNS rebinding server (attached Python file) with the following systemd configuration: ```systemd [Unit] Description=DNS Rebinding Test Server After=network.target [Service] Type=simple User=root WorkingDirectory=/root/Repos/dns-rebinding-server ExecStart=/root/.proto/shims/python -u /root/Repos/dns-rebinding-server/server.py --token aleister1102 --domain aleister.ninja --port 53 --global-tracking --ip1 1.1.1.1 --ip2 0.0.0.0 --first-response-count 1 --reset-time 0 Restart=always RestartSec=3 [Install] WantedBy=multi-user.target ``` This configures the DNS server to: - Return `1.1.1.1` (a public IP) for the first DNS query - Return `127.0.0.1` (localhost) for all subsequent queries - TTL is set to 0 to prevent caching The sequence can also be reset via reset.domain.com (reset to 1.1.1.1). > Note: We may need to reset the sequence as the TOCTOU attack is not truly reliable and needs to be triggered multiple times. 2. Set up a simple HTTP server on the localhost of the backend service: ```bash python -m http.server 8888 ``` 3. Configure the malicious domain to point to the DNS rebinding server **Execution:** 1. Enable web search on an agent. 2. Prompt the agent to fetch content from the attacker-controlled domain (e.g., `http://attacker.example.com`) 3. The sequence of events: - **First DNS query** (validation phase): `attacker.example.com` → `1.1.1.1` ✓ Passes validation - **Second DNS query** (execution phase): `attacker.example.com` → `127.0.0.1` ✗ Bypass achieved - The `web_fetch` tool successfully connects to `127.0.0.1:8080` and returns the local server's content **Result:** The attacker gains access to the local HTTP server and can read its content, demonstrating that internal resources are now accessible through the rebinding attack. <img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/897e8494-f39e-49ce-a02a-5832bb84a73f" /> PoC video: https://github.com/user-attachments/assets/68daaa87-4b9b-4b6e-b6f6-ee123f5fcda9 ### Impact **Vulnerability Type:** DNS Rebinding / Server-Side Request Forgery (SSRF) **Who is impacted:** - Any user or agent with web search capability can exploit this vulnerability - The vulnerability grants access to internal services, configuration files, metadata services, and other sensitive resources normally restricted to the internal network - In cloud environments, this could allow access to metadata endpoints (e.g., AWS IMDSv1) to obtain credentials and secrets\

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

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

References

Frequently Asked Questions

What is CVE-2026-30858?
CVE-2026-30858 is a security vulnerability in Github.com/Tencent/WeKnora involving WeKnora has DNS Rebinding Vulnerability in web_fetch Tool that Allows SSRF to Internal Resources under CWE-918: Server-Side Request Forgery (SSRF).
Which Github.com/Tencent/WeKnora versions are affected?
Affected versions include releases prior to 0.3.0 across affected packages: github.com/Tencent/WeKnora.
What version fixes CVE-2026-30858?
Upgrading to 0.3.0 (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.3.0. Upgrade your dependency to 0.3.0 or later.
What is the CVSS score of CVE-2026-30858?
CVE-2026-30858 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-30858?
CVE-2026-30858 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-30858?
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-h6gw-8f77-mmmp",
  "modified" : "2026-03-09T13:21:07Z",
  "published" : "2026-03-06T23:56:22Z",
  "aliases" : [ "CVE-2026-30858" ],
  "summary" : "WeKnora has DNS Rebinding Vulnerability in web_fetch Tool that Allows SSRF to Internal Resources",
  "details" : "### Summary\n\nA DNS rebinding vulnerability in the `web_fetch` tool allows an unauthenticated attacker to bypass URL validation and access internal resources on the server, including private IP addresses (e.g., 127.0.0.1, 192.168.x.x). By crafting a malicious domain that resolves to a public IP during validation and subsequently resolves to a private IP during execution, an attacker can access sensitive local services and potentially exfiltrate data.\n\n### Details\n\nThe vulnerability exists because the `web_fetch` tool lacks complete DNS pinning. The application performs URL validation only once via `validateParams()`, but the URL is then passed unchanged to the `fetchHTMLContent()` function, which eventually reaches `fetchWithChromedp()`. The headless browser (Chromedp) resolves the hostname independently without DNS pinning, allowing a time-of-check-time-of-use (TOCTOU) attack.\n\n**Validation phase (first DNS resolution):**\n```go\nif err := t.validateParams(p); err != nil {\n    // Returns error for private IPs\n    results[index] = &webFetchItemResult{\n        err: err,\n        // ...\n    }\n    return\n}\n```\n\n**Execution phase (second DNS resolution):**\nThe original URL (not the resolved IP) is passed through the execution chain:\n```go\noutput, data, err := t.executeFetch(ctx, p)\n// Calls fetchHTMLContent(ctx, targetURL) where targetURL is the original hostname\n```\n\n**Chromedp execution (vulnerable DNS resolution):**\n```go\nfunc (t *WebFetchTool) fetchWithChromedp(ctx context.Context, targetURL string) (string, error) {\n    // targetURL is not DNS-pinned; browser resolves it independently\n    err := chromedp.Run(ctx,\n        chromedp.Navigate(targetURL),  // Third DNS lookup occurs here\n        chromedp.WaitReady(\"body\", chromedp.ByQuery),\n        chromedp.OuterHTML(\"html\", &html),\n    )\n}\n```\n\nThe attacker controls a domain that can be configured to return different DNS responses to different queries, enabling them to bypass the initial private IP check and access restricted resources during the actual fetch.\n\n### PoC\n\n**Setup:**\n1. Deploy the DNS rebinding server (attached Python file) with the following systemd configuration:\n\n```systemd\n[Unit]\nDescription=DNS Rebinding Test Server\nAfter=network.target\n\n[Service]\nType=simple\nUser=root\nWorkingDirectory=/root/Repos/dns-rebinding-server\nExecStart=/root/.proto/shims/python -u /root/Repos/dns-rebinding-server/server.py --token aleister1102 --domain aleister.ninja --port 53 --global-tracking --ip1 1.1.1.1 --ip2 0.0.0.0 --first-response-count 1 --reset-time 0\nRestart=always\nRestartSec=3\n\n[Install]\nWantedBy=multi-user.target\n ```\n \n This configures the DNS server to:\n - Return `1.1.1.1` (a public IP) for the first DNS query\n - Return `127.0.0.1` (localhost) for all subsequent queries\n - TTL is set to 0 to prevent caching\n \n The sequence can also be reset via reset.domain.com (reset to 1.1.1.1).\n \n > Note: We may need to reset the sequence as the TOCTOU attack is not truly reliable and needs to be triggered multiple times.\n\n2. Set up a simple HTTP server on the localhost of the backend service:\n\n ```bash\n python -m http.server 8888\n ```\n\n3. Configure the malicious domain to point to the DNS rebinding server\n\n**Execution:**\n1. Enable web search on an agent.\n2. Prompt the agent to fetch content from the attacker-controlled domain (e.g., `http://attacker.example.com`)\n3. The sequence of events:\n   - **First DNS query** (validation phase): `attacker.example.com` → `1.1.1.1` ✓ Passes validation\n   - **Second DNS query** (execution phase): `attacker.example.com` → `127.0.0.1` ✗ Bypass achieved\n   - The `web_fetch` tool successfully connects to `127.0.0.1:8080` and returns the local server's content\n\n**Result:**\nThe attacker gains access to the local HTTP server and can read its content, demonstrating that internal resources are now accessible through the rebinding attack.\n\n<img width=\"1920\" height=\"1080\" alt=\"image\" src=\"https://github.com/user-attachments/assets/897e8494-f39e-49ce-a02a-5832bb84a73f\" />\n\nPoC video:\n\nhttps://github.com/user-attachments/assets/68daaa87-4b9b-4b6e-b6f6-ee123f5fcda9\n\n### Impact\n**Vulnerability Type:** DNS Rebinding / Server-Side Request Forgery (SSRF)\n\n**Who is impacted:**\n- Any user or agent with web search capability can exploit this vulnerability\n- The vulnerability grants access to internal services, configuration files, metadata services, and other sensitive resources normally restricted to the internal network\n- In cloud environments, this could allow access to metadata endpoints (e.g., AWS IMDSv1) to obtain credentials and secrets\\",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/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.3.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.2.14"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Tencent/WeKnora/security/advisories/GHSA-h6gw-8f77-mmmp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-30858"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Tencent/WeKnora"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-06T23:56:22Z",
    "nvd_published_at" : "2026-03-07T17:15:53Z"
  }
}