Skip to main content

FreeBSD CVE-2026-5398

| EUVDEUVD-2026-24589 HIGH
Use After Free (CWE-416)
2026-04-22 freebsd
8.4
CVSS 3.1 · Vendor: freebsd
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain local shell access
  2. Delivery
    Invoke TIOCNOTTY ioctl on terminal
  3. Exploit
    Exit process leaving dangling pointer
  4. Execution
    Manipulate kernel heap via syscalls
  5. Persist
    Trigger terminal operation dereferencing stale pointer
  6. Impact
    Execute 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

FreeBSD 13.5-RELEASE <p12
FreeBSD 14.3-RELEASE <p11
FreeBSD 15.0-RELEASE <p6
FreeBSD 14.4-RELEASE <p2

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

Vendor (freebsd) PRIMARY 8.4 HIGH
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

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
CVSS changed
Apr 22, 2026 - 15:22 NVD
8.4 (HIGH)
CVE Published
Apr 22, 2026 - 02:23 nvd
HIGH 8.4

DescriptionCVE.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

Why It Matters

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.

Business Impact: Medium
Compensating Controls

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

EPSS Score
0.0%
Top 95% exploitable
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact
Medium
Technical Impact
Total

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

CVE-2012-0217 HIGH POC
7.2 Jun 12

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

CVE-2025-14558 HIGH POC
7.2 Mar 09

The rtsol(8) and rtsold(8) programs do not validate the domain search list options provided in router advertisement mess

CVE-2020-1967 HIGH POC
7.5 Apr 21

Server or client applications that call the SSL_check_chain() function during or after a TLS 1.3 handshake may crash due

CVE-2013-4854 HIGH POC
7.8 Jul 29

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

CVE-2024-6387 HIGH POC
8.1 Jul 01

Remote code execution in OpenSSH's sshd server (regression of CVE-2006-5051) allows unauthenticated remote attackers to

CVE-2019-6111 MEDIUM POC
5.9 Jan 31

An issue was discovered in OpenSSH 7.9. Rated medium severity (CVSS 5.9), this vulnerability is remotely exploitable, no

CVE-2023-48795 MEDIUM POC
5.9 Dec 18

The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot

CVE-2013-2171 MEDIUM POC
6.9 Jul 02

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

CVE-2021-3449 MEDIUM
5.9 Mar 25

An OpenSSL TLS server may crash if sent a maliciously crafted renegotiation ClientHello message from a client. Rated med

CVE-2016-5766 HIGH POC
8.8 Aug 07

Integer overflow in the _gd2GetHeader function in gd_gd2.c in the GD Graphics Library (aka libgd) before 2.2.3, as used

CVE-2016-1879 HIGH POC
7.5 Jan 29

The Stream Control Transmission Protocol (SCTP) module in FreeBSD 9.3 before p33, 10.1 before p26, and 10.2 before p9, w

CVE-2020-7457 HIGH POC
8.1 Jul 09

In FreeBSD 12.1-STABLE before r359565, 12.1-RELEASE before p7, 11.4-STABLE before r362975, 11.4-RELEASE before p1, and 1

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy