Term for a bullet hitting a bystander in a gunfight

Crossfire would describe the entire scene. From the OED:

gunfire from two or more directions passing through the same area, often killing or wounding noncombatants: a photographer was killed in the crossfire.

The bullet itself would be described as a stray bullet. From the OED:

move without a specific purpose or by mistake, esp. so as to get lost or arrive somewhere where one should not be


I think the word you're looking for is stray, which means to deviate from the desired course.

The bystander was hit by stray gunfire.

or

A stray bullet struck a bystander.