
Containerised differential lab and 4-mode PoC for CVE-2026-123039, a Check Point Gaia OS Dynamic CLI world-writable socket flaw enabling local privilege escalation to root.
| CVE | CVE-2026-123039 |
| Component | Check Point Gaia OS — Dynamic / Extended CLI daemon, /usr/bin/dynamic_server |
| Affected | Gaia OS R81, R81.10, R81.20, R82, R82.10, R82.20 — Quantum Security Gateways and Force firewalls, Security Management and Log Servers, Multi-Domain Security Management and Log Servers, Maestro / Scalable Platforms. Check Point Spark firewalls and Smart-1 Cloud are not affected. |
| Fixed in | The security hotfix for advisory sk1000362, delivered through the monthly Jumbo Hotfix Accumulator of the affected branches |
| CWE | CWE-732 (Incorrect Permission Assignment for Critical Resource) and CWE-862 (Missing Authorization) |
| Impact | Local privilege escalation to root: an arbitrary command string written into the control socket is executed with the privileges of the daemon |
| CVSS | 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Vector | The local AF_UNIX control socket /tmp/dynamic_socket, published by the root daemon dynamic_server |
| Trigger | The command string an unprivileged local process writes into the socket, framed as #<length># <command> |
| Advisory | Check Point sk1000362 |
| Mitigation | dbset process:dynamic_server off followed by dbset :save in Expert mode |
| Indicators | /var/log/dynamicCli.log — the daemon records every request it accepts |
The Gaia OS Dynamic CLI (sk144112) maps expert-mode diagnostic commands into the
restricted clish shell. The mapping is served by dynamic_server, a daemon that runs
as root and owns the local control socket /tmp/dynamic_socket. On affected builds the
socket is created world writable and the daemon neither authenticates nor authorizes
the process that connects to it, so any authenticated local account — a service
account, a portal worker, an interactive shell user — writes a command string into the
socket and the daemon executes it as root. The attack is local by design and does not
need any credential beyond the ability to run a process on the appliance, which is why
it is consistently used as the second stage of the published campaigns that begin with
a web portal compromise.
This repository contains a containerised laboratory that reproduces the escalation on
the affected behaviour, contrasts it with the patched behaviour, tests the published
mitigation and the operator-side hardening, and reports the result of a 0-day sweep
over the patched line. Every claim is backed by a capture in evidence/.
| element of the objective | delivered by | verified by |
|---|---|---|
| Containerised differential laboratory, vulnerable and fixed builds | lab/ — one image, four authorization variants selected by GAIA_VARIANT | make check, evidence/check-vulnerable-run.txt, evidence/check-fixed-run.txt |
| Deterministic differential PoC in the modes check / exploit / probe / mitigation | poc/poc.py, poc/Containerfile | make check, make exploit, make probe, make mitigation |
| The local privilege escalation reproduced on the vulnerable build | the PoC run as uid 1000 against the world-writable socket | evidence/exploit-vulnerable-run.txt, evidence/results/exploit-vuln.json |
| The same PoC blocked on the fixed build | the patched daemon model | evidence/exploit-fixed-run.txt, evidence/results/exploit-fixed.json |
| The published mitigation tested | dbset process:dynamic_server off + dbset :save | evidence/mitigation-dbsetserver-off-run.txt |
| Adjacent 0-days hunted on the fixed line | lab/src/sweep.sh, lab/src/fuzz_frame.c | evidence/0day-sweep.txt, evidence/0day-sweep-vulnerable.txt |
| Public GitHub repository | https://github.com/googlesky/CVE-2026-123039 | gh repo view googlesky/CVE-2026-123039 |
The machine readable result of every run of the differential is in
evidence/results/, and evidence/differential-table.txt is generated from them.
Gaia OS is proprietary, licence-gated and not redistributable, the Dynamic CLI daemon
ships as an opaque binary inside the cprx/cphaprep packages, and the upstream fix
is a binary hotfix with no public source commit. Nothing of the vendor product is
redistributed here. What is reproducible in this laboratory is:
/tmp/dynamic_socket, the absence of caller
authentication, the local privilege escalation to root, CVSS 7.8, and the
affected/fixed version matrix — taken from advisory sk1000362 and the CVE record;/tmp namespace, the length-framed request format #<length># <command>,
the command string executed with the credentials of the daemon, and the request log
at /var/log/dynamicCli.log;dbset process:dynamic_server off configuration
switch and its effect on the published socket.Everything the laboratory asserts about the vendor product is sourced from the advisory and the CVE record; everything it asserts about the model is labelled as such. The model runs in the laboratory, and the vulnerable and the patched sides differ in the authorization behaviour of the control socket alone — same base image, same configuration, same service, same entrypoint, the variant selected by an environment variable.
The lab image also carries the two partial fixes separately, so the two halves of the defect can be told apart:
| build | socket mode | peer validation | meaning |
|---|---|---|---|
dynamic_server.vuln | 0777 | none | the affected behaviour (CVE-2026-123039) |
dynamic_server.fixed | 0600 | SO_PEERCRED, uid 0 only | the patched behaviour |
dynamic_server.perm | 0600 | none | access control only |
dynamic_server.peer | 0777 | SO_PEERCRED, uid 0 only | validation only |
The daemon creates its control socket and then decides who may use it. The affected
behaviour creates the socket world writable and never asks the kernel who the caller
is. lab/src/dynamic_server.c:
359: unlink(sock_path);
360:
361: if (bind(srv, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
362: log_line("dynamic_server: bind(%s) failed: %s", sock_path, strerror(errno));
363: close(srv);
364: return 2;
365: }
366:
367: switch (variant) {
368: case GAIA_VARIANT_FIXED:
369: case GAIA_VARIANT_PERM_ONLY:
370: mode = 0600; /* root only */
371: break;
372: default:
373: mode = 0777; /* world writable */
374: break;
375: }
376: if (chmod(sock_path, mode) != 0)
377: log_line("dynamic_server: chmod(%s, %o) failed: %s", sock_path,
378: (unsigned)mode, strerror(errno));
0777 on a socket grants connect() to every account on the appliance. The daemon
then reads a request, and the request is a command string:
281: pr = dyn_frame_parse(req, got, &frame);
282: if (pr != DYN_PARSE_OK) {
...
288: out = run_command(frame.cmd, &out_len);
and the command runs with the credentials of the daemon, which are root:
133: execl("/bin/sh", "sh", "-c", cmd, (char *)NULL);
134: _exit(127);
The request handler of the affected build contains no authorization decision at all. The patched build makes the decision before a single byte of the request is interpreted, and it takes it from the kernel rather than from the request: