Bug #16901
closedDaemon configuration manipulation via CR/LF in SNMP settings
100%
Description
Multiple fields on services_snmp.php accept CR/LF characters and other characters which are not valid for their content, such as double quotes, which can allow a user to add arbitrary configuration directives.
Affected fields are, at a minimum: syslocation, syscontact, rocommunity, trapstring
This appears to be limited to configuration manipulation as bsnmpd does not have directives which execute external commands.
Files
JP Updated by Jim Pingle 3 months ago
- File 16901.patch added
- Status changed from New to Feedback
- % Done changed from 0 to 100
Fixed in commit b1ff799da518f903901efc6ac574edebe6a9c525
Added validation for all SNMP GUI fields.
Patch is attached.
JP Updated by Jim Pingle 3 months ago
- Status changed from Feedback to In Progress
As mentioned on #16909 the $ character is also special to bsnmpd. It is valid for variable substitution, but in the context of pfSense GUI options that doesn't make much sense to allow, so it should also be rejected.
JP Updated by Jim Pingle 3 months ago
- File deleted (
16901.patch)
JP Updated by Jim Pingle 3 months ago
- File 16901.patch 16901.patch added
- Status changed from In Progress to Feedback
Additional fix is in commit e664239552031b0a462be19011aa44608ffb360c
Updated patch attached.
GT Updated by Georgiy Tyutyunnik 2 months ago
latest 26.07 invalidates fields with special symbols
tested on
26.07-BETA (amd64)
built on Thu Jul 2 23:42:00 UTC 2026
FreeBSD 16.0-CURRENT
GT Updated by Georgiy Tyutyunnik 2 months ago
- Status changed from Feedback to Resolved
JP Updated by Jim Pingle about 1 month ago
- Private changed from Yes to No