-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= pfSense-SA-25_04.webgui Security Advisory pfSense Topic: Potential disclosure of AutoConfigBackup Device Key if SSH service is enabled and exposed to untrusted networks Category: pfSense Base System Module: webgui Announced: 2025-05-16 Credits: Github user NavyTitanium CVE ID: CVE-2024-57273 Affects: pfSense Plus software versions < 25.03 pfSense CE software versions < 2.8.0 Corrected: 2024-12-27 14:02:35 UTC (pfSense Plus master, 25.03) 2024-12-27 14:02:35 UTC (pfSense CE master, 2.8.0) 0. Revision History v1.0 2025-05-16 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 The AutoConfigBackup service associated backups with a host by a hash of its SSH public host key, which is known as the "device key" in AutoConfigBackup. This device key could not be changed by the user without reinstalling pfSense software or otherwise manually regenerating SSH host keys. If a user has exposed the SSH service on a device to an untrusted network, a malicious client on that untrusted network could probe the SSH service and determine the hash of the public host key. With that public host key they can calculate the ACB device key. This problem is present on all pfSense Plus software versions 24.11 and earlier, pfSense "factory" versions 2.4.4 and later, and pfSense CE versions 2.4.4 through 2.7.2. III. Impact A malicious actor can perform actions on AutoConfigBackup content for a known device key. These actions include listing backups, deleting backups, creating new entries with malicious reason strings, and more. If the user has chosen a weak encryption key, the content of the backups could also be compromised. NOTE: If a device does not have SSH enabled or its firewall rules do not expose SSH to any untrusted networks (e.g. WAN) then that device is unaffected. IV. Workaround To help mitigate the problem on older releases, use one or more of the following: * Disable the SSH service if it is not required. * Limit access to the the SSH service to trusted administrative hosts and networks. * Use a VPN to access administrative services on the firewall. * Disable the AutoConfigBackup service and remove remote backup entries if it is no longer needed. * If patching is not possible, consider manually erasing and re-generating the SSH host keys after locking down access to the SSH service. Save the old device key before taking any action. Consider removing backup entries stored under the old device key. V. Solution The AutoConfigBackup service now defaults to using a randomized device key and also allows users to generate a new device key on demand. The device key will not change automatically if AutoConfigBackup is enabled. After upgrading to a fixed version or applying patches to obtain the new AutoConfigBackup interface, the best practice is to change the device key to a randomized value which has no relation to the SSH host key. After confirming the service is working with the new key, consider removing backups associated with the old legacy device key. Users can upgrade to pfSense Plus software version 25.03 or later, or pfSense CE software versions after 2.8.0 when available. 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 24.11 and pfSense CE version 2.7.2 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 c81106eb27b31ee4738addc45798ddc10ff6c841 4ceeeb54c48d636b629e12e97c4a3d7eadbd9eed 1c8e836c50fc50f685caca625917fcbef5429f79 pfSense/master c81106eb27b31ee4738addc45798ddc10ff6c841 4ceeeb54c48d636b629e12e97c4a3d7eadbd9eed 1c8e836c50fc50f685caca625917fcbef5429f79 - - ------------------------------------------------------------------------- VII. References The latest revision of this advisory is available at -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE40XvjEU56XSUPIMdE7mH/ZIU+NoFAmgnYzQACgkQE7mH/ZIU +Nru2BAApTm8fkqHkeVrlwgkZocnS+FL0phdvl1I3c2Cb2j1eh3qsRYUxb/PIr4k 6FbyUAXZS7fpZJA6AaNIND1nhJoRhUYJ6T2I7AWZWH6wrRyCFDzHBzTCZEY6EAbM R3LCptYmT9dP/KxMao8Tai2zTpoUUKUdOeybQQwjpfmYafgNL/uxiC+Y4v//cdDV IO4hBKmXgZSTB9kQRPnP1cVU4Z/9SbiaIpTRuE1LZE9+aAtxKkNKEU/bCr4bloP5 AVO2wG7IwlIoEsfpBDPSBNdIaMgFUpv/kySabD4BMtufW33D+eRtDkGEXBFSGmBV bKOk2RMU7+cfppid61Z5h12R3MhnoS4emLvVPeS+Rf7Oie+Cg8o3ag5aBf0ovTP0 KStSxVssObqhYPPHrLWGwWW4bflOkIKEENEt9W4qHacwb/vuKpOO+xdcv1eh5/Ye 1L0XaUmu97S2Yw5WlQi7Pv9LotROHCXPdEKBzCmNZUHfih03B2zbIT83zQKIZG4m 0MJ4FnyZQ38gsu6Jpeq3zrvT6Wv6khoScwYSbNCoEkG70vx5TZ1Sx3M81vs0/cWT kn3FnvKkGyqM2aCSk22z5EhAA3Kx/rjS88T4t38RmrLuwKbLNtkC+NzfGrhcBjCN 0D9csivBrJ9nRAgkLleyExm8cxpJ0s4/tQp2xqmCPAreJrTthOM= =qzIS -----END PGP SIGNATURE-----