CVE-2026-87791 Overview
CVE-2026-87791 is a path traversal vulnerability [CWE-22] in the WordPress Design Scuole Italia theme. The flaw resides in the reserved_file_check function within functions.php. An unauthenticated remote attacker can abuse the function to download arbitrary files accessible to the web server process. Successful exploitation exposes source code, configuration files, and secrets stored on the underlying host. The theme is maintained by the Italian government and widely deployed on Italian school websites, expanding the potential blast radius.
Critical Impact
Unauthenticated attackers can read sensitive files such as wp-config.php, exposing database credentials and WordPress secret keys.
Affected Products
- WordPress Design Scuole Italia theme (italia/design-scuole-wordpress-theme)
- Deployments of the theme on WordPress sites operated by Italian schools
- Any WordPress instance shipping the vulnerable functions.phpreserved_file_check implementation
Discovery Timeline
- 2026-09-15 - CVE-2026-87791 published to NVD
- 2026-09-15 - Last updated in NVD database
Technical Details for CVE-2026-87791
Vulnerability Analysis
The reserved_file_check function in functions.php accepts a user-controlled file path and returns the file contents without validating that the path stays inside an allowed directory. An attacker supplies traversal sequences such as ../ to escape the intended location and reach arbitrary files readable by the web server user. Because the endpoint requires no authentication, exploitation reduces to a single HTTP request against a vulnerable site.
Disclosed files typically include the WordPress configuration file, .htaccess, log files, backup archives, and any credentials the PHP process can read. Recovered database credentials and authentication keys frequently enable follow-on account takeover of the WordPress installation.
Root Cause
The root cause is missing input sanitization on the file path argument consumed by reserved_file_check. The function does not canonicalize the requested path, does not enforce an allowlist directory, and does not reject traversal metacharacters. This maps directly to [CWE-22] Improper Limitation of a Pathname to a Restricted Directory.
Attack Vector
Exploitation occurs over the network with low attack complexity and no privileges or user interaction. An attacker issues a crafted HTTP request to the theme endpoint invoking reserved_file_check with a traversal payload targeting a sensitive file. The web server returns the file contents in the HTTP response, completing the disclosure.
Refer to the ACN Vulnerability Report on WordPress Theme and the GitHub Design Theme Repository for source-level context.
Detection Methods for CVE-2026-87791
Indicators of Compromise
- HTTP requests to theme URLs containing ../, ..%2f, or encoded traversal sequences in query parameters targeting reserved_file_check.
- Successful 200 OK responses returning content matching signatures of wp-config.php, /etc/passwd, or PHP source code.
- Anomalous outbound reads of sensitive files by the PHP-FPM or Apache worker process on hosts running the Design Scuole Italia theme.
Detection Strategies
- Deploy web application firewall rules that block traversal metacharacters in requests to theme endpoints.
- Correlate access logs for requests referencing the vulnerable function name with abnormally sized response payloads.
- Monitor file access telemetry for the web server process reading files outside the WordPress webroot.
Monitoring Recommendations
- Alert on repeated 200 responses to unauthenticated requests carrying encoded traversal patterns.
- Track new user agents or source IPs probing WordPress theme paths across the estate.
- Baseline legitimate read access by the web server user and alert on deviations toward configuration or credential files.
How to Mitigate CVE-2026-87791
Immediate Actions Required
- Update the Design Scuole Italia theme to the latest release published in the GitHub Design Theme Repository.
- Rotate WordPress database credentials and authentication salts in wp-config.php if disclosure is suspected.
- Audit web server access logs for prior exploitation attempts referencing reserved_file_check or traversal payloads.
Patch Information
Refer to the GitHub Design Theme Repository for the fixed release and to the ACN Vulnerability Report on WordPress Theme for the coordinated disclosure notice. Apply the vendor patch that adds path canonicalization and directory allowlisting to reserved_file_check.
Workarounds
- Disable the Design Scuole Italia theme until the patched version is installed.
- Block requests containing traversal sequences at the reverse proxy or WAF layer.
- Restrict file system permissions so the web server user cannot read wp-config.php beyond what WordPress requires.
# Example WAF rule fragment blocking path traversal on theme endpoints
# ModSecurity-style pseudo-rule
SecRule REQUEST_URI "@contains reserved_file_check" \
"chain,deny,status:403,id:1026087791,msg:'Blocked CVE-2026-87791 traversal attempt'"
SecRule ARGS "@rx (\.\./|\.\.%2f|%2e%2e/)" "t:lowercase,t:urlDecodeUni"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

