Summary
Lavish's loopback HTTP server accepts requests without authentication or Host and Origin validation, and a session route accepts a caller-selected file path. A website visited while the server is running may use DNS rebinding to read files accessible to the server process or, under certain conditions, queue text for an active agent session.
Affected context
The issue affects Lavish deployments where the loopback HTTP server is running and reachable from a browser. Its session, artifact, prompt, and polling routes do not authenticate requests or validate Host and Origin values; the session route also uses a caller-provided file path. A malicious website can attempt to reach the local service through DNS rebinding, with file disclosure possible for paths readable by the server process.
Exploit preconditions
- Attack surface: The Lavish loopback HTTP server and its session, artifact, and prompt routes
- Required access: The victim must visit an attacker-controlled website while the local server is running; no existing session is required for file disclosure
- Trigger point: Browser-originated requests reach the local service, including a session request followed by an artifact request
- Why exploitation is possible: The service does not authenticate requests or validate Host and Origin values, and accepts a caller-selected file path. Prompt queueing additionally requires an active agent session and a known or guessed artifact path.
Why this happens
The server trusts browser requests to a local service without establishing that they come from an authorized client. It also accepts externally controlled path values when creating sessions, allowing a caller to influence which file the server reads. This primarily maps to CWE-73: External Control of File Name or Path; missing authentication and improper origin validation are also relevant (CWE-306 and CWE-346).
Potential impact
- An attacker may disclose files readable by the Lavish server process.
- Sensitive local configuration or data could be exposed, depending on the process's file permissions.
- An attacker could queue text for an active agent session if the required session details are known or guessed.
- Information obtained from files could support further attacks against the user or their environment.
General mitigation guidance
Defensive patterns include requiring authentication for sensitive local-service routes and validating request origins and hostnames rather than assuming loopback requests are trusted. Avoid using caller-controlled paths to select files; where file selection is necessary, constrain access to an explicit, narrowly scoped set of files and validate paths against that boundary. Reduce the service process's filesystem and agent privileges, and limit which interfaces and browser contexts can reach the service.
How teams detect issues like this
Review local HTTP routes for missing authentication and for trust decisions based solely on loopback binding. Use static analysis and code review to identify caller-controlled values flowing into file access operations, as well as absent Host and Origin checks on state-changing or data-returning routes. Test security policies for browser access to local services, and monitor for unexpected requests, file reads, or prompt submissions.

