A vulnerability has been identified in the Net-SNMP package, which implements SNMP v1, SNMP v2c, and SNMP v3 protocols (CVE-2025-68615). This vulnerability allows for remote code execution on servers using the snmptrapd service to receive and process trap messages from devices. By default, the service accepts requests on UDP port 162 and runs with root privileges. The issue has been assigned a critical severity level (9.8 out of 10). The attack can be carried out without authentication.
The vulnerability is caused by improper verification of the OID size ('trapOidLen >= 0' instead of 'trapOidLen > 0') before copying the data specified in the packet into a fixed-size buffer. Transmitting specially crafted packets leads to data being written beyond the boundary of the trapOid buffer, which can be exploited to execute an attacker's code with the privileges under which the snmptrapd process runs. The vulnerability has been fixed in Net-SNMP updates 5.9.5 and 5.10.pre2. As an additional layer of protection, it is recommended to block access from external networks to UDP port 162 on the firewall.
Source: opennet.ru
