It will depend on the day. If your flight is on time, you should be okay, but I wouldn't dawdle.
For context:
I haven't connected through YUL on an outbound flight, but I've flown from YUL on several occasions. Most recently was early on the Sunday morning of Ontario March Break in 2016. Due to a mix of factors, we were later than intended getting to the airport, and arrived a little more than an hour in advance of our flight. The security line was long (they did move us up a bit, along with others), and the customs line was longer. They had maybe 3 agents working, and they were not the least bit interested in moving anyone up, for any reason. There were plenty of people trying.
It was past departure time by the time we cleared. We ran to the gate. Doors had just closed. They were pulling our luggage, and the gate agent had just re-booked us on a flight for the next day when the pilot took pity on us (and the guy who came up behind us) and told them to let us on. We were lucky.
That said, I don't think you need to clear security on a connection, and this was a *very* busy morning. Most likely you'll be okay, but if your flight is far enough out to apply for NEXUS in the meantime, it might be worth considering. The entire time we were in line for customs, the NEXUS line was empty. We have made a conscious decision not to apply for NEXUS so far, but on days like that, I'm seriously tempted.
Good luck!