logoalt Hacker News

WordPress: Unauthenticated path traversal leading to conditional RCE

68 pointsby vntoktoday at 4:33 PM26 commentsview on HN

Comments

zelphirkalttoday at 6:06 PM

These are the reason, why every easily reachable web server will be spammed with /something/something.php?somearg=someval. If I had to guess, which software on the web has been the most exploitable over all of the web's history, WP would surely be among the top candidates. Maybe right after MS Teams or Sharepoint or some stuff like that.

random_savvtoday at 6:33 PM

I am so happy that I asked Codex to rewrite our website as Hugo templates which allowed us to statically host it and get rid of Wordpress. So much stress gone!

show 1 reply
vntoktoday at 5:18 PM

Ironically, this 9 years old comment on the official documentation page of one of the affected functions perfectly describes both the nature and remediation of this major security flaw:

> Paul Ryan 9 years ago

> Note that locate_template() does not prevent directory traversal attacks, so if you’re passing a user-provided template name to the function, be sure to verify that it’s from one of the three appropriate locations (active theme directory, parent theme directory, or /wp-includes/theme-compat/ directory).

https://developer.wordpress.org/reference/functions/locate_t...

show 1 reply
whycometoday at 5:10 PM

hmm, this may be why i just saw an unexpected update to a very old theme.

system2today at 4:58 PM

pearcmd.php must exist, and register_argc_argv must be on, not common with hosting providers. But I am assuming the other themes and meeting conditions possibly affect a lot of WordPress sites.

show 2 replies
tptacektoday at 5:02 PM

These CVSS scores don't mean anything and it would be better for everyone if they stopped showing up in headlines. This is a somewhat situational Wordpress RCE that impacts only a couple themes.

show 3 replies