-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= pfSense-SA-23_06.webgui Security Advisory pfSense Topic: Authenticated Command Execution in the WebGUI Category: pfSense Base System Module: webgui Announced: 2023-05-11 Credits: The UK's National Cyber Security Centre (NCSC) Affects: pfSense Plus software versions <= 23.01 pfSense CE software versions <= 2.6.0 Corrected: 2023-02-28 20:54:00 UTC (pfSense Plus master, 23.05) 2023-02-28 20:54:00 UTC (pfSense CE master, 2.7.0) 0. Revision History v1.1 2023-06-19 Updated with CE 2.7.0 release information v1.0 2023-05-11 Initial SA draft I. Background pfSense® software is a free network firewall distribution based on the FreeBSD operating system. The pfSense software distribution includes third- party free software packages for additional functionality, and provides most of the functionality of common commercial firewalls. pfSense® Plus is the productized version of pfSense software from Netgate®, previously referred to as pfSense Factory Edition (FE). It is available to Netgate appliance and CSP customers. The majority of users of pfSense software have never installed or used a stock FreeBSD system. Unlike similar GNU/Linux-based firewall distributions, there is no need for any UNIX knowledge. The command line is never used, and there is no need to ever manually edit any rule sets. Instead, pfSense software includes a web interface for the configuration of all included components. Users familiar with commercial firewalls will quickly understand the web interface, while those unfamiliar with commercial-grade firewalls may encounter a short learning curve. II. Problem Description A potential authenticated arbitrary command execution vulnerability was found in interfaces_bridge_edit.php, a component of the pfSense Plus and pfSense CE software GUI. When creating or editing a bridge interface on interfaces_bridge_edit.php, the submitted POST "bridgeif" value is used before it is validated. Subsequently, that function calls others which in turn use the submitted interface name in shell commands. Due to a lack of escaping on commands in the functions being called, it is possible to execute arbitrary commands with a properly formatted submission value for "bridgeif" in POST operations. This problem is present on pfSense Plus version 23.01, pfSense CE version 2.6.0, and earlier versions of both. III. Impact A user with sufficient privileges to access interfaces_bridge_edit.php may be able to execute arbitrary shell commands. IV. Workaround To help mitigate the problem on older releases, use one or more of the following: * Limit access to the affected pages to trusted administrators only. V. Solution Users can upgrade to pfSense Plus software version 23.05 or later, or pfSense CE software version 2.7.0 or later. This upgrade may be performed in the web interface or from the console. See https://docs.netgate.com/pfsense/en/latest/install/upgrade-guide.html Users on pfSense Plus version 23.01, 22.05.x, and pfSense CE version 2.6.0 may apply the fix from the recommended patches list in the System Patches package. Users may also manually apply the relevant revisions below using the System Patches package on earlier versions, or by manually making similar changes to the affected files if the patches do not apply directly. See https://docs.netgate.com/pfsense/en/latest/development/system-patches.html VI. Correction details The following list contains the correction revision commit ID for each affected item. Branch/path Revision - - ------------------------------------------------------------------------- plus/plus-master c5b8e57aa51ff82b45bd6cb925ba512f4c01dcba pfSense/master c5b8e57aa51ff82b45bd6cb925ba512f4c01dcba - - ------------------------------------------------------------------------- VII. References The latest revision of this advisory is available at -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE40XvjEU56XSUPIMdE7mH/ZIU+NoFAmSQer4ACgkQE7mH/ZIU +No8nhAA32MhN7rPx3Lp14/pR5RFVr2Jkdq+LbA1XfC8NQfsugk8BXqIBKqhGDmu +1B6f464+8WRAtYoexwYcItPB9PwAMY9PhK53FPpOuS+OObid+W5y2uWsgTCKHvc 4hzWm6DLbk0QdNhZs/77wlZz3qSvhFxROK+Wddfm6d/vU14bdI6Bie6zvIr/8a4e k1h7qOIFdiRFg4y7bst+KQCTr3ppCo93h4IjOvA18XkfTBorVu47Zmydaj1bpwtr RiPWmxkf/JxmRPM6oRjDC4IJSfeFgkTf9fs8nYyGrWPeG5bQq9NmF3IwxA60OyoB kpQ2ysMYE/0joxGW1NYWBQyymJ4k5s1la3uCmN8RdTy4ybhUW+mRODPeBNfDo3BC qk3pqcihNlh6YJdTewFOE/bDHpOhBvDdejxy9scA82ffGF5xv4eIJmgyMkbuDRd+ N+8yNtQqgXTKEkuubjfVz2Aruzsacs90A9XyZiI57nPxEuz08Sdqz4RJCB4xDSlF PSYpuE6jkWjaXlOZf7eSsJumAQNkmwlKYNcLaivb91RFDoH3YIOavJJVgpqNYpZx QYY39FMLzpz0GEz3d9vWp2VzzYkxw0S8eHYh2W/s/3d1TJfsf+MK+9Xsyijs/jvM yHkmYunfwzky36bImIhYCq94jUTvRqnO9eze9zh7K8W97fdd+TY= =ZezL -----END PGP SIGNATURE-----