HIGH 7.8

CVE-2026-49416: FreeBSD vt(4) Integer Overflow Privilege Escalation

A flaw in FreeBSD's virtual terminal (vt) driver allows an unprivileged local user to cause a heap buffer overflow by requesting an excessively large console history size. The kernel fails to properly validate the requested size, triggering an integer overflow that causes the system to allocate less memory than needed. When the driver then initializes this undersized buffer, it writes beyond the allocated region, corrupting kernel memory. An attacker with local access to a vt device can exploit this to escalate their privileges.

Source data · NVD / CISA · public domain

CVSS
3.1 · 7.8 HIGH · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weaknesses (CWE)
CWE-190
Affected products
31 configuration(s)
Published / Modified
2026-06-27 / 2026-07-01

NVD description (verbatim)

The CONS_HISTORY ioctl handler did not adequately validate the requested history size. A large value caused an integer overflow in the buffer size calculation, resulting in a heap allocation smaller than expected. Subsequent initialization of the buffer wrote beyond the end of the allocation. An unprivileged local user with access to a vt(4) device can trigger an out-of-bounds write in the kernel, potentially escalating privileges.

1 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-49416 is an integer overflow vulnerability (CWE-190) in the FreeBSD kernel's vt(4) virtual terminal driver, specifically in the CONS_HISTORY ioctl handler. When a user supplies a large history size value, the calculation of the required buffer size overflows, resulting in a heap allocation smaller than the requested amount. Subsequent buffer initialization writes beyond the bounds of the allocated region, creating a classic heap overflow condition. The vulnerability requires local access to a vt device and unprivileged user-level execution, making it exploitable by any regular user on affected systems.

Business impact

Privilege escalation on FreeBSD systems via local heap corruption poses a significant risk to multi-user environments, shared hosting platforms, and containerized deployments. A compromised unprivileged account can gain kernel-level access, enabling data theft, system takeover, lateral movement, and persistent compromise. Organizations relying on FreeBSD for services or infrastructure must prioritize remediation to prevent unauthorized privilege escalation and maintain system security boundaries.

Affected systems

This vulnerability affects multiple FreeBSD versions. Consult your FreeBSD vendor advisory or security notices to determine which specific releases in your deployment are vulnerable. The flaw is present in the vt(4) driver, a standard component of FreeBSD's kernel. Any FreeBSD system with virtual terminal support compiled into the kernel is potentially vulnerable if running an affected version.

Exploitability

Exploitation requires an unprivileged local user account and access to a vt device. No network access is needed, and no user interaction is required beyond issuing the malicious ioctl call. The low attack complexity and minimal prerequisites make this a practical privilege escalation vector for local attackers. The vulnerability is not known to be actively exploited in public KEV catalogs as of the publication date, but the straightforward nature of the flaw suggests weaponization is feasible.

Remediation

Apply the latest FreeBSD security patches for your running version. Check the official FreeBSD Security Advisories page and your vendor's security notices for the specific patch version addressing CVE-2026-49416. If patching cannot be deployed immediately, restrict local user access and limit filesystem permissions on vt device nodes (/dev/ttyv* on FreeBSD) to trusted users only. Monitoring and auditing local login attempts and privilege escalation attempts can help detect exploitation attempts.

Patch guidance

Verify the exact patched version for your FreeBSD release against the official FreeBSD security advisories. Patches are typically released as errata updates or maintenance releases. Test patches in a non-production environment first, especially in high-availability deployments, as kernel updates may require system restart. Coordinate patching with your change management and maintenance windows to minimize downtime.

Detection guidance

Monitor system logs for failed or suspicious ioctl calls on vt devices, particularly CONS_HISTORY requests with abnormally large parameters. Enable kernel audit logging if available to capture vt driver interactions. Watch for unexpected privilege escalation events (e.g., processes spawning root shells from unprivileged accounts) that may indicate exploitation. Host-based intrusion detection systems configured to flag unusual local privilege escalation patterns can provide early warning. Kernel panic logs or heap corruption messages in dmesg output may also indicate exploitation attempts.

Why prioritize this

This vulnerability scores 7.8 (HIGH) under CVSS 3.1 due to its local nature, lack of privilege requirements for triggering, and direct impact on confidentiality, integrity, and availability through privilege escalation. While it requires local access, the minimal barriers to exploitation and the critical nature of privilege escalation in multi-user and containerized environments make it a priority for patching. Organizations should address this before lower-impact vulnerabilities in their patch cycle.

Risk score, explained

The CVSS 3.1 score of 7.8 reflects: Attack Vector = Local (AV:L); Attack Complexity = Low (AC:L); Privileges Required = Low (PR:L); User Interaction = None (UI:N); Scope = Unchanged (S:U); and impacts on Confidentiality, Integrity, and Availability all marked as High (C:H/I:H/A:H). The high severity is justified because unprivileged local code execution leading to kernel-level corruption is a reliable path to system compromise. The 'Local' attack vector prevents a higher score, but the direct escalation path and ease of exploitation make this a critical priority for affected environments.

Frequently asked questions

Does this vulnerability require a specific type of FreeBSD hardware or kernel configuration?

No, any FreeBSD system with vt(4) virtual terminal support in the kernel is vulnerable. vt(4) is the standard virtual terminal driver on modern FreeBSD and is typically enabled by default. Legacy systems using sc(4) instead are not affected by this specific flaw.

Can this be exploited remotely or only locally?

Only locally. The vulnerability requires direct access to the system and the ability to issue ioctl calls to a vt device. Remote exploitation is not possible. However, any mechanism that grants an attacker local shell access (SSH, physical console, container breakout) can facilitate exploitation.

What happens if we restrict vt device permissions?

Restricting read/write access to /dev/ttyv* device nodes to trusted users only can reduce the attack surface by preventing unprivileged users from accessing the vulnerable ioctl handler. However, this is a defense-in-depth measure and not a substitute for patching, as some configurations may require broader access for legitimate purposes.

Is there a way to disable vt(4) to avoid this vulnerability?

In principle, yes—a system can be compiled without vt(4) support or with an alternative terminal driver (such as sc(4) on older FreeBSD versions). However, this is typically impractical for most deployments and is not recommended as a long-term mitigation. Patching is the appropriate response.

This analysis is provided for informational purposes by SEC.co and does not constitute legal or professional security advice. Vulnerability severity and exploitability assessments are based on available public information as of the publication date. Vendors and organizations should verify all patch versions, affected product lists, and remediation steps against official vendor advisories before taking action. Actual risk in your environment depends on your specific FreeBSD configuration, deployment model, user access controls, and network segmentation. This information does not guarantee protection against all variants or zero-day exploitation. Consult your security team and follow your organization's vulnerability management and patching policies. Source: NVD (public-domain), retrieved 2026-08-05. Analysis generated by SEC.co (claude-haiku-4-5).