CVE-2023-27336
Executive Summary
CVE-2023-27336 is a critical Denial-of-Service (DoS) vulnerability in Softing edgeConnector Siemens OPC UA Server. The flaw resides in the handling of OPC client certificates, where a NULL pointer dereference occurs when processing a specially crafted certificate. An unauthenticated remote attacker can exploit this to crash the server, disrupting industrial control system (ICS) communications. With a CVSS score of 7.5 (High), the vulnerability poses a significant risk to operational technology (OT) environments, especially where the edgeConnector is exposed to untrusted networks. No public exploit code or proof-of-concept is currently available, and no patch has been released by the vendor.
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.
No signup required
CVSS Breakdown & Threat Level
- CVSS Score: 7.5 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Attack Vector: Network (AV:N) – exploitable remotely.
- Attack Complexity: Low (AC:L) – no special conditions required.
- Privileges Required: None (PR:N) – no authentication needed.
- User Interaction: None (UI:N) – no human involvement.
- Scope: Unchanged (S:U) – impact confined to the vulnerable component.
- Confidentiality Impact: None (C:N)
- Integrity Impact: None (I:N)
- Availability Impact: High (A:H) – complete denial of service.
Threat Level: High. The vulnerability is trivial to exploit (no auth, low complexity) and directly impacts availability of critical OT infrastructure.
Deep Dive & Mechanics
The vulnerability exists in the OPC UA server component of Softing edgeConnector Siemens. When a client initiates a connection, the server processes the client's certificate. Due to improper validation, a NULL pointer dereference occurs if the certificate is malformed or missing expected fields. This leads to a segmentation fault, crashing the server process.
Root Cause: The server code fails to check if a pointer returned from certificate parsing is NULL before dereferencing it. This is a classic CWE-476 (NULL Pointer Dereference) flaw.
Attack Vector: An attacker sends a crafted OPC UA connection request containing a malicious client certificate. The server parses the certificate, encounters a NULL pointer, and crashes.
Impact: The OPC UA server becomes unavailable, halting all OPC UA communications. This can disrupt monitoring, control, and data acquisition in Siemens-based industrial environments.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code pattern is described generically.
Vulnerable Code (C/C++ example):
// Vulnerable: No NULL check before dereference
void process_client_certificate(CERT *cert) {
char *subject = cert->subject; // Could be NULL
printf("Subject: %s\n", subject); // Dereference without check
}
Patched Code (Hypothetical fix):
// Patched: NULL check before dereference
void process_client_certificate(CERT *cert) {
if (cert == NULL || cert->subject == NULL) {
// Handle error gracefully
return;
}
char *subject = cert->subject;
printf("Subject: %s\n", subject);
}
The fix requires adding NULL pointer validation before any dereference of certificate fields.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Target running Softing edgeConnector Siemens OPC UA Server (default port 4840).
- Network access to the target.
Exploitation Steps:
- Craft a malicious OPC UA client certificate that triggers a NULL pointer dereference. This can be done by omitting the
subjectfield or providing an invalid ASN.1 structure. - Send a connection request to the target OPC UA server using the crafted certificate.
- Observe the server crash – the service becomes unresponsive.
Example Python script (conceptual):
import socket
import ssl
# Craft a malformed certificate (simplified)
malformed_cert = b"\x30\x00" # Invalid ASN.1
context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
context.load_cert_chain(certfile=malformed_cert) # This would fail in real SSL
# Connect to target
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(("target_ip", 4840))
# Send OPC UA hello with malformed cert
# ... (actual OPC UA protocol specifics omitted)
Note: No public exploit exists; this is a conceptual demonstration.
Blue Team (Defense & Detection)
Detection:
- Monitor for repeated connection attempts with invalid or malformed certificates.
- Alert on OPC UA server crashes or process terminations.
- Use network intrusion detection to flag anomalous OPC UA handshakes.
Mitigation:
- Restrict network access to the OPC UA server (firewall, VPN).
- Implement certificate validation at the network perimeter.
- Monitor logs for NULL pointer dereference errors (e.g., segmentation faults).
Indicators of Compromise (IOCs)
- Network:
- OPC UA connections with malformed or incomplete client certificates.
- Repeated connection attempts from a single source to port 4840.
- System:
- OPC UA server process crash logs (segmentation fault, NULL pointer dereference).
- Unexpected service restarts or downtime.
- File:
- No specific file-based IOCs.
Detection Engineering
YARA Rule
rule CVE_2023_27336_NULL_PTR_DEREF {
meta:
description = "Detects malformed OPC UA client certificates triggering NULL pointer dereference"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2023-27336"
strings:
$null_deref = "NULL pointer dereference" nocase
$segfault = "segmentation fault" nocase
$opcua_cert = "OPC UA" nocase
condition:
any of ($null_deref, $segfault) and $opcua_cert
}
Sigma Rule
title: CVE-2023-27336 - OPC UA Server NULL Pointer Dereference
id: 3a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects OPC UA server crashes due to NULL pointer dereference
logsource:
product: windows
service: application
detection:
selection:
EventID: 1000 # Application Error
Provider_Name: 'Application Error'
Description|contains: 'NULL pointer dereference'
condition: selection
falsepositives:
- Unknown
level: high
Suricata Rule
alert tcp any any -> any 4840 (msg:"CVE-2023-27336 - OPC UA Malformed Certificate DoS"; flow:to_server; content:"|30 00|"; depth:2; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate the edgeConnector from untrusted networks (firewall, VLAN).
- Implement network segmentation – restrict OPC UA traffic to trusted IPs only.
- Monitor for crashes and anomalous connections.
Long-term Fix:
- Await an official patch from Softing. Contact vendor for updates.
- If possible, upgrade to a patched version or alternative OPC UA stack.
- Apply virtual patching via WAF/IPS rules (e.g., block malformed certificates).
Workaround:
- Disable client certificate validation if not required (not recommended for security).
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
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.