CVE-2026-87902: how close is your WordPress to remote code execution?
A security flaw in WordPress allows attackers to run code without an account, affecting versions released over the past decade.
Overview
WordPress 7.1.2 was released on September 22 to fix a serious security flaw called CVEThe public tracking code assigned to a specific known security flaw in software or hardware-2026-87902. This bug allows anyone to access files on a serverA computer or program on a network that stores data and responds to requests from client devices without needing an account, which affects every version of the software back to 4.7.0. The problem exists in the get_page_template() function, where a filename is created from the URLThe full web address used to locate a specific page, file, or resource on the internet without proper validationChecking that data sent by a user matches the expected format and size before using it. Although a security check called validate_file() is used for other filenames, it is skipped for this specific one. An attacker can use a urldecode() call to turn a harmless string into a path that reads files, and if the server has register_argc_argv enabled, they can execute code. This setting is common in official PHPA widely used server-side scripting language that builds dynamic web pages before sending them to browsers Docker images and cPanel setups running versions older than PHP 8.5, meaning many standard server configurationsA text file that stores settings, network addresses, and options for how a program or server runs are vulnerable to this attack.
Terms in this story
- CVE
- The public tracking code assigned to a specific known security flaw in software or hardware. Every cataloged software flaw gets a unique CVE label so security teams, vendors, and news reports can talk about the exact same bug without confusion. Security+ objective 2.3 lists the term
- server
- A computer or program on a network that stores data and responds to requests from client devices. Online stores, email systems, and multiplayer games all run on servers in data centers or the cloud, making unpatched servers a primary target for intruders.
- URL
- The full web address used to locate a specific page, file, or resource on the internet. Security filters inspect every URL in an incoming message to see whether the domain name is a newly registered lookalike or points to a known credential-harvesting server. Security+ objective 4.5 lists the term
- validation
- Checking that data sent by a user matches the expected format and size before using it. Many injection and overflow vulnerabilities happen because a program skips input validation and trusts whatever string or file size an outside user sends. Security+ objective 4.1 lists the term
- PHP
- A widely used server-side scripting language that builds dynamic web pages before sending them to browsers. Because millions of websites and content management systems run on PHP, a newly discovered vulnerability in the PHP engine can put a huge portion of the web at risk.
- configuration
- A text file that stores settings, network addresses, and options for how a program or server runs. Attackers who gain read access to a server look for its configuration file first because it often contains database passwords, API keys, and internal server paths.
- remote code execution
- A flaw that lets an attacker run their own code on someone else's computer over a network. This is one of the most dangerous bug classes in the news because an attacker across the internet can send a crafted request and take control of a server.
- unauthenticated
- Done without logging in or holding a valid account on the target system. An unauthenticated flaw is especially urgent in the news because any stranger on the internet can trigger it without needing a username or password first.
- code execution
- A flaw that lets an attacker run any commands or program they choose on the target machine. When an advisory warns that a bug allows arbitrary code execution, an attacker who triggers the flaw can install malware, read files, or take over the program's account.
- CVSS score
- The standard rating scale used to score how severe a software security flaw is. Security advisories include a CVSS rating from low to critical based on how easy a bug is to exploit and how much damage it allows. Security+ objective 4.3 lists the term
- directory traversal
- A flaw where an attacker uses folder navigation symbols in a file request to read restricted files. If a web server lets users download a picture by name without checking the folder path, an attacker can use path traversal to climb into system folders and read configuration files. Security+ objective 2.4 lists the term
- bit
- 1 binary digit, a 1 or a 0 (a switch that is on or off). Every file, network packet, and cryptographic key in a computer is stored as a long sequence of bits, and key strength is measured by how many bits the key contains. From the CYBR 101 room CYBR 101: Ciphers and encryption (part 1)
This page is a short description made for this site. The article itself, with its author's name and its own link, is on the Security Affairs website. Cite the article, not this page.
Read the full article on Security Affairs (opens in a new tab)
Course connections
Each line below connects this story to a Security+ objective (a skill on CompTIA's Security+ exam, a common first cybersecurity certification), a CYBR 101 week, or a cybersecurity job, and quotes the words that made the connection.
- Kind of story: Vulnerability and patch
"WordPress 7.1.2 shipped on September 22 address an unauthenticated local file inclusion..." Found by reading the article; these exact words are in it - Security+ 2.3 Explain various types of vulnerabilities.
"CVE-2026-87902: how close is your WordPress to..." Found in the headline - Security+ 4.3 Explain various activities associated with vulnerability management.
"CVE-2026-87902: how close is your WordPress to..." Found in the headline - CYBR 101 week 10: the web, cookies, phishing, incident response and logs
"CVE-2026-87902: how close is your WordPress to remote code execution?" Found in the headline - CYBR 101 week 2: the CIA triad, threat actors, risk and CVEs
"CVE-2026-87902: how close is your WordPress to..." Found in the headline - Job skill (from the U.S. Department of Defense list of cybersecurity jobs): Perform secure program testing, review, and/or assessment to identify potential flaws in codes and mitigate vulnerabilities.
"WordPress creates a list of possible template filenames..." Found by reading the article; these exact words are in it - Job skill (from the U.S. Department of Defense list of cybersecurity jobs): Analyze countermeasures and mitigations against potential exploitations of programming language weaknesses and vulnerabilities in system and elements.
"The filename gets built as page-{$pagename}.php..." Found by reading the article; these exact words are in it
How a story is connected to the course, and every objective, week and job role
Same story at other outlets
- U.S. CISA adds WordPress flaw to its Known Exploited Vulnerabilities catalog
- Hackers Actively Exploiting WordPress Vulnerability to Execute Malicious Code
- WordPress patches a critical severity security vulnerability
- Attackers Exploit WordPress CVE-2026-87902 Within Hours of Disclosure
- CVE-2026-87902 in WordPress Enables Conditional RCE
- Critical WordPress Flaw Lets Unauthenticated Attackers Execute Remote Code
- WordPress 7.1.2 fixes critical unauthenticated path traversal vulnerability (CVE-2026-87902)
- Critical WordPress Core Vulnerability Lets Attackers Execute Code Without Logging In