Home / mailingsPDF  

FreeBSD Security Advisory FreeBSD-SA-26:89.bsnmp

Posted on 18 November 2026
FreeBSD security notificat

=============================================================================FreeBSD-SA-26:89.bsnmp Security Advisory
The FreeBSD Project

Topic: Multiple vulnerabilities in bsnmpd(1)

Category: core
Module: bsnmp
Announced: 2026-11-17
Credits: Kevin Day
Affects: All supported versions of FreeBSD.
Corrected: 2026-11-17 17:06:13 UTC (stable/15, 15.2-STABLE)
2026-11-17 17:08:30 UTC (releng/15.1, 15.1-RELEASE-p7)
2026-11-17 17:03:00 UTC (stable/14, 14.5-STABLE)
2026-11-17 17:05:22 UTC (releng/14.5, 14.5-RELEASE-p4)
2026-11-17 17:04:24 UTC (releng/14.4, 14.4-RELEASE-p13)
CVE Name: CVE-2026-127742, CVE-2026-127743

For general information regarding FreeBSD Security Advisories,
including descriptions of the fields above, security branches, and the
following sections, please visit <URL:https://security.FreeBSD.org/>.

I. Background

bsnmpd(1) is a Simple Network Management Protocol (SNMP) agent which
allows remote management stations to query and modify system information.
SNMPv3 requests are authenticated using the User-based Security Model
(USM), and access to managed objects may be restricted using the
View-based Access Control Model (VACM), each implemented by a loadable
module. Before authenticating, an SNMPv3 manager may send a discovery
request to learn the agent's engine ID.

II. Problem Description

bsnmpd(1) skips USM authentication and VACM checks for SNMPv3 discovery
requests, which should elicit only a Report. However, it executed any
variable bindings carried by a discovery request, so GET and SET requests
could be processed without authentication or access control. This was
possible even when the USM and VACM modules were not loaded, as in the
default configuration. Related flaws allowed a client to mark an
ordinary request as a discovery request, or to use a discovery request to
read the agent's USM and VACM configuration. (CVE-2026-127742)

The VACM module did not reject vacmViewTreeFamilyMask values longer than
16 bytes, resulting in a heap buffer overflow. (CVE-2026-127743)

III. Impact

An unauthenticated remote attacker able to send SNMPv3 messages to
bsnmpd(1) can read and modify any object managed by the agent, including
objects which reconfigure the agent itself. Where the VACM module is
loaded, the attacker can also trigger the heap overflow in bsnmpd(1),
which runs as root, potentially leading to remote code execution.

IV. Workaround

Systems not running bsnmpd(1) are not affected.

Systems which do not use SNMPv3 can avoid CVE-2026-127742 by enabling
only SNMPv1 and SNMPv2c. Add the following line to the %snmpd section of
/etc/snmpd.config and restart bsnmpd(1):

begemotSnmpdVersionEnable = 3

CVE-2026-127743 can then be triggered only by clients with write access
to the agent.

V. Solution

Upgrade your vulnerable system to a supported FreeBSD stable or
release / security branch (releng) dated after the correction date and
restart bsnmpd(1).

Perform one of the following:

1) To update your vulnerable system installed from base system packages:

Systems running a 15.0-RELEASE or later version of FreeBSD on the amd64 or
arm64 platforms, which were installed using base system packages, can be
updated via the pkg(8) utility:

# pkg upgrade -r FreeBSD-base
# service bsnmpd restart

2) To update your vulnerable system installed from binary distribution sets:

Systems running a RELEASE version of FreeBSD on the amd64 or arm64 platforms
which were not installed using base system packages can be updated via the
freebsd-update(8) utility:

# freebsd-update fetch
# freebsd-update install
# service bsnmpd restart

3) To update your vulnerable system via a source code patch:

The following patches have been verified to apply to the applicable
FreeBSD release branches.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

# fetch https://security.FreeBSD.org/patches/SA-26:89/bsnmp.patch
# fetch https://security.FreeBSD.org/patches/SA-26:89/bsnmp.patch.asc
# gpg --verify bsnmp.patch.asc

b) Apply the patch. Execute the following commands as root:

# cd /usr/src
# patch -E -p0 < /path/to/patch

c) Recompile the operating system using buildworld and installworld as
described in <URL:https://www.FreeBSD.org/handbook/makeworld.html>.

Restart the applicable daemons, or reboot the system.

VI. Correction details

This issue is corrected as of the corresponding Git commit hash in the
following stable and release branches:

Branch/path Hash Revision
- -------------------------------------------------------------------------
stable/15/ 768ca3a3d301 stable/15-n286883
releng/15.1/ 1725a5fc022b releng/15.1-n283687
stable/14/ 0efa7dd6ada1 stable/14-n275588
releng/14.5/ fffdd6dcb09a releng/14.5-n274923
releng/14.4/ c72274ee73c2 releng/14.4-n273824
- -------------------------------------------------------------------------

Run the following command to see which files were modified by a
particular commit:

# git show --stat <commit hash>

Or visit the following URL, replacing NNNNNN with the hash:

<URL:https://cgit.freebsd.org/src/commit/?id=NNNNNN>

To determine the commit count in a working tree (for comparison against
nNNNNNN in the table above), run:

# git rev-list --count --first-parent HEAD

VII. References

<URL:https://www.cve.org/CVERecord?id=CVE-2026-127742>
<URL:https://www.cve.org/CVERecord?id=CVE-2026-127743>

The latest revision of this advisory is available at
<URL:https://security.FreeBSD.org/advisories/FreeBSD-SA-26:89.bsnmp.asc>

 

TOP