{"id":399661,"date":"2026-09-23T19:41:53","date_gmt":"2026-09-23T19:41:53","guid":{"rendered":"https:\/\/bizscoreai.com\/blog\/wordpress-issues-patch-for-critical-flaw-code-execution\/"},"modified":"2026-09-23T19:41:54","modified_gmt":"2026-09-23T19:41:54","slug":"wordpress-issues-patch-for-critical-flaw-code-execution","status":"publish","type":"post","link":"https:\/\/bizscoreai.com\/blog\/wordpress-issues-patch-for-critical-flaw-code-execution\/","title":{"rendered":"WordPress Issues Patch for Critical Flaw That Can Enable Code Execution on Some Servers"},"content":{"rendered":"<p>WordPress site owners can close a critical security hole by updating to the release shipped on September 22, 2026. The fix, WordPress 7.1.2, addresses a flaw that lets an attacker with no account make a site load a PHP file from outside its theme folders. On some servers that can go further and allow the attacker to run their own code. WordPress rates the flaw critical with a CVSS score of 9.2 and has assigned it CVE-2026-87902.<\/p>\n<h2>What the patch fixes<\/h2>\n<p>Every WordPress version from 4.7.0 through 7.1.1 is affected. That includes 7.1.1, which shipped in the September 17 security release, so a site updated less than a week earlier still needs this update. This is a separate flaw from the ones that earlier release fixed.<\/p>\n<p>Reaching the flaw requires no account and no action from a logged-in user. The weakness sits in how WordPress chooses the template file for a page. One of the file names it builds comes from part of the web address, and on affected versions WordPress did not run that value through its own check for ..\/ traversal steps, even though neighboring code already used that check.<\/p>\n<h2>Which version to update to<\/h2>\n<p>The release to install depends on the branch a site runs:<\/p>\n<ul>\n<li>7.1.x updates to 7.1.2<\/li>\n<li>7.0.x updates to 7.0.6<\/li>\n<li>6.9.x updates to 6.9.9<\/li>\n<li>6.8.x updates to 6.8.10<\/li>\n<li>6.7.x updates to 6.7.9<\/li>\n<li>6.6.x updates to 6.6.9<\/li>\n<\/ul>\n<p>WordPress backported the fix to every older branch it still supports as a courtesy, down to 4.7.37. The full list is in the release notes. Sites with automatic background updates enabled will start the update automatically. Others can update from the dashboard under Updates, or download the release from WordPress.org. WordPress does not offer a separate workaround, so updating is the fix.<\/p>\n<h2>Why code execution only happens on some servers<\/h2>\n<p>Loading a local PHP file runs whatever that file already does. Turning that into code of the attacker&#8217;s choosing requires a second condition: the server must already have a PHP file that does something useful when loaded. That is the &#8220;some servers&#8221; in WordPress&#8217;s description, and it is why the flaw does not mean full code execution on every affected site.<\/p>\n<p>Because the template name is built as page-{value}.php, a working attack also needs the active theme to have a top-level folder whose name starts with page-, and the target file has to end in .php. Some themes, including older default WordPress themes, ship a folder that fits, while the current default themes do not.<\/p>\n<h2>How to gauge how close a site is to the worst case<\/h2>\n<p>Security vendor Patchstack, in its own analysis, says two checks tell a site owner how exposed they are: whether the active theme has a top-level folder whose name begins with page-, and whether PHP is running with a setting called register_argc_argv turned on, which a known code-execution technique depends on. Neither is a fix, but both show how close a site is to the worst case. That setting is off by default on PHP 8.5 and on by default on older PHP versions.<\/p>\n<p>The flaw was disclosed privately through WordPress&#8217;s HackerOne program in July. A detailed write-up published when the fix shipped included a proof-of-concept and a self-contained test lab. The demonstrated attack ran code with the privileges of the web-server account, not full control of the server, and was tested against WordPress 7.0.2 in isolated local labs, not the patched release or any live site. Operators who cannot update immediately can reduce the route to code execution by turning register_argc_argv off for web requests and removing unused PEAR components, though neither repairs the underlying flaw.<\/p>\n<p>As of September 22, there were no reports of the flaw being used in attacks, and it had no entry in the U.S. CISA Known Exploited Vulnerabilities catalog.<\/p>\n<h2>FAQ<\/h2>\n<h3>What versions of WordPress are affected by CVE-2026-87902?<\/h3>\n<p>Every WordPress version from 4.7.0 through 7.1.1 is affected. That includes 7.1.1, released on September 17, 2026, so sites updated less than a week earlier still need the new patch.<\/p>\n<h3>Does this flaw allow code execution on every WordPress site?<\/h3>\n<p>No. The flaw allows an unauthenticated attacker to load a PHP file from outside theme folders. Turning that into attacker-chosen code requires the server to already have a PHP file that does something useful when loaded, which is why it only enables code execution on some servers.<\/p>\n<h3>How do I fix the WordPress critical flaw?<\/h3>\n<p>Update to the patched release for the branch you run. WordPress 7.1.2 fixes the 7.1.x branch, with backports down to 4.7.37. WordPress does not offer a separate workaround, so updating is the fix. Sites with automatic background updates enabled will update automatically.<\/p>\n<h2>Related coverage<\/h2>\n<ul>\n<li><a href=\"https:\/\/bizscoreai.com\/blog\/rogue-agent-dialogflow-code-injection-flaw\/\">Rogue Agent: Dialogflow CX Code Injection Flaw Explained<\/a><\/li>\n<\/ul>\n<p><script type=\"application\/ld+json\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"FAQPage\",\"mainEntity\":[{\"@type\":\"Question\",\"name\":\"What versions of WordPress are affected by CVE-2026-87902?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Every WordPress version from 4.7.0 through 7.1.1 is affected. That includes 7.1.1, released on September 17, 2026, so sites updated less than a week earlier still need the new patch.\"}},{\"@type\":\"Question\",\"name\":\"Does this flaw allow code execution on every WordPress site?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"No. The flaw allows an unauthenticated attacker to load a PHP file from outside theme folders. Turning that into attacker-chosen code requires the server to already have a PHP file that does something useful when loaded, which is why it only enables code execution on some servers.\"}},{\"@type\":\"Question\",\"name\":\"How do I fix the WordPress critical flaw?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Update to the patched release for the branch you run. WordPress 7.1.2 fixes the 7.1.x branch, with backports down to 4.7.37. WordPress does not offer a separate workaround, so updating is the fix. Sites with automatic background updates enabled will update automatically.\"}}]}]}<\/script><\/p>\n<hr style=\"margin:2.5em 0 1em;opacity:.35\" \/>\n<p style=\"font-size:.85em;opacity:.7\">This article summarizes reporting from <a href=\"https:\/\/thehackernews.com\/2026\/09\/wordpress-issues-patch-for-critical.html\" target=\"_blank\" rel=\"nofollow noopener\">thehackernews.com<\/a>. See our <a href=\"https:\/\/bizscoreai.com\/blog\/disclaimer\/\">editorial disclaimer<\/a> for how our articles are produced.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress 7.1.2 fixes a critical unauthenticated flaw that can let attackers load PHP files outside theme folders and, on some servers, run their own code.<\/p>\n","protected":false},"author":1,"featured_media":399660,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"WordPress Critical Flaw Patch: Code Execution Fix","rank_math_description":"WordPress 7.1.2 fixes a critical flaw that can enable code execution on some servers. See which version to update to and how to check your exposure.","rank_math_focus_keyword":"wordpress critical flaw","footnotes":""},"categories":[6924],"tags":[],"class_list":["post-399661","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-development"],"elementor_data":null,"elementor_edit_mode":null,"_links":{"self":[{"href":"https:\/\/bizscoreai.com\/blog\/wp-json\/wp\/v2\/posts\/399661","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bizscoreai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bizscoreai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/bizscoreai.com\/blog\/wp-json\/wp\/v2\/comments?post=399661"}],"version-history":[{"count":1,"href":"https:\/\/bizscoreai.com\/blog\/wp-json\/wp\/v2\/posts\/399661\/revisions"}],"predecessor-version":[{"id":399662,"href":"https:\/\/bizscoreai.com\/blog\/wp-json\/wp\/v2\/posts\/399661\/revisions\/399662"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bizscoreai.com\/blog\/wp-json\/wp\/v2\/media\/399660"}],"wp:attachment":[{"href":"https:\/\/bizscoreai.com\/blog\/wp-json\/wp\/v2\/media?parent=399661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bizscoreai.com\/blog\/wp-json\/wp\/v2\/categories?post=399661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bizscoreai.com\/blog\/wp-json\/wp\/v2\/tags?post=399661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}