If you've got rogue software running on your machine, all bets are off.
Not necessarily. It could be running in a sandbox, or as unprivileged user, and accessing your app's API over localhost would allow for privilege escalation.
I see your point. But in my book, that's still rogue software. And that's a terrible sandbox. :)
What about other, potentially unprivileged software running on your machine that can?