Overall, famous tourist attractions in Brazil are safe for foreigners. However, you should keep in mind the crime rate there, which is similar to the south Asian countries. Moreover, due to COVID-19, you must follow the travel advisory and be vaccinated.