In FreeBSD 12.2-STABLE before r369334, 11.4-STABLE before r369335, 12.2-RELEASE before p4 and 11.4-RELEASE before p8 when a process, such as jexec(8) or killall(1), calls jail_attach(2) to enter a jail, the jailed root can attach to it using ptrace(2) before the current working directory is changed.
https://security.netapp.com/advisory/ntap-20210423-0003/
https://security.FreeBSD.org/advisories/FreeBSD-SA-21:05.jail_chdir.asc