CVE-2026-7270 is a local privilege escalation vulnerability in FreeBSD’s execve(2) handling of shebang scripts, in sys/kern/kern_exec.c. The issue is described as an operator-precedence/arithmetic bug in the size calculation used during argv rewriting for interpreter scripts. Specifically, the buggy logic computes a memmove length as endp - begin_argv + consume instead of endp - begin_argv - consume while adjusting arguments for shebang execution. Under attacker-controlled input, this causes an oversized memmove and a buffer overflow within the kernel’s exec_map argument-buffer pool. Because exec_map entries are contiguous and lack guard pages, the overflow can overwrite the adjacent execve argument buffer belonging to another process. The provided analysis states this can corrupt another process’s exec arguments/environment during a narrow race window between argument copy-in and string copy-out, enabling practical exploitation against root-owned process executions such as sshd-session.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
Repository contains a self-contained local privilege escalation exploit for CVE-2026-7270 on FreeBSD. The main exploit is exec1_lpe21.c, supported by documentation (README.md, WRITEUP.md, blog.md), diagrams under images/, and a reproduction harness run_poc.sh for QEMU. The vulnerability is an out-of-bounds memmove in exec_args_adjust_args() during shebang exec handling in sys/kern/kern_exec.c. The exploit is not a framework module; it is standalone C code plus a Bash automation script. Core capability: the exploit races a crafted shebang execve() against root sshd activity on localhost TCP/22. It abuses the exec_map adjacency described in the writeup to overwrite the beginning of a neighboring exec_map entry used by /usr/libexec/sshd-session. The overwritten data injects LD_PRELOAD=/tmp/evil.so into sshd-session's environment. Because sshd-session is reportedly exec'd root-to-root without a suid/sgid transition, the runtime linker honors LD_PRELOAD. The malicious shared object constructor then runs as root and drops /tmp/rootsh as a setuid root shell, also writing /tmp/GOT_ROOT as a success marker. Exploit structure in exec1_lpe21.c: it defines constants for the trigger script, target binary, payload paths, and SSH port; creates /tmp/e21.sh as the shebang trigger; writes and compiles /tmp/evil.c into /tmp/evil.so; allocates wired memory; starts multiple worker processes including an SSH 'poker' loop, a preseeder loop to populate exec_map entries with payload data, and a memory churn loop; pins the trigger to CPU 0 with cpuset_setaffinity; repeatedly forks and execves the trigger script with a very large argv[0] to hit the vulnerable memmove; and periodically checks whether /tmp/rootsh or /tmp/GOT_ROOT indicates success. The payload code is embedded directly as a C string and compiled locally with cc -shared -fPIC. run_poc.sh is an operational lab harness rather than the exploit itself. It can boot a FreeBSD 14.4 QEMU VM, optionally download a cloud image from FreeBSD.org, enable root SSH login via cloud-init, copy the exploit source into the guest, compile it, create an unprivileged user, run the exploit as that user, and verify whether /tmp/rootsh was created. This script exposes additional endpoints such as host-forwarded SSH on port 2225 and modifies /etc/ssh/sshd_config inside the VM. Overall purpose: demonstrate and reproduce a practical local-to-root exploit path for a FreeBSD kernel execve bug on default installations with sshd enabled. The repository is clearly exploit-focused, includes a real payload, and is best classified as OPERATIONAL rather than a mere PoC or detection script.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
19 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
A FreeBSD kernel execve()/shebang argument handling bug caused by an incorrect memmove size calculation in exec_args_adjust_args, enabling cross-process corruption of adjacent exec_map argument buffers and local privilege escalation to root on a default system.
A local privilege escalation vulnerability in FreeBSD involving execve().
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.