You may have even more luck if your input gets injected into a prompt that gets executed by an agent having internet access.
Re security, there are many pdf viewers, so the rewrites exist, and some of them do not have the js execution engine and all that jazz that opens up all sorts of potential exploits.