Skip to content

0.2.2

Choose a tag to compare

@RobbyV2 RobbyV2 released this 27 Oct 23:55
· 370 commits to main since this release

A security fix for self-hosted deployments.

Fixed

  • Next.js no longer listens publicly. RChat runs Next.js behind its Rust server. Until now, both used the same HOST setting, so HOST=0.0.0.0 (needed to make the site public) also opened Next.js's own port (3001 by default) to the internet. Requests there skipped the Rust server and its request guard, so scanners probing for the React Server Components bug ("React2Shell", CVE-2025-55182) could reach Next.js directly. Your logs would show "Failed to find Server Action".

    RChat itself isn't affected by that bug, since it has no server actions and its React is patched. But Next.js should only be reachable through the Rust server.

    • New FRONTEND_HOST setting. It controls where Next.js listens and defaults to 127.0.0.1. It is used by just src dev, just src prod, just src start-prod and the container entrypoint. HOST now only controls the Rust server.
    • Frontend-only modes (just src frontend, frontend-prod) still listen on HOST, since Next.js is meant to be reached directly there.
    • Dev mode ignored the setting and always listened on every interface. It now passes the address with next dev -H.

If you self-host

Update and restart. Until you can, block port 3001 (or your PORT) in your firewall. You can check what's exposed with ss -ltnp | grep 3001: it should show 127.0.0.1:3001.