Using XSS to execute PHP Code

Viewed 2025

INTRO

I was reading a report on hackerone.com and someone submitted an XSS bug, which uses Wordpress stream function, to Uber. First he displayed a simple alert box, but later he displayed custom php code, phpinfo();, which gets executed.

Question

I can not comprehend how someone could use XSS to execute php, I thought that was impossible. Or is it just a special case because the stream function is able to overwrite some php scripts? If so, is the BeEF framework / XSS-Shell one of the most powerful things of XSS or could one accomplish more in normal cases (like, XSS on a forum or something).

THE POC

See this hackerone report.

OUTRO

Could someone please explain this to me? Thanks!

1 Answers
Related