The biggest problem is that you'd be bolting the rails to aluminium, not the bolts themselves.

There are various calculators online for bolt strength, and the first one I've just found puts an 8.8 grade M3 bolt at proof load of 2920N, and minimum ultimate load at 4020N. To put that in context, that means you could hang over 400Kg onto the bolt vertically, and it should not snap.
However I very much doubt an aluminium thread would support that 400kg.

I'd be looking at either helicoils, or bigger threaded inserts which I've currently forgotten the name off, to help spread the load on the aluminium.