I never use that option so I don't know how it's being done right now. My idea would be to have a confirmation - but not as an alert, pop-up, highlight or whatever...
Something less obtrusive. Like, you click "Mark all forums as read" and then the phrase "Mark all forums read" becomes gray or something and slides off to the side. Then a "are you sure?" comes up right where "Mark all forums read" was before.
I think something similar is already being done somewhere here... Can't remember where I saw that though.
I think it is absolutely vital to have that confirmation dialog - clicking that link by accident can do major damage to your browsing session if you are trying to ensure that you have paid attention to all threads.