Can aromatic rings be cyanated using cyanide as a nucleophile? For example, can I convert chlorobenzene into benzonitrile by using potassium cyanide as the reagent?
Chlorobenzene is generally inert to nucleophilic substitution. It was observed by Rosenmund and Braun that using an ethanolic solution of potassium cyanide and cuprous cyanide as catalyst at 200°C, chlorobenzene converts to benzoic acid. But if the ethanol-cyanide solvent is removed and temperature is raised, then the reaction proceeds to form cyanobenzene. Yield was further improved when ionic liquids like DMF was used. This is Rosenmund-Braun reaction.

Note: Working with cyanide is highly dangerous. Do not handle cyanide until and unless you are a professional chemist.

Reference


Wikipedia: Rosenmund-von Braun reaction
Will cyanide substitute bromine in bromobenzene?
Potassium ferrocyanide, $\ce{K4[Fe(CN)6]}$ can be used as a non-toxic source for cyanation.
There are loads of other catalyst for cyanation like $\ce{ZnCl2}$, palladium or nickel salts.[@Waylander]