Cavanagh was born in Chislehurst, Kent, and attended the Royal Grammar School, Newcastle upon Tyne, and Emmanuel College, Cambridge. Cavanagh studied law in England, earning a master of arts degree at Cambridge. A newspaper article published 17 June 1931, reported, "It is on record that Cavanagh won high honors in mathematics and history."