The Risks section of doc/REST-interface.md describes the wrong way for a web page to read the REST interface.
It says a page can read the node with <script src="http://127.0.0.1:8332/rest/tx/....json">. A JSON object is not a valid script, so that reads nothing. The server accepts any Host header. A page whose domain name is later made to resolve to 127.0.0.1 (DNS rebinding) can therefore read the interface with same-origin requests. I changed the text to say that. A Host check would also stop this, but it needs a list of allowed names, so I left it out. I checked that a REST request with Host: evil.example gets a 200. I did not run a rebinding page.
This is one of several PRs from a large audit of Bitcoin Core that I did with the help of LLM tools. The audit produced its evidence all at once, which is why the PRs arrive together. I understand each change fully and will answer review questions myself.