Yes, it could be dangerous for the camera, but it depends, which camera, and which connection You use.
The hot shoe (from the top of the camera) is made for low voltage (for ex less then 10 volts – but I used for example long time a 300d with an old flash with 160 volts trigger voltage).
Here is a link with measurings made by others.
So, You have to measure the voltage on the middle contact. Old flashes could have 150V, or over 250 too. Normally. Case of a shortcircuit or isolation problems, they could get the capacitorvoltage there – which is 300 volts.
In the cameras user manual normally You can read the admitted voltage. Case of a Canon 5d the hot shoe is NOT for over 10 V, the PC contact on the side of the camera is up to 250V. Here You have the text:
But: If You want to go on sure, the best is to use some radio controlled triggers, like the Yongnuo or any other make. In that case there is no danger.
But: some triggers make a little delay in the triggering, so the cameras could make half lighted photos. So try them at first.