hermes-agent/web/src
Teknium 99bcc2de5b
fix(security): harden dashboard API against unauthenticated access (#9800)
Addresses responsible disclosure from FuzzMind Security Lab (CVE pending).

The web dashboard API server had 36 endpoints, of which only 5 checked
the session token. The token itself was served from an unauthenticated
GET /api/auth/session-token endpoint, rendering the protection circular.
When bound to 0.0.0.0 (--host flag), all API keys, config, and cron
management were accessible to any machine on the network.

Changes:
- Add auth middleware requiring session token on ALL /api/ routes except
  a small public whitelist (status, config/defaults, config/schema,
  model/info)
- Remove GET /api/auth/session-token endpoint entirely; inject the token
  into index.html via a <script> tag at serve time instead
- Replace all inline token comparisons (!=) with hmac.compare_digest()
  to prevent timing side-channel attacks
- Block non-localhost binding by default; require --insecure flag to
  override (with warning log)
- Update frontend fetchJSON() to send Authorization header on all
  requests using the injected window.__HERMES_SESSION_TOKEN__

Credit: Callum (@0xca1x) and @migraine-sudo at FuzzMind Security Lab
2026-04-14 10:57:56 -07:00
..
components feat(web): re-apply dashboard UI improvements on top of i18n 2026-04-14 10:23:43 -04:00
hooks feat: web UI dashboard for managing Hermes Agent (#8756) 2026-04-12 22:26:28 -07:00
i18n fix(web): i18n fixes for sidebar and dropdown labels 2026-04-14 10:32:51 -04:00
lib fix(security): harden dashboard API against unauthenticated access (#9800) 2026-04-14 10:57:56 -07:00
pages fix(web): i18n fixes for sidebar and dropdown labels 2026-04-14 10:32:51 -04:00
App.tsx feat(web): re-apply dashboard UI improvements on top of i18n 2026-04-14 10:23:43 -04:00
index.css feat: react-router, sidebar layout, sticky header, dropdown component, remove emojis, rounded corners 2026-04-14 00:01:18 -04:00
main.tsx feat(web): re-apply dashboard UI improvements on top of i18n 2026-04-14 10:23:43 -04:00