{"vuln_id":"CVE-2026-77463","aliases":["GHSA-56x6-q882-mf27"],"description":"Remark42: Rate limit bypass via unconditional trust of X-Forwarded-For/X-Real-IP headers in direct-internet deployment","published_at":"2026-11-09T21:18:29Z","modified_at":"2026-11-23T20:40:46.861312Z","first_seen_at":"2026-11-23T21:06:31.548292Z","severity":"medium","severity_source":"native","cvss_score":6.5,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L","cwe":["CWE-348","CWE-807"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00297,"epss_percentile":0.22705,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-77463"},"matched_alias":null,"items":[{"id":16658,"source":{"id":"osv","name":"OSV.dev"},"title":"GO-2026-6945: Remark42: Rate limit bypass via unconditional trust of X-Forwarded-For/X-Real-IP headers in direct-internet deployment in github.com/umputun/remark42","summary":"Remark42: Rate limit bypass via unconditional trust of X-Forwarded-For/X-Real-IP headers in direct-internet deployment in github.com/umputun/remark42.\n\nNOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.\n\n(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)\n\nThe additional affected modules and versions are: .\n\nAffected: Go:github.com/umputun/remark42, Go:github.com/umputun/remark42/backend\n\nFixed in: 1.16.2\n\nReferences:\nhttps://github.com/umputun/remark42/security/advisories/GHSA-56x6-q882-mf27\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-77463\nhttps://github.com/umputun/remark42/commit/b1502801facd7782a1c70fd51f8ad5c2eb650d39\nhttps://github.com/umputun/remark42/commit/e62b3c830d81659cf5d2687b0c8261da7d42fdab\nhttps://github.com/umputun/remark42/pull/2116\nhttps://github.com/umputun/remark42/pull/2118\nhttps://github.com/umputun/remark42/releases/tag/backend/v1.16.2\nhttps://remark42.com/docs/configuration/parameters/#trusted-proxies-and-client-ip","url":"https://osv.dev/vulnerability/GO-2026-6945","published_at":"2026-11-23T20:02:42Z","updated_at":"2026-11-23T20:30:12.539345Z","fetched_at":"2026-11-23T21:06:31.109650Z","severity":"medium","cvss_score":6.5,"epss":0.00297,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/umputun/remark42","vuln_id":"CVE-2026-77463","vuln_ids":["CVE-2026-77463","GHSA-56X6-Q882-MF27","GO-2026-6945"],"tags":["osv","go","fix-available"],"cluster_id":14785,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/16658","html":"https://vulnwatch.ve1ve2.com/item/16658"}},{"id":16595,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-56x6-q882-mf27: Remark42: Rate limit bypass via unconditional trust of X-Forwarded-For/X-Real-IP headers in direct-internet deployment","summary":"Remark42: Rate limit bypass via unconditional trust of X-Forwarded-For/X-Real-IP headers in direct-internet deployment\n\n### Summary\nRemark42 applied chi's `middleware.RealIP` globally, trusting `True-Client-IP` / `X-Real-IP` / `X-Forwarded-For` headers without verifying the request came from a trusted proxy. The per-IP rate limiters key on the overwritten `r.RemoteAddr`, so any client can bypass every per-IP rate limiter by rotating spoofed IP headers. The same spoofed IP also drives other per-IP controls (stored comment IP, anonymous identity derivation, and `--votes-ip` vote de-duplication). This affects deployments reachable directly from the internet (Remark42's built-in HTTP, static TLS, and ACME modes are all documented and supported), as well as any proxied deployment where the proxy forwards an attacker-controlled recognised header.\n\n### Details\nThe router applies `middleware.RealIP` globally, ahead of the per-route limiters, without any check that the server is behind a trusted proxy (in v1.16.1, `backend/app/rest/api/rest.go:207`).\n\nThe `rateLimiter` function (v1.16.1, `backend/app/rest/api/rest.go:769-779`) builds a tollbooth limiter with `IPLookup{Name: \"RemoteAddr\"}`, which reads `r.RemoteAddr`. Since chi's `middleware.RealIP` (v1.16.1, `backend/vendor/github.com/go-chi/chi/v5/middleware/realip.go:42-55`) unconditionally overwrites `r.RemoteAddr` from `True-Client-IP > X-Real-IP > first X-Forwarded-For` (accepting any syntactically valid IP), any client can set its apparent IP to an arbitrary value.\n\nThis bypasses every per-IP rate limiter that runs after `RealIP`: `/auth` (2/s), avatars (100/s), the image proxy (10/s), open / protected / admin route groups (10/s), root routes (50/s), and `/web/*` (20/s). Comment and vote creation go through the update limiter, whose server default is `UPDATE_LIMIT=0.5`/s (burst 1), not 10/s. The global 1,000 concurrent-request throttle still applies, so this is a per-IP-limit bypass rather than truly unlimited throughput. chi's own documentation warns that `middleware.RealIP` should be used only behind a trusted proxy.\n\n### PoC\n```bash\n# Deploy Remark42 reachable directly from the internet (built-in HTTP / TLS / ACME, no proxy that overwrites the headers).\n# Comment creation is limited to UPDATE_LIMIT (default 0.5/s, burst 1) per IP.\n\n# Rotate X-Real-IP across many requests; each distinct value gets its own token bucket.\nfor i in $(seq 1 100); do\n  curl -s -o /dev/null -w '%{http_code}\\n' \\\n    -H \"X-Real-IP: 192.0.2.$i\" \\\n    -X POST 'https://remark42.example.com/api/v1/comment?site=site1' \\\n    -H 'Authorization: Bearer YOUR_JWT' \\\n    -H 'Content-Type: application/json' \\\n    -d '{\"text\":\"spam\",\"locator\":{\"site\":\"site1\",\"url\":\"https://example.com/post\"}}'\ndone | sort | uniq -c\n# With rotating headers the responses stay 201; without them, requests beyond the burst return 429.\n```\n\n### Impact\nBy rotating the spoofed client IP an attacker bypasses the per-IP token buckets on all rate-limited endpoints and defeats other per-IP controls, enabling: (a) spam comment creation beyond the configured per-IP limit, (b) confir\n\nAffected: Go:github.com/umputun/remark42, Go:github.com/umputun/remark42/backend\n\nFixed in: 1.16.2\n\nReferences:\nhttps://github.com/umputun/remark42/security/advisories/GHSA-56x6-q882-mf27\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-77463\nhttps://github.com/umputun/remark42/pull/2116\nhttps://github.com/umputun/remark42/pull/2118\nhttps://github.com/umputun/remark42/commit/b1502801facd7782a1c70fd51f8ad5c2eb650d39\nhttps://github.com/umputun/remark42/commit/e62b3c830d81659cf5d2687b0c8261da7d42fdab\nhttps://github.com/umputun/remark42\nhttps://github.com/umputun/remark42/releases/tag/backend/v1.16.2","url":"https://osv.dev/vulnerability/GHSA-56x6-q882-mf27","published_at":"2026-11-09T21:18:29Z","updated_at":"2026-11-23T20:40:46.861312Z","fetched_at":"2026-11-23T21:06:31.109595Z","severity":"medium","cvss_score":6.5,"epss":0.00297,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/umputun/remark42","vuln_id":"CVE-2026-77463","vuln_ids":["CVE-2026-77463","GHSA-56X6-Q882-MF27","GO-2026-6945"],"tags":["osv","go","fix-available"],"cluster_id":14784,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/16595","html":"https://vulnwatch.ve1ve2.com/item/16595"}}]}