This is on unraid 6.11.2
I fixed this by doing the following and then borg runs without errors on mine.
Probably not the proper way to do it and have not tested after a reboot.
Download the libffi v3.3 from here on another Linux PC, I used Linux Mint 21: https://github.com/libffi/libffi/releases
Direct link: https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz
Extract and then open a terminal in the extracted directory then type:
./configure
make
There should then be a libffi.so.7.1.0 in libffi-3.3/x86_64-pc-linux-gnu/.libs directory
Rename this to libffi.so.7
Then copy across to /usr/lib64/libffi.so.7 on unraid and run borg
Hope that helps until it is fixed properly