☠️
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:N/A:N 🐛 CWE-312
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-8474

CVE-2024-8474 Security Advisory in Openvpn
📅 PUBLISHED: 2025-01-06 14:33 UTC 🔄 UPDATED: 2026-08-21 19:37 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: 1.14%
👁️
1.14% probability
28.6× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1552.001
👁️
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: N Integrity None
A: N Availability None
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-8474 is a vulnerability in OpenVPN Connect, the official VPN client for Windows, macOS, and Linux. The flaw allows a local, unauthorized actor to retrieve the clear-text private key of a VPN configuration profile from the application’s log files. This private key can then be used to decrypt captured VPN traffic, compromising the confidentiality of all communications.

The vulnerability exists because OpenVPN Connect, prior to version 3.5.0, logs the configuration profile’s private key in plaintext within the application log. An attacker with local access to the system (e.g., via a compromised user account or malware) can read this log file and extract the key.

Impact: An attacker who gains local access to a system running an affected version of OpenVPN Connect can:

  • Extract the private key from the application log.
  • Decrypt any previously captured or future VPN traffic.
  • Impersonate the VPN server or client, leading to man-in-the-middle attacks.

Affected Versions: All versions of OpenVPN Connect before 3.5.0.

Patch: Upgrade to OpenVPN Connect version 3.5.0 or later.

⚡ 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

CVSS Breakdown & Threat Level

CVSS v3.1 Score: 5.5 (Medium)

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

  • Attack Vector (AV): Local (L) – The attacker must have local access to the system.
  • Attack Complexity (AC): Low (L) – No special conditions are required; the log file is readable by the user.
  • Privileges Required (PR): Low (L) – The attacker needs only user-level privileges to read the log file.
  • User Interaction (UI): None (N) – No user interaction is required beyond the attacker reading the log.
  • Scope (S): Unchanged (U) – The vulnerability does not affect other components.
  • Confidentiality (C): High (H) – The private key is fully exposed, allowing decryption of all VPN traffic.
  • Integrity (I): None (N) – The vulnerability does not allow modification of data.
  • Availability (A): None (N) – The vulnerability does not affect system availability.

Threat Level: Medium. While the CVSS score is moderate, the impact on confidentiality is severe. The attack requires local access, which reduces the likelihood of remote exploitation but makes it a significant risk in shared or multi-user environments.

Deep Dive & Mechanics

The vulnerability stems from a logging misconfiguration in OpenVPN Connect. When a user imports a VPN configuration profile (typically an .ovpn file), the application processes the file and, in debug or standard logging modes, writes the entire configuration to the log file. This includes the <cert> and <key> tags, which contain the private key in plaintext.

Root Cause: The application does not sanitize or redact sensitive fields (like private keys) before writing them to the log. The log file is stored in a user-accessible location (e.g., %LOCALAPPDATA%\OpenVPN Connect\logs\ on Windows, ~/Library/Logs/OpenVPN Connect/ on macOS, or ~/.openvpn-connect/logs/ on Linux).

Attack Flow:

  1. Gain Local Access: The attacker obtains local access to the victim’s machine (e.g., via malware, physical access, or a compromised user account).
  2. Locate Log File: The attacker navigates to the OpenVPN Connect log directory.
  3. Extract Private Key: The attacker reads the log file and searches for the -----BEGIN PRIVATE KEY----- marker.
  4. Decrypt Traffic: Using the extracted private key, the attacker can decrypt any captured VPN traffic (e.g., from a network tap or packet capture).

Why It Matters: VPNs are used to protect sensitive data in transit. If the private key is compromised, the entire VPN session is rendered insecure. This is especially critical for enterprise environments where VPNs are used for remote access.

Vulnerable vs. Patched Code

Vulnerable Code (Pre-3.5.0): The application logs the entire configuration profile without redaction. For example, in a logging function:

# Vulnerable: logs the entire config including private key
log.info("Imported config: %s", config_content)

Patched Code (3.5.0+): The application now filters out sensitive fields before logging. For example:

# Patched: redacts private key before logging
def sanitize_config(config):
    config = re.sub(r'(-----BEGIN PRIVATE KEY-----.*?-----END PRIVATE KEY-----)', '[REDACTED]', config, flags=re.DOTALL)
    return config

log.info("Imported config: %s", sanitize_config(config_content))

Key Difference: The patched version removes or masks the private key from log entries, preventing exposure.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • Local access to a machine running OpenVPN Connect < 3.5.0.
  • The victim must have imported a VPN profile containing a private key.

Steps:

  1. Locate the log file:
    • Windows: %LOCALAPPDATA%\OpenVPN Connect\logs\
    • macOS: ~/Library/Logs/OpenVPN Connect/
    • Linux: ~/.openvpn-connect/logs/
  2. Extract the private key:
    grep -A 30 "BEGIN PRIVATE KEY" /path/to/logfile.log
    
    This will output the private key block.
  3. Decrypt VPN traffic:
    • Capture traffic using tcpdump or Wireshark.
    • Use the extracted private key to decrypt the TLS session (if using TLS-based VPN) or the data channel (if using static key encryption).

Example (Linux):

# Extract private key
grep -A 30 "BEGIN PRIVATE KEY" ~/.openvpn-connect/logs/openvpn.log > private_key.pem

# Decrypt a pcap file (assuming TLS)
tshark -r capture.pcap -o "tls.keylog_file:private_key.pem" -Y "tls"

Blue Team (Detection & Defense)

Detection:

  • Monitor for unauthorized access to OpenVPN Connect log files.
  • Use file integrity monitoring (FIM) to detect reads of log files by non-OpenVPN processes.
  • Look for grep or strings commands targeting log files in process monitoring.

Defense:

  • Immediate: Upgrade to OpenVPN Connect 3.5.0 or later.
  • Mitigation: If upgrade is not possible, restrict access to the log directory using file permissions (e.g., chmod 600 on Linux).
  • Logging: Enable only necessary logging levels (e.g., error-only) to reduce exposure.
  • Audit: Regularly audit log files for any sensitive data exposure.

Indicators of Compromise (IOCs)

File-Based IOCs:

  • Log files containing -----BEGIN PRIVATE KEY----- in:
    • %LOCALAPPDATA%\OpenVPN Connect\logs\*.log
    • ~/Library/Logs/OpenVPN Connect/*.log
    • ~/.openvpn-connect/logs/*.log

Process-Based IOCs:

  • Unauthorized processes reading OpenVPN Connect log files (e.g., grep, cat, strings).
  • Processes with names like extract_key.exe or decrypt_vpn.sh running on the system.

Network-Based IOCs:

  • Unusual decryption attempts on VPN traffic (e.g., sudden increase in TLS handshake failures).
  • Outbound connections from the attacker’s machine to exfiltrate the private key.

Detection Engineering

YARA Rule

rule CVE_2024_8474_PrivateKeyInLog {
    meta:
        description = "Detects OpenVPN Connect log files containing private keys"
        author = "Valters IT"
        date = "2024-10-27"
        reference = "CVE-2024-8474"
    strings:
        $key_start = "-----BEGIN PRIVATE KEY-----"
        $key_end = "-----END PRIVATE KEY-----"
        $log_marker = "OpenVPN Connect"
    condition:
        $key_start and $key_end and $log_marker
}

Sigma Rule

title: OpenVPN Connect Private Key in Log File
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects when a private key is written to an OpenVPN Connect log file
author: Valters IT
date: 2024/10/27
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2024-8474
logsource:
    category: file_event
    product: windows
    definition: 'File creation or modification events'
detection:
    selection:
        TargetFilename|contains: 'OpenVPN Connect\logs\'
        TargetFilename|endswith: '.log'
    keywords:
        - '-----BEGIN PRIVATE KEY-----'
    condition: selection and keywords
falsepositives:
    - Legitimate log entries from patched versions (3.5.0+)
level: high

Suricata Rule

alert tcp any any -> any any (msg:"CVE-2024-8474 - OpenVPN Connect Private Key Exfiltration"; flow:to_server; content:"-----BEGIN PRIVATE KEY-----"; nocase; sid:1000001; rev:1;)

Note: This rule detects the private key being sent over the network (e.g., via HTTP POST). Adjust for your environment.

Remediation & Mitigation

Immediate Actions:

  1. Upgrade: Update OpenVPN Connect to version 3.5.0 or later.
  2. Rotate Keys: If you suspect exposure, revoke and regenerate all VPN private keys.
  3. Clear Logs: Delete existing log files that may contain private keys.

Long-Term Mitigations:

  • Least Privilege: Ensure only authorized users have local access to systems running VPN clients.
  • Log Management: Implement centralized logging with redaction for sensitive data.
  • Monitoring: Deploy the YARA/Sigma rules above to detect future exposures.
  • User Training: Educate users on the risks of storing sensitive data in logs.

Patch Details: The fix is included in OpenVPN Connect 3.5.0. No official patch notes are available, but the vendor has confirmed the issue is resolved in this version.


Valters IT

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

OpenVPN Connect
openvpn connect log

💣 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-2024-8474/ · 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.