Boxfish do secrete a toxin named Ostracitoxin as a defense mechanism when stressed. The amount and lethality of the toxin is relational to the size of the boxfish. If it is tiny like is common among our ranks (1-2 inches) then the amount of toxin it produces when stressed will easily be processed out of our systems with the use of GAC
or aggressive protein skimming and depending on the size of the tank it is in, may not cause any effect what so ever. Now if the boxfish is a mature adult and is full grown then the effects of them releasing the toxins can be devastating to a home aquarium as it is a much greater quantity.
Here's a couple links with info about the toxin:
Ostracitoxin - Wikipedia, the free encyclopedia
Ostracitoxin: An Ichthyotoxic Stress Secretion of the Boxfish, Ostracion lentiginosus -- Thomson 146 (3641): 244 -- Science
In order to read the science article, you gotta subscribe and do other stuff to download the pdf version of the article.