A WordPress vulnerability scored 9.2/10 is present in all versions since 2016
Recorded: Sept. 22, 2026, 5 p.m.
| Original | Summarized |
Unauthenticated path traversal in page-template resolution leading to conditional RCE · Advisory · WordPress/wordpress-develop · GitHub Skip to content Navigation MenuSign inAppearance settingsPlatformAI CODE CREATIONGitHub CopilotWrite better code with AIGitHub Copilot appDirect agents from issue to mergeMCP RegistryIntegrate external toolsDEVELOPER WORKFLOWSActionsAutomate any workflowCodespacesInstant dev environmentsIssuesPlan and track workCode ReviewManage code changesCode QualityEnforce quality at mergeAPPLICATION SECURITYGitHub Advanced SecurityFind and fix vulnerabilitiesCode securitySecure your code as you buildSecret protectionStop leaks before they startEXPLOREWhy GitHubDocumentationBlogChangelogMarketplaceView all featuresSolutionsBY COMPANY SIZEEnterprisesSmall and medium teamsStartupsNonprofitsBY USE CASEApp ModernizationDevSecOpsDevOpsCI/CDView all use casesBY INDUSTRYHealthcareFinancial servicesManufacturingGovernmentView all industriesView all solutionsResourcesEXPLORE BY TOPICAISoftware DevelopmentDevOpsSecurityView all topicsEXPLORE BY TYPECustomer storiesEvents & webinarsEbooks & reportsBusiness insightsGitHub SkillsSUPPORT & SERVICESDocumentationCustomer supportCommunity forumTrust centerPartnersView all resourcesOpen SourceCOMMUNITYGitHub SponsorsFund open source developersPROGRAMSSecurity LabMaintainer CommunityGitHub StarsArchive ProgramREPOSITORIESTopicsTrendingCollectionsEnterpriseENTERPRISE SOLUTIONSEnterprise platformAI-powered developer platformAVAILABLE ADD-ONSGitHub Advanced SecurityEnterprise-grade security featuresCopilot for BusinessEnterprise-grade AI featuresPremium SupportEnterprise-grade 24/7 supportPricingSearch/Sign inSign upAppearance settings You signed in with another tab or window. Reload to refresh your session. Dismiss alert WordPress wordpress-develop Public
Notifications
Fork
Star Code Pull requests Actions Security and quality Insights
Additional navigation options
Code Pull requests Actions Security and quality Insights
wordpress-develop
Unauthenticated path traversal in page-template resolution leading to conditional RCE Critical johnbillion Software WordPress Affected versions Patched versions Description An unauthenticated attacker can make get_page_template() page-template resolution include a chosen readable local .php file outside the active theme directories. If relevant pre-conditions for both the server environment and the active theme are met, this can lead to RCE. The active child or parent theme contains a top-level directory whose name starts with page- (e.g. page-templates). This affects the legacy Twenty Twelve and Twenty Fourteen themes, as well as some popular third party themes such as Neve, Hestia, and Sydney. WordPress 7.1.2 has been released containing a fix for the vulnerability, and as a courtesy to users on older branches the fix has been backported to all branches back to 4.7. Severity Critical CVSS overall score This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS). / 10 CVSS v4 base metrics Attack Vector Confidentiality Confidentiality CVSS v4 base metrics Exploitability Metrics Attack Vector: Attack Complexity: Attack Requirements: Privileges Required: User interaction: Vulnerable System Impact Metrics Confidentiality: Integrity: Availability: Subsequent System Impact Metrics Confidentiality: Integrity: Availability: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N CVE ID CVE-2026-87902 Weaknesses Weakness
Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') Footer © 2026 GitHub, Inc. Footer navigation Terms Privacy Security Status Community Docs Contact Manage cookies Do not share my personal information You can’t perform that action at this time. |
An unauthenticated path traversal vulnerability exists in WordPress related to the resolution of page-template files, which permits an attacker to achieve conditional Remote Code Execution (RCE) if specific environmental preconditions are met. This vulnerability, tracked under the identifier GHSA-7hp8-65ch-5whp, is classified as Critical with a CVSS score of 9.2, reflecting a severe potential impact on confidentiality, integrity, and availability. The core mechanism of the vulnerability allows an attacker, without authentication, to manipulate the get_page_template() function to include a locally chosen, readable .php file located outside the active theme directories. For this file inclusion to lead to actual RCE, several specific pre-conditions must be satisfied concerning both the server environment and the active theme structure. Specifically, the vulnerable system must have a theme or child theme containing a top-level directory whose name begins with "page-," which affects certain themes such as Twenty Twelve, Twenty Fourteen, Neve, Hestia, and Sydney. Furthermore, a malicious local .php target file must be present on the server and readable by the web server account. Successful exploitation can leverage known transitions, such as the PEAR to RCE transition, especially when the register_argc_argv function is set to On. The advisory notes that this is particularly relevant when using the official PHP image for Docker or when default cPanel configurations are active with PHP versions prior to 8.5. The vulnerability stems from a weakness categorized as CWE-98, which relates to the Improper Control of Filename for Include/Require Statement in PHP Programs, indicating that the application fails to properly restrict user-supplied input before using it in file inclusion functions. The CVSS v4.0 base metrics detail the high impact across the board for confidentiality, integrity, and availability, coupled with low attack complexity and no privileges or user interaction required for the exploitation (AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H). As a mitigation, WordPress officially released version 7.1.2 to address this issue, and this fix has been backported to all branches all the way down to version 4.7. The advisory emphasizes that users on affected versions should update to the patched versions to secure their systems against this critical remote code execution risk. |