You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Local render server answers any Host header (DNS rebinding) #479
Hi! The local render server accepts any Host header, which leaves it open to DNS rebinding while a render runs. A small fix is ready in #472.
What happened
serveHtmlProgram in packages/provider-html-local/src/server.ts listens on 127.0.0.1 only but answers requests for any Host. A web page whose own hostname is rebound to 127.0.0.1 could read the staged program HTML, media and frames during a render.
What you expected
The server answers only its own 127.0.0.1:<port> origin, which is the only URL Chrome is given.
How to reproduce
While a render (or serveHtmlProgram(root)) is serving, request http://127.0.0.1:<port>/ with Host: attacker.example:<port> or Host: localhost:<port>: both return 200 with the program content.
#472 answers 421 unless Host is exactly 127.0.0.1:<port>. Capture is unaffected (Chrome always uses server.url); the browser-gated capture tests pass. Note: #421 also adds test/server.test.ts, so whichever lands second just keeps both tests.
Activity