Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2017-20289 Overview
CVE-2017-20289 is a local file inclusion (LFI) vulnerability in the Broadstreet Ad Widget plugin for WordPress, affecting versions 2.2.0 through 2.11.x. The flaw resides in views/modal/index.php, where the plugin passes unsanitized user input from the step parameter directly to a PHP require statement. Authenticated attackers can supply directory traversal sequences, optionally terminated with a null byte, to include arbitrary local files and execute PHP code within the WordPress process. The Shadowserver Foundation first observed exploitation evidence on 2023-10-19, and public exploit tooling exists in the form of a Nuclei template and a Packet Storm advisory.
Critical Impact
Authenticated WordPress users can execute attacker-controlled PHP by abusing the step parameter, leading to full site compromise.
Affected Products
- Broadstreet Ad Widget plugin for WordPress, versions 2.2.0 through 2.11.x
- WordPress sites with the plugin installed and any authenticated user role capable of reaching the vulnerable admin view
- Fixed in Broadstreet Ad Widget version 2.12.0
Discovery Timeline
- 2026-10-22 - CVE-2017-20289 published to NVD
- 2026-10-22 - Last updated in NVD database
Technical Details for CVE-2017-20289
Vulnerability Analysis
The vulnerability is a classic PHP file inclusion flaw mapped to [CWE-98] (Improper Control of Filename for Include/Require Statement in PHP Program). The file views/modal/index.php consumes the step HTTP parameter and concatenates it into a require call without sanitization or allowlisting. An attacker who holds a valid WordPress session can therefore control which local file the plugin loads into the PHP interpreter.
Because included files are executed as PHP, any includable file containing attacker-influenced data becomes a code execution primitive. Common escalation paths include including log files, uploaded media, session files, or WordPress configuration artifacts that contain controllable strings. The Shadowserver Foundation has recorded exploitation attempts in the wild since October 2023.
Root Cause
The root cause is unsafe use of a dynamic require on user-controlled input. The plugin does not restrict the step value to a fixed allowlist of view names, does not strip path separators, and does not reject null bytes on legacy PHP versions. The vendor fix landed in WordPress plugin trac changeset 1628751, which constrains the parameter to known-good values before including the view file.
Attack Vector
An authenticated user issues a request to the Broadstreet Ad Widget admin endpoint with a crafted step parameter. The payload uses ../ directory traversal sequences to escape the intended view directory and reference an arbitrary file on disk. On PHP builds that honor null-byte truncation, appending %00 lets the attacker drop any suffix the plugin appends. The server then evaluates the target file as PHP, which yields remote code execution in the context of the web server user. Detailed proof-of-concept requests are documented in the Packet Storm advisory, the CXSecurity WLB-2017100084 entry, and the Nuclei ad-widget-lfi template.
No verified exploit code is reproduced here. Refer to the linked references for the sanitized request structure.
Detection Methods for CVE-2017-20289
Indicators of Compromise
- HTTP requests to WordPress admin endpoints containing the parameter step with ../ sequences or a %00 null byte
- Access log entries referencing ad-widget or views/modal/index.php paired with traversal payloads
- Unexpected PHP execution originating from wp-content/plugins/ad-widget/ paths
- Outbound connections or new administrative users created shortly after suspicious step parameter traffic
Detection Strategies
- Deploy the projectdiscovery Nuclei template for ad-widget LFI to validate exposure against known-vulnerable installs
- Write web application firewall rules that block step values containing path separators, .., or non-printable characters
- Correlate authenticated session activity with abnormal file read patterns on wp-config.php, /etc/passwd, or PHP session storage
Monitoring Recommendations
- Enable PHP open_basedir restrictions and monitor violations through PHP error logs
- Alert on web server processes spawning shells or writing new PHP files under wp-content/uploads/
- Track plugin inventory to detect Broadstreet Ad Widget installs below version 2.12.0 across all managed WordPress sites
How to Mitigate CVE-2017-20289
Immediate Actions Required
- Upgrade Broadstreet Ad Widget to version 2.12.0 or later on every WordPress site, as published on the plugin's WordPress.org page
- Audit WordPress user accounts and revoke sessions for low-trust authenticated roles that could reach the vulnerable endpoint
- Review web server and PHP error logs since 2023-10-19 for traversal payloads targeting the step parameter
Patch Information
The upstream fix is published in WordPress plugin trac changeset 1628751 and shipped in version 2.12.0. Additional advisory context is available in the WPScan entry caca21fe and the VulnCheck advisory for Broadstreet LFI.
Workarounds
- Deactivate and remove the Broadstreet Ad Widget plugin until the upgrade is applied
- Block requests to wp-content/plugins/ad-widget/views/modal/index.php at the reverse proxy or WAF layer
- Set PHP allow_url_include=Off and configure open_basedir to restrict includes to the WordPress document root
# Example WAF rule (ModSecurity) blocking traversal and null-byte payloads in the step parameter
SecRule ARGS:step "@rx (\.\./|%00|\\x00)" \
"id:1020289,phase:2,deny,status:403,log,\
msg:'CVE-2017-20289 Broadstreet Ad Widget LFI attempt'"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

