CVE Mitigations
CSM treats CVEs as a three-layer problem:
- Operator-driven hardening via
csm harden ...- applies the right preventive control for the host (modprobe blacklist, seccomp drop-ins, sysctl tweaks). - Continuous enforcement by the daemon - re-asserts the control on every startup and as a periodic check, so a package upgrade or manual
modprobedoes not silently undo the mitigation. - Live detection - auditd/BPF listeners flag exploit signatures the moment they fire, even on hosts where the kernel itself cannot be patched.
The hardening audit detects what the host actually has (kernel build, KernelCare livepatches, seccomp coverage) and refuses to claim protection it cannot deliver. Run csm harden with no arguments for the full list of available mitigations on the current host.
Active mitigations
CVE-2026-31431 - “Copy Fail” (Linux kernel AF_ALG)
Two operator paths depending on whether AF_ALG is loadable on the kernel:
csm harden --copy-fail- writes/etc/modprobe.d/csm-copy-fail-mitigation.confblacklistingalgif_aeadandaf_alg, then unloads them. Refuses on kernels where AF_ALG is built in (typical cPanel / CloudLinux 8), since the blacklist would have no effect there.csm harden --copy-fail-seccomp- writes systemdRestrictAddressFamilies=~AF_ALGdrop-ins for the units that spawn untrusted code: LiteSpeed, Apache/Nginx, every PHP-FPM pool, cron, mail. The right path on built-in-AF_ALG kernels.
The audit recognises KernelCare CVE-2026-31431 livepatches via kcarectl --patch-info and reports pass only when the host is genuinely mitigated (module blacklisted, seccomp drop-ins applied, or KernelCare livepatch active).
Live detection and BPF blocking
BPF-tagged builds (make BPF=1 or go build -tags bpf) load an LSM socket_create program on kernels with BPF LSM and ringbuf support. That program refuses socket(AF_ALG, ...) from non-root UIDs before the AF_ALG socket is allocated, returns EPERM, emits a ringbuf event, and feeds the existing Critical af_alg_socket_use finding path. UID 0 keeps AF_ALG access for system crypto users. There are no UID-range or alert-only BPF tunables today; use detection.af_alg_backend to select auditd or none if a host needs to avoid kernel-side refusal.
Default builds, BPF-tagged builds on unsupported kernels, and hosts forced to detection.af_alg_backend: auditd keep the audit-log listener. The audit path catches non-system AF_ALG socket attempts at Critical within about 500 ms but cannot stop the syscall before it reaches the kernel. Hosts that are not exploitable skip the live listener.
If CSM attempts the AF_ALG BPF path and cannot start it, it emits a
bpf_unavailable finding. The finding says whether the audit fallback
is active or no live fallback is available.
Auto-response
auto_response.copy_fail_kill_process: true- SIGKILL the offending process when the live listener fires. Default off (alert-only).auto_response.disable_enforce_af_alg: true- suspend the periodic re-assertion of the module blacklist without removing the hardening marker. For triage only.
The daemon self-heals its auditd rule file on startup if it has drifted from the embedded copy, closing the upgrade gap where a new binary shipped without re-running postinstall would leave detection silently inactive.
Configuration knob
detection.af_alg_backend-auto(default) |bpf|auditd|none.auditdis the kill switch for a misbehaving BPF-tagged release.bpfis strict mode (no fallback).nonedisables the live listener entirely.
The csm_af_alg_backend{kind="bpf-lsm"|"auditd-tail"|"none"} Prometheus gauge surfaces which backend the coordinator selected at startup, so dashboards can see the active path without parsing logs.
BPF validation
On a BPF LSM host with a BPF-tagged CSM build:
-
Set
detection.af_alg_backend: bpffor strict validation, or leave it asautoand confirm BPF was selected. -
Start the daemon and check metrics:
curl -k -H "Authorization: Bearer $CSM_TOKEN" https://127.0.0.1:9443/metrics \ | grep -E 'csm_af_alg_backend|csm_bpf_backend'Expected selected series:
csm_af_alg_backend{kind="bpf-lsm"} 1 csm_bpf_backend{feature="af_alg",kind="bpf"} 1 -
As a non-root user, attempt an AF_ALG socket:
sudo -u nobody python3 - <<'PY' import errno import socket import sys try: socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0) except OSError as exc: print(exc.errno) sys.exit(0 if exc.errno == errno.EPERM else 1) raise SystemExit("AF_ALG socket unexpectedly succeeded") PY -
Confirm the command prints
1(EPERM) and CSM emits a Criticalaf_alg_socket_usefinding. The finding details should say the call was refused by the BPF LSM program.
CVE-2026-41940 - cPanel/WHM auth-bypass
Detection in the access-log path:
- Non-infra WHM login attempts surface at Warning (suppressible alongside other cPanel-login alerts) so an operator can see brute force traffic against the bypass surface.
- The tokenless WHM-script request the published exploit uses for cache promotion surfaces at Critical, always-on, and feeds auto-block.
No operator hardening command is required. The host fix is to apply the cPanel patched build. CSM provides the detection layer for windows where patching has not yet rolled out.
CVE-2026-109618 and CVE-2026-109619 - “PHP2Shell” (PHP core)
Two critical flaws in PHP itself, reachable over the network without a login (advisories GHSA-w8hw-w9fx-j79w and GHSA-6wmf-4rv5-p3rp). They are fixed in PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12, and updating is the only complete fix.
- CVE-2026-109618 - when memory runs out at the wrong moment, PHP leaves request memory in an invalid state that request shutdown then uses. Crafted multipart bodies can force that during request startup, before any script runs. Apache mod_php is exposed without any application involvement; PHP-FPM and LiteSpeed LSAPI need an application-specific path.
- CVE-2026-109619 - a fatal error or memory exhaustion can leave worker state pointing at freed request memory, and some operations in the next request use it before normal initialization. Session upload progress is one of them. It runs on any multipart POST carrying the upload-progress field, whether or not the site uses sessions.
CSM provides a request filter and configuration audits until patched PHP is installed:
- ModSecurity filter - rule
900133denies requests other than GET and HEAD whose form field names contain the defaultPHP_SESSION_UPLOAD_PROGRESSfield name, including the single-quoted spelling PHP accepts. Requests carrying browserOriginorSec-Fetch-Siteheaders are denied by900134instead, whose firewall escalation is off by default. Keep that exclusion to prevent browser-steered bans. Requests carrying neither header retain first-deny escalation, including a browser whose extension or proxy stripsOriginwhen posting to a plain-HTTP site. A customsession.upload_progress.nameis outside this filter’s coverage. It needsSecRequestBodyAccess On, and it sees only what ModSecurity’s request body limits let it inspect, so the PHP setting below is the stronger stopgap. - Hardening audit -
php_upload_progress_<version>warns whilesession.upload_progress.enabledis on or cannot be confirmed off. For cPanel EA4 PHP the audit readsphp.iniand thenphp.din PHP’s own order, so a drop-in that turns the setting off is recognised. Conditional site settings and FPM pools are checked separately; disabling one does not hide another that is on. Unreadable overrides and unresolved values retain the warning. On bare servers, the audit follows the additional files reported by the system PHP CLI in their load order. A pass covers only inspected settings, not running workers, per-user CageFS copies,.user.inifiles, or a separate web SAPI configuration. Confirm the effective value through each site’s web handler after restarting. Thephp_version_<version>item marks a branch end of life the day after its upstream security support ends. - PHP 8.5 backtraces -
php_fatal_error_backtraces_<version>warns on PHP 8.5 and later whilefatal_error_backtracesis on or cannot be confirmed off, using the same scope and pool rules. Scripts can still turn it on at runtime, so a pass covers the configured default only.
Both configuration audits recognise quoted FPM setting names. Within each pool, admin values override ordinary values; the first duplicate at the same level wins, matching PHP-FPM’s application order. Remove conflicting pool entries instead of relying on a later value to override an earlier one. The backtrace audit does not determine the installed patch level and still checks PHP 8.5 and later after an update.
To turn the handler off on cPanel EA4, add
session.upload_progress.enabled = Off to a file in each
/opt/cpanel/ea-phpXX/root/etc/php.d/ directory. For CloudLinux alt-php, add
the same line to /etc/cl.selector/global_php.ini and run
selectorctl --apply-global-php-ini. With CageFS, PHP inside each cage reads its
own copy of the EA4 configuration directory, so run cagefsctl --force-update
after adding the file. Restart PHP workers afterwards and confirm the value from
inside a cage (cagefs_enter_user <user> <php binary> -r '...') or from a web
request, not only from the host CLI.
On PHP 8.5, also set fatal_error_backtraces = Off the same way; the advisory
names it as the mitigation for its strongest confirmed case. The advisory’s setting for
CVE-2026-109618, memory_limit = -1 behind a separate memory cap, is partial.
Do not cap PHP with an address-space limit such as RLIMIT_AS or a CloudLinux
VMEM limit: failed allocations reach the vulnerable path.
None of these replaces the PHP update. PHP published source backports for 7.4, 8.0 and 8.1 but no releases, and nothing for older branches. Vendors such as CloudLinux may ship fixes in their builds, so check the package changelog for the CVE IDs.
NGINX2Root - nginx worker to root through kernel SCTP
NGINX2Root is five nginx flaws (CVE-2026-123007, CVE-2026-123633, CVE-2026-123634, CVE-2026-121810, CVE-2026-113425) that run code as the nginx worker. Upstream fixed them in 1.30.7 and 1.31.9; see the nginx security advisories. Update and restart nginx, since a reload keeps the old binary. CSM does not check nginx versions: distributions backport the fix without changing them.
The published chain reaches root through a separate Linux kernel SCTP bug.
Any local foothold can use it, a PHP webshell included, once the sctp module
loads, and an unprivileged user can get it loaded on demand. Web hosts do not
use SCTP, so the hardening check os_sctp_blocked asks kmod for the module’s
effective load plan and passes only when:
- the kernel has no SCTP support, or
- the module is unloaded, modprobe reports it missing, and CSM confirms its
absence in the running kernel’s module tree (EL8 ships it in
kernel-modules-extra), or - the module is not loaded and kmod would run a no-op install command, or
- the module is not loaded and the kernel has module loading disabled.
blacklist sctp is not enough: another module can still load SCTP as a
dependency. Block it with an install directive instead:
echo 'install sctp /bin/false' > /etc/modprobe.d/csm-disable-sctp.conf
modprobe --show-depends sctp # must print "install /bin/false"
If SCTP is already loaded, stop what uses it and run modprobe -r sctp, or
reboot. A kernel with SCTP built in fails until it is replaced. The check
warns when it cannot read the kernel config, /proc/modules, the modprobe
configuration, or the load plan. A missing-module report also warns if CSM
cannot inspect the module tree and its index, or finds an SCTP module there.
Future CVEs
New mitigations land here as they ship. The bar is:
- The host can be measurably hardened (modprobe / seccomp / sysctl / config), and/or
- An exploit-signature detector can fire reliably without false positives.
CVEs that are purely “patch the package”, with no preventive control we can apply and no signature we can detect, do not get a CSM mitigation; the right answer is the vendor patch. The daemon’s package-integrity check (rpm -V / debsums) only shows that installed files still match their package; it cannot tell whether that package contains a fix.