Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain local shell access
-
DeliveryInvoke TIOCNOTTY ioctl on terminal
-
ExploitExit process leaving dangling pointer
-
ExecutionManipulate kernel heap via syscalls
-
PersistTrigger terminal operation dereferencing stale pointer
-
ImpactExecute code as root
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires local access to a FreeBSD system running vulnerable kernel versions (13.5-RELEASE before p12, 14.3-RELEASE before p11, 15.0-RELEASE before p6, or 14.4-RELEASE before p2). The attacker must have an unprivileged local user account capable of executing arbitrary code and invoking ioctls on terminal devices, which is standard capability for any interactive shell user. No special kernel configuration, non-default settings, or elevated privileges are required - the vulnerability exists in default FreeBSD installations. The CVSS vector PR:N accurately reflects that no authentication beyond initial local access is needed. Successful exploitation depends on kernel heap manipulation techniques requiring some architecture-specific knowledge and timing, but AC:L (low complexity) indicates these are not significant barriers for skilled attackers. All system architectures supported by FreeBSD (amd64, ARM64, i386, etc.) are presumed exploitable as the tty subsystem is architecture-independent code. Multi-user systems with untrusted local accounts face highest risk, while single-user workstations already under full physical control of a trusted user present lower incremental risk since physical access typically implies existing root capability. |
| Impact | Despite the high CVSS base score of 8.4 reflecting severe potential impact (C:H/I:H/A:H), real-world exploitation risk appears moderate based on multi-source signals. The CVSS vector AV:L/AC:L/PR:N indicates local access with low complexity and no authentication, meaning any unprivileged local user can trigger the condition. However, EPSS probability of 0.02% (5th percentile) suggests exploitation is not occurring at scale. Absence from CISA KEV confirms no known active exploitation in the wild. The PR:N metric warrants scrutiny - while technically no authentication is required once local access exists, the local attack vector inherently requires prior system access, contradicting the implication of completely unauthenticated exploitation. SSVC factors indicate: exploitation status is proof-of-concept (PoC not confirmed but technically feasible given FreeBSD security advisory disclosure), automatable (yes - once PoC developed, exploitation is deterministic), technical impact is total (root compromise). Priority should focus on multi-user systems, shared hosting environments, or systems where local accounts may be compromised through other vectors. Single-user workstations with trusted local users present lower practical risk despite high CVSS rating. |
| Exploit ScenarioDerived | An attacker with local shell access (via SSH, compromised web application, or physical access) executes a malicious program that invokes the TIOCNOTTY ioctl to detach from its controlling terminal, creating the dangling pointer condition. The program then carefully exits in a manner that leaves the freed session structure allocated at a predictable kernel heap location. Through repeated allocation and deallocation of kernel objects (via system calls like socket creation, file operations), the attacker performs heap feng shui to place controlled data at the freed memory address. A subsequent operation on the terminal device dereferences the dangling pointer, treating attacker-controlled memory as a valid session structure. By crafting this fake structure with manipulated credential pointers, the attacker redirects kernel credential checks to memory containing uid=0 (root), effectively elevating the attacker's process to root privileges and enabling complete system compromise. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 22, 2026
Local privilege escalation in FreeBSD 13.5 through 15.0 allows unprivileged processes to gain root privileges by exploiting a use-after-free condition in the TIOCNOTTY ioctl implementation. When a process detaches from its controlling terminal and exits, a dangling pointer in the terminal structure references freed session memory, which attackers can manipulate to escalate privileges. This vulnerability affects multiple stable and release branches with CVSS 8.4 (High) but low EPSS probability (0.02%, 5th percentile), indicating theoretical severity without observed widespread exploitation. Not listed in CISA KEV, suggesting no confirmed active exploitation at time of analysis.
RemediationAI
Apply vendor-released patches immediately via freebsd-update utility or rebuild kernel from patched sources. Specific fixed versions are FreeBSD 13.5-RELEASE-p12, 14.3-RELEASE-p11, 15.0-RELEASE-p6, and 14.4-RELEASE-p2 as detailed in FreeBSD-SA-26:10.tty security advisory at https://security.freebsd.org/advisories/FreeBSD-SA-26:10.tty.asc. For systems where immediate patching is not feasible, restrict local user access to trusted accounts only and implement kernel security modules like MAC framework policies to limit privilege escalation paths, though these are incomplete mitigations that reduce but do not eliminate risk. Monitor for unusual process behavior around terminal device access (dmesg, dtrace probes on tty ioctls). No effective workaround exists that fully prevents exploitation while maintaining normal terminal functionality, making patching the only complete remediation. System reboot is required after kernel update to activate the fix.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
This vulnerability stems from improper cleanup in the FreeBSD kernel's tty subsystem, specifically the TIOCNOTTY ioctl handler used to detach a process from its controlling terminal. The implementation (CWE-416: Use After Free) fails to nullify the back-pointer from the tty structure to the process session structure after detachment. When the process subsequently exits and its session is freed, the terminal device retains a stale pointer to deallocated kernel memory. This classic dangling pointer condition creates a window where subsequent operations on the terminal device may dereference freed memory. Because terminal structures are privileged kernel objects with elevated context, controlling the contents of the freed memory region through heap manipulation techniques allows arbitrary kernel memory writes, ultimately enabling privilege escalation to root (uid 0). The vulnerability exists across multiple FreeBSD stable branches (13.x, 14.x, 15.x) as identified by CPE cpe:2.3:a:freebsd:freebsd, indicating a long-standing implementation flaw in core kernel infrastructure.
Know when Freebsd gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from Vendor (freebsd) · only source for this CVE.
CVSS VectorVendor: freebsd
Lifecycle Timeline
2DescriptionCVE.org
The implementation of TIOCNOTTY failed to clear a back-pointer from the structure representing the controlling terminal to the calling process' session. If the invoking process then exits, the terminal structure may end up containing a pointer to freed memory.
A malicious process can abuse the dangling pointer to grant itself root privileges.
Executive ViewAI
CVE-2026-5398 is a local privilege escalation vulnerability in FreeBSD 13.5 through 15.0 that allows unprivileged users to gain root-level access through a use-after-free flaw in terminal handling. While the technical severity is rated HIGH (CVSS 8.4), actual exploitation risk remains low due to the requirement for local system access and absence of observed active exploitation. Organizations running affected FreeBSD versions should prioritize system access controls and monitor for indicators of local privilege escalation attempts.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict local system access to trusted users only; disable unnecessary local accounts; (2) Implement mandatory access controls (MAC) frameworks such as AppArmor or SELinux equivalents if available on FreeBSD; (3) Monitor process execution logs for suspicious terminal ioctl calls (TIOCNOTTY); (4) Use containerization or virtualization to isolate critical services and limit blast radius of privilege escalation; (5) Enforce principle of least privilege for all user and service accounts.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
The x86-64 kernel system-call functionality in Xen 4.1.2 and earlier, as used in Citrix XenServer 6.0.2 and earlier and
The rtsol(8) and rtsold(8) programs do not validate the domain search list options provided in router advertisement mess
Server or client applications that call the SSL_check_chain() function during or after a TLS 1.3 handshake may crash due
The RFC 5011 implementation in rdata.c in ISC BIND 9.7.x and 9.8.x before 9.8.5-P2, 9.8.6b1, 9.9.x before 9.9.3-P2, and
Remote code execution in OpenSSH's sshd server (regression of CVE-2006-5051) allows unauthenticated remote attackers to
An issue was discovered in OpenSSH 7.9. Rated medium severity (CVSS 5.9), this vulnerability is remotely exploitable, no
The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot
The vm_map_lookup function in sys/vm/vm_map.c in the mmap implementation in the kernel in FreeBSD 9.0 through 9.1-RELEAS
An OpenSSL TLS server may crash if sent a maliciously crafted renegotiation ClientHello message from a client. Rated med
Integer overflow in the _gd2GetHeader function in gd_gd2.c in the GD Graphics Library (aka libgd) before 2.2.3, as used
The Stream Control Transmission Protocol (SCTP) module in FreeBSD 9.3 before p33, 10.1 before p26, and 10.2 before p9, w
In FreeBSD 12.1-STABLE before r359565, 12.1-RELEASE before p7, 11.4-STABLE before r362975, 11.4-RELEASE before p1, and 1
EUVD-2026-24589
NVD
CVE.org
EPSS
Vulnrichment
VulDB
GitHub PoC
Exploit-DB