Hi Willyswhippet1928,
Welcome to Apple Support Communities. We're glad you've reached out for help from the community regarding this issue you're experiencing. Let's get to the bottom of it together.
To start, please let us know more about what's going on. What happens exactly when you attempt to open attachments sent to your Yahoo mail? To confirm, you are attempting to open these attachments from within the mail client on the Yahoo website in Safari, correct? Or are you trying to open attachments in the Mail app itself?
So that we're on the same page, which iMac model and macOS version are you using? The version can be found under Apple menu () > About this Mac. Have you had a chance to restart your computer before checking again to see if the website data is removed?
What happens if you restart your computer in safe mode, then try again to open attachments? The following guide explains how to start up in safe mode:
How to use safe mode on your Mac - Apple Support
If the issue persists, we can recommend temporarily removing installed login items to test. Follow these steps:
Remove login items to resolve startup problems on your Mac - Apple Support
We're here for you if you've got any questions.
Have a great day!