India also have Australia in their pool in a repeat of the 2023 final. Their encounter will open the second stage of the World Cup in Cape Town on October 7, with the tournament co-hosted by South Africa, Namibia and Zimbabwe.
India and Pakistan have a fierce rivalry on the cricket pitch, fuelled by political tensions between the subcontinent neighbours.
There will likely be a fervent atmosphere at the Wanderers, nicknamed the 'Bullring', a high-scoring ground that will also stage the final on November 21.
Afghanistan, co-hosts Zimbabwe and an as yet unknown qualifier are also in Group A with the top three teams in each pool advancing to the Super 7 phase, along with the best of the fourth-placed teams across the two pools.
Co-hosts South Africa, who have yet to lift the World Cup, are in Group B with England, New Zealand, Sri Lanka, Bangladesh and another qualifier.
The first stage of the competition is a round-robin three-team event that starts on October 2 and will produce the final qualifier for the second stage.
2027 Cricket World Cup:
Group A: Afghanistan, Australia, India, Pakistan, Zimbabwe, Qualifier A
Group B: Bangladesh, England, New Zealand, South Africa, Sri Lanka, Qualifier B