The linear stability of flow in a vertical rectangular duct subject to homogeneous internal heating, constant-temperature no-slip walls and a driving pressure gradient is investigated numerically in the framework of the Boussinesq hypothesis. A Galerkin method based upon modified Chebyshev polynomials is used to discretize the linearized Navier-Stokes equations in their most compact form, i.e. eliminating the pressure and the streamwise velocity and making use of the intrinsic symmetry properties. A classification of the basic flow in Grashof and Reynolds space in terms of inflectional properties is proposed. It is found that the flow loses stability at all aspect ratios for a combination of finite thermal buoyancy and pressure forces with opposed signs. In the square duct, the unstable region lies inside the range where the basic velocity profile exhibits additional inflection lines. Unstable eigenfunctions are obtained for all basic symmetry modes, consisting of rapidly propagating large-scale structures located in the vicinity of the inflection lines near the centre of the duct.