Summary
OpenChamber 1.11.7 exposes the /api/system/shutdown endpoint before authentication middleware is applied, allowing unauthenticated remote requests to terminate the server process. This can disrupt active AI coding sessions and prevent legitimate remote users from accessing the service, even when UI_PASSWORD is configured.
Affected context
The vulnerability occurs in OpenChamber deployments where the Express application registers the shutdown route before the authentication middleware in bootstrap-runtime.js. Because the route can be reached without credentials, externally reachable instances may be vulnerable regardless of whether password-based UI authentication is enabled.
Exploit preconditions
- Attack surface: Network-accessible OpenChamber HTTP API
- Required access: No authentication or valid user credentials are required
- Trigger point: A POST request to
/api/system/shutdown - Why exploitation is possible: Route registration order allows the shutdown handler to execute before authentication middleware evaluates the request
Why this happens
The underlying flaw is a missing authentication check on a security-sensitive administrative function. Express evaluates route handlers according to registration and middleware order; placing the shutdown endpoint before the authentication middleware creates an unauthenticated execution path. This maps to CWE-306: Missing Authentication for Critical Function, because a function capable of stopping the service is available without verifying the caller's identity.
Potential impact
- The server process may be terminated by an unauthenticated remote attacker
- Active AI coding sessions could be interrupted
- Legitimate remote users may be locked out of the service
- Automated workflows depending on the server could be disrupted
- Repeated requests could cause persistent or recurring denial of service
General mitigation guidance
Mitigation generally focuses on ensuring that every administrative or service-control operation is protected by authentication and authorization before its handler runs.
Common defensive patterns include:
- Applying authentication middleware before registering sensitive routes
- Requiring explicit authorization for shutdown and other lifecycle operations
- Keeping administrative endpoints on a restricted management interface
- Reducing network exposure through access controls and trusted proxies
- Separating operational controls from general user-facing routes
- Running the service with only the privileges required for its intended function
- Testing middleware ordering and unauthenticated access behavior in automated checks
How teams detect issues like this
Detection can include static analysis and review checks that identify sensitive Express routes registered before authentication middleware. Code reviews should examine route ordering, middleware scope, and whether lifecycle-control endpoints have explicit authorization checks.
Runtime testing can verify that unauthenticated requests to shutdown, restart, maintenance, and diagnostic endpoints are rejected. Network monitoring and policy enforcement may also flag unexpected requests to administrative API paths or repeated service termination events. Automated security review tools can help identify missing middleware coverage when route and authorization relationships are analyzable.

