Watch this turns out to be a JS dependency tree problem from some library that was compromised months ago in some NPM module, used in the twitter web interface.
To posit that it was an npm vunrebility in the frontend caused this hack implies that anyone can just curl their way into someone elses account.