Can the muffler be inside an enclosure? I'm told they leak

I want to mount a 2kw Hcalory diesel heater inside a electrical enclosure outside of my van, my initial intention was to mount the intake combustion air to a bulkhead fitting on one side of the enclosure, and the exhaust pipe to the muffler to another bulkhead fitting on the other side of the enclosure. But I'm told the mufflers leak and should be outside, is this true? is there a better muffler I could use for this application?